diff options
Diffstat (limited to 'arch/x86/io/VGADisplay.h')
| -rw-r--r-- | arch/x86/io/VGADisplay.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/x86/io/VGADisplay.h b/arch/x86/io/VGADisplay.h new file mode 100644 index 0000000..67f28b3 --- /dev/null +++ b/arch/x86/io/VGADisplay.h @@ -0,0 +1,36 @@ +#ifndef VGAGRAPHICS_H +#define VGAGRAPHICS_H + +#include "VGADisplayInfo.h" + +typedef unsigned short dchar; + +class VGADisplay +{ + private: + uint16 xCurr; + uint16 yCurr; + dchar *videoMem; + bool shift; + char color; + bool isBlink; + bool isBright; + + void doShift(); + // 0 if passed char isn't escape sequence, else 1 + bool printChar(const char &c); + void goNewLine(); + void goHorizontalTab(); + + public: + VGADisplay(); + VGADisplay(uint16 x, uint16 y); + VGADisplay& operator<<(const char &c); + VGADisplay& operator<<(const char *c); + VGADisplay& operator++(int); + void setShift(bool status); + void setColor(char colorAttr); + void setBlink(bool blinkAttr); + void setBright(bool brigthAttr); +}; +#endif |
