The Pedigree Project  0.1
kernel/machine/malta/Vga.h
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef MACHINE_MALTA_VGA_H
21 #define MACHINE_MALTA_VGA_H
22 
23 #include "pedigree/kernel/machine/Vga.h"
24 #include "pedigree/kernel/processor/types.h"
25 
29 class MaltaVga : public Vga
30 {
31  public:
32  MaltaVga();
33  virtual ~MaltaVga();
34 
43  virtual bool
44  setMode(size_t nCols, size_t nRows, bool bIsText, size_t nBpp = 0)
45  {
46  return false;
47  }
48 
53  virtual bool setLargestTextMode()
54  {
55  return false;
56  }
57 
62  virtual bool
63  isMode(size_t nCols, size_t nRows, bool bIsText, size_t nBpp = 0)
64  {
65  return false;
66  }
67 
72  virtual bool isLargestTextMode()
73  {
74  return true;
75  }
76 
80  virtual size_t getNumCols()
81  {
82  return 80;
83  }
84 
88  virtual size_t getNumRows()
89  {
90  return 25;
91  }
92 
96  virtual void rememberMode()
97  {
98  }
99 
103  virtual void restoreMode()
104  {
105  }
106 
117  virtual void pokeBuffer(uint8_t *pBuffer, size_t nBufLen)
118  {
119  }
120 
129  virtual void peekBuffer(uint8_t *pBuffer, size_t nBufLen)
130  {
131  }
132 
138  virtual void moveCursor(size_t nX, size_t nY)
139  {
140  }
141 
142  operator uint16_t *() const
143  {
144  return 0;
145  }
146 };
147 
148 #endif
virtual void peekBuffer(uint8_t *pBuffer, size_t nBufLen)
virtual bool setMode(size_t nCols, size_t nRows, bool bIsText, size_t nBpp=0)
virtual void restoreMode()
virtual void moveCursor(size_t nX, size_t nY)
virtual size_t getNumCols()
virtual bool setLargestTextMode()
virtual void rememberMode()
virtual bool isLargestTextMode()
virtual size_t getNumRows()
virtual bool isMode(size_t nCols, size_t nRows, bool bIsText, size_t nBpp=0)
virtual void pokeBuffer(uint8_t *pBuffer, size_t nBufLen)