From e589a45295a871f38d4a1d1f23b370b612f99be5 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Sun, 18 Oct 2009 17:17:36 +0200 Subject: Syscall interface starts being implemented ! --- Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp | 11 +++++++++++ Source/Kernel/VTManager/VirtualTerminal.proto.cpp | 7 ++++++- Source/Kernel/VTManager/VirtualTerminal.proto.h | 8 +++++++- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp (limited to 'Source/Kernel/VTManager') 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 #include -VirtualTerminal::VirtualTerminal() : m_kbdMutex(false), m_kbdbuffMutex(false), m_kbdbuff() { +#include + +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 #include +#include + struct vtchr { u8int color; WChar c; }; -class VirtualTerminal { +class VirtualTerminal : public Ressource { protected: Mutex m_kbdMutex, m_kbdbuffMutex; Vector m_kbdbuff; //Key press events buffer + //SYSCALLS : + u32int writeHexSC(u32int); + u32int putSC(u32int); + public: VirtualTerminal(); virtual ~VirtualTerminal(); -- cgit v1.2.3