diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-20 18:10:29 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-20 18:10:29 +0200 |
commit | 866580161b826443bed3862b8315cefd505de37c (patch) | |
tree | 23c3f87fe43d82c47af01c908d8a056785f9217f /Source/Library/Userland/Binding | |
parent | 0cca2d68451849b5ea96a3620566fd0b42dde3c0 (diff) | |
download | Melon-866580161b826443bed3862b8315cefd505de37c.tar.gz Melon-866580161b826443bed3862b8315cefd505de37c.zip |
We now have call tables for ressources.
instead of adding calls to ressource in the constructor.
Diffstat (limited to 'Source/Library/Userland/Binding')
-rw-r--r-- | Source/Library/Userland/Binding/Process.class.h | 10 | ||||
-rw-r--r-- | Source/Library/Userland/Binding/Thread.class.h | 8 | ||||
-rw-r--r-- | Source/Library/Userland/Binding/VirtualTerminal.class.h | 27 |
3 files changed, 28 insertions, 17 deletions
diff --git a/Source/Library/Userland/Binding/Process.class.h b/Source/Library/Userland/Binding/Process.class.h index 88af9d6..e532ad3 100644 --- a/Source/Library/Userland/Binding/Process.class.h +++ b/Source/Library/Userland/Binding/Process.class.h @@ -5,18 +5,18 @@ class Process : public RessourceCaller { public: static Process get() { - u32int id = RessourceCaller::getObjId(PR_IFACE_OBJTYPE); + u32int id = RessourceCaller::getObjId(PRIF_OBJTYPE); return Process(id); } - Process(u32int id) : RessourceCaller(id, PR_IFACE_OBJTYPE) {} + Process(u32int id) : RessourceCaller(id, PRIF_OBJTYPE) {} void exit() { - doCall(PR_IFACE_EXIT); + doCall(PRIF_EXIT); } void allocPage(u32int pos) { - doCall(PR_IFACE_ALLOCPAGE, pos); + doCall(PRIF_ALLOCPAGE, pos); } void freePage(u32int pos) { - doCall(PR_IFACE_FREEPAGE, pos); + doCall(PRIF_FREEPAGE, pos); } }; diff --git a/Source/Library/Userland/Binding/Thread.class.h b/Source/Library/Userland/Binding/Thread.class.h index beef9c5..1a354d3 100644 --- a/Source/Library/Userland/Binding/Thread.class.h +++ b/Source/Library/Userland/Binding/Thread.class.h @@ -5,15 +5,15 @@ class Thread : public RessourceCaller { public: static Thread get() { - u32int id = RessourceCaller::getObjId(TH_IFACE_OBJTYPE); + u32int id = RessourceCaller::getObjId(THIF_OBJTYPE); return Thread(id); } - Thread(u32int id) : RessourceCaller(id, TH_IFACE_OBJTYPE) {} + Thread(u32int id) : RessourceCaller(id, THIF_OBJTYPE) {} void sleep(u32int msecs) { - doCall(TH_IFACE_SLEEP, msecs); + doCall(THIF_SLEEP, msecs); } void finish(u32int errcode) { - doCall(TH_IFACE_FINISH, errcode); + doCall(THIF_FINISH, errcode); } }; diff --git a/Source/Library/Userland/Binding/VirtualTerminal.class.h b/Source/Library/Userland/Binding/VirtualTerminal.class.h index 67683b8..4329c86 100644 --- a/Source/Library/Userland/Binding/VirtualTerminal.class.h +++ b/Source/Library/Userland/Binding/VirtualTerminal.class.h @@ -8,26 +8,37 @@ class VirtualTerminal : public RessourceCaller { public: static VirtualTerminal get() { - u32int id = RessourceCaller::getObjId(VT_IFACE_OBJTYPE); + u32int id = RessourceCaller::getObjId(VTIF_OBJTYPE); return VirtualTerminal(id); } - VirtualTerminal(u32int id) : RessourceCaller(id, VT_IFACE_OBJTYPE) {} + VirtualTerminal(u32int id) : RessourceCaller(id, VTIF_OBJTYPE) {} void writeHex(u32int number) { - doCall(VT_IFACE_WRITEHEX, number); + doCall(VTIF_WRITEHEX, number); } void writeDec(s64int number) { - doCall(VT_IFACE_WRITEDEC, (number >> 32), number); + doCall(VTIF_WRITEDEC, (number >> 32), number); } void write(String s) { - Serialized a = s.serialize(); - doCall(VT_IFACE_WRITE, a); + doCall(VTIF_WRITE, (u32int)&s); } String readLine() { - return String::unserialize(doCall(VT_IFACE_READLINE)); + return String::unserialize(doCall(VTIF_READLINE)); + } + void setColor(u8int fg, u8int bg = 0xFF) { + doCall(VTIF_SETCOLOR, (fg << 8) | bg); + } + void setCsrLine(u32int line) { + doCall(VTIF_SETCSRLINE, line); + } + void setCsrCol(u32int col) { + doCall(VTIF_SETCSRCOL, col); + } + bool isBoxed() { + return doCall(VTIF_ISBOXED) != 0; } void put(WChar c) { - doCall(VT_IFACE_PUT, c); + doCall(VTIF_PUT, c); } }; |