diff options
author | Alexis211 <alexis211@gmail.com> | 2009-12-23 19:19:55 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-12-23 19:19:55 +0100 |
commit | e2d5d79bbc90d73f709953f04b2b0d1faac4d43e (patch) | |
tree | bde6f928e3a45ef66f4056cbc932bc21fe44cb31 /Source/Kernel/VTManager/VirtualTerminal.proto.h | |
parent | 7ede286ebcb845fe4bfdfb948c6073573b01c3cb (diff) | |
download | Melon-e2d5d79bbc90d73f709953f04b2b0d1faac4d43e.tar.gz Melon-e2d5d79bbc90d73f709953f04b2b0d1faac4d43e.zip |
Changed the way virtual terminal commands are handled
These commands include those for moving the cursor, showing/hiding it,
changing the color, ...
Diffstat (limited to 'Source/Kernel/VTManager/VirtualTerminal.proto.h')
-rw-r--r-- | Source/Kernel/VTManager/VirtualTerminal.proto.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/Kernel/VTManager/VirtualTerminal.proto.h b/Source/Kernel/VTManager/VirtualTerminal.proto.h index ceb994c..1505d3b 100644 --- a/Source/Kernel/VTManager/VirtualTerminal.proto.h +++ b/Source/Kernel/VTManager/VirtualTerminal.proto.h @@ -7,6 +7,8 @@ #include <DeviceManager/Kbd.ns.h> #include <Vector.class.h> +#include <VirtualTerminal.iface.h> + #include <SyscallManager/Ressource.class.h> struct vtchr { @@ -39,34 +41,34 @@ class VirtualTerminal : public Ressource { u32int locateSC(u32int, u32int); bool accessible() { return true; } + //Internal use + virtual void updateCursor() {} + public: static u32int scall(u8int, u32int, u32int, u32int, u32int); VirtualTerminal(); virtual ~VirtualTerminal(); - virtual void setColor(u8int fgcolor, u8int bgcolor = 0xFF) {} //For a pipe/file VT, this will do nothing. virtual bool isBoxed() = 0; virtual u8int height() { return 0; } virtual u8int width() { return 0; } - virtual void updateCursor() {} - virtual void moveCursor(u32int row, u32int col) {} //These are not implemented for pipe/file VTs - virtual void setCursorLine(u32int line) {} - virtual void setCursorCol(u32int col) {} //This one could be, and should be. It's used a lot for tabulating, etc. + virtual void handleEscape(mvt_esc_cmd_t cmd) = 0; //Display functions virtual void put(WChar c, bool updatecsr = true) = 0; void write(const String& s, bool updatecsr = true); + + //Display functions for kernel use void writeDec(s64int num, bool updatecsr = true); void writeHex(u32int i, bool updatecsr = true); - virtual void hexDump(u8int* ptr, u32int sz, bool addnl = true); //Always ignore parameter addnl - inline VirtualTerminal& operator<<(const String& s) { write(s); return *this; } inline VirtualTerminal& operator<<(s32int i) { writeDec(i); return *this; } inline VirtualTerminal& operator<<(s64int i) { writeDec(i); return *this; } inline VirtualTerminal& operator<<(u32int i) { writeHex(i); return *this; } + inline VirtualTerminal& operator<<(mvt_esc_cmd_t cmd) { handleEscape(cmd); return *this; } //Keyboard functions virtual void keyPress(keypress_t kp); //Called by Kbd:: when a key is pressed, overloaded by ScrollableVT |