diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-17 17:56:23 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-17 17:56:23 +0200 |
commit | 593bf4df3d8db49286c1a7ae4ef75c887b629930 (patch) | |
tree | 988a104c9611d72e1252282789688586efd9a394 /src/kernel/dev/display.h | |
parent | 7c9a48b4e6d66cf4f62e7bad9e22ab06923e47ef (diff) | |
download | TCE-593bf4df3d8db49286c1a7ae4ef75c887b629930.tar.gz TCE-593bf4df3d8db49286c1a7ae4ef75c887b629930.zip |
Devices using the VFS structure. Basic keyboard handler.
Diffstat (limited to 'src/kernel/dev/display.h')
-rw-r--r-- | src/kernel/dev/display.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/kernel/dev/display.h b/src/kernel/dev/display.h new file mode 100644 index 0000000..04a6d67 --- /dev/null +++ b/src/kernel/dev/display.h @@ -0,0 +1,38 @@ +#ifndef DEF_DEV_DISPLAY_H +#define DEF_DEV_DISPLAY_H + +#include <vfs/node.h> + +#define TC_BLACK 0 +#define TC_BLUE 1 +#define TC_GREEN 2 +#define TC_TURQUOISE 3 +#define TC_RED 4 +#define TC_PURPLE 5 +#define TC_BROWN 6 +#define TC_LIGHTGRAY 7 +#define TC_WHITE 15 + +class vt; +class display : public node { + + public: + vt *connected_vt; + + display(node* parent) : node(parent, FT_DEV) { + dev_type = DT_DISPLAY; + connected_vt = 0; + } + virtual ~display() {} + + virtual display* as_display() { return this; } + + virtual int text_w() = 0; + virtual int text_h() = 0; + virtual void text_setcsr(int l, int c, bool visible) = 0; + virtual void text_put(int l, int c, int ch, uint8_t fgcolor, uint8_t bgcolor) = 0; + virtual void text_scroll(int n, uint8_t fgcolor, uint8_t bgcolor) = 0; +}; + +#endif + |