summaryrefslogtreecommitdiff
path: root/Source/Kernel/VTManager
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-18 17:17:36 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-18 17:17:36 +0200
commite589a45295a871f38d4a1d1f23b370b612f99be5 (patch)
treeb59f1190633368d78b23d78e011c99fa8fa3cc90 /Source/Kernel/VTManager
parent323e12f1f9ab33df15dcfed210e807561d98fa8c (diff)
downloadMelon-e589a45295a871f38d4a1d1f23b370b612f99be5.tar.gz
Melon-e589a45295a871f38d4a1d1f23b370b612f99be5.zip
Syscall interface starts being implemented !
Diffstat (limited to 'Source/Kernel/VTManager')
-rw-r--r--Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp11
-rw-r--r--Source/Kernel/VTManager/VirtualTerminal.proto.cpp7
-rw-r--r--Source/Kernel/VTManager/VirtualTerminal.proto.h8
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();