diff options
Diffstat (limited to 'Source/Kernel/VTManager')
-rw-r--r-- | Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp | 11 | ||||
-rw-r--r-- | Source/Kernel/VTManager/VirtualTerminal.proto.cpp | 7 | ||||
-rw-r--r-- | Source/Kernel/VTManager/VirtualTerminal.proto.h | 8 |
3 files changed, 24 insertions, 2 deletions
diff --git a/Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp b/Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp new file mode 100644 index 0000000..8948657 --- /dev/null +++ b/Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp @@ -0,0 +1,11 @@ +#include "VirtualTerminal.proto.h" + +u32int VirtualTerminal::writeHexSC(u32int number) { + writeHex(number); + return 0; +} + +u32int VirtualTerminal::putSC(u32int code) { + put(WChar(code)); + return 0; +} diff --git a/Source/Kernel/VTManager/VirtualTerminal.proto.cpp b/Source/Kernel/VTManager/VirtualTerminal.proto.cpp index 0612f1d..b7c7340 100644 --- a/Source/Kernel/VTManager/VirtualTerminal.proto.cpp +++ b/Source/Kernel/VTManager/VirtualTerminal.proto.cpp @@ -2,7 +2,12 @@ #include <DeviceManager/Disp.ns.h> #include <VTManager/VT.ns.h> -VirtualTerminal::VirtualTerminal() : m_kbdMutex(false), m_kbdbuffMutex(false), m_kbdbuff() { +#include <VirtualTerminal.iface.h> + +VirtualTerminal::VirtualTerminal() : + Ressource(VT_IFACE_OBJTYPE), m_kbdMutex(false), m_kbdbuffMutex(false), m_kbdbuff() { + addCall1(VT_IFACE_WRITEHEX, (call1)&VirtualTerminal::writeHexSC); + addCall1(VT_IFACE_PUT, (call1)&VirtualTerminal::putSC); } VirtualTerminal::~VirtualTerminal() { diff --git a/Source/Kernel/VTManager/VirtualTerminal.proto.h b/Source/Kernel/VTManager/VirtualTerminal.proto.h index 9d0afa0..487233d 100644 --- a/Source/Kernel/VTManager/VirtualTerminal.proto.h +++ b/Source/Kernel/VTManager/VirtualTerminal.proto.h @@ -7,16 +7,22 @@ #include <DeviceManager/Kbd.ns.h> #include <Vector.class.h> +#include <SyscallManager/Ressource.class.h> + struct vtchr { u8int color; WChar c; }; -class VirtualTerminal { +class VirtualTerminal : public Ressource { protected: Mutex m_kbdMutex, m_kbdbuffMutex; Vector<Kbd::keypress_t> m_kbdbuff; //Key press events buffer + //SYSCALLS : + u32int writeHexSC(u32int); + u32int putSC(u32int); + public: VirtualTerminal(); virtual ~VirtualTerminal(); |