diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2019-02-10 00:53:58 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2019-02-10 00:53:58 +0100 |
commit | 5bfaf048e81900ffdc0bb2815f8465235c4462d5 (patch) | |
tree | 5264bf22976d9dd666fceb8dc7d337e9b71fa787 /cInput.h | |
parent | 4e59b62be595d9c0e1e95f51c6c4c25f37bdb783 (diff) | |
parent | c459b4901f3f453f83a93a38228e3241dd8190c2 (diff) | |
download | termgl-5bfaf048e81900ffdc0bb2815f8465235c4462d5.tar.gz |
Merge branch 'master' of https://gitlab.lrz.de/ge49jic/engine
Diffstat (limited to 'cInput.h')
-rw-r--r-- | cInput.h | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -1,9 +1,3 @@ -/* -* cInput is responsible for Handling everything related to setting up and managing the console window -* as well as decoding keyboard and mouse events. -* Compatible with xterm compatible terminal emulators -*/ - #ifndef CINPUT_H_ #define CINPUT_H_ @@ -32,7 +26,13 @@ struct sInputEvent unsigned int b; int x, y; }; - +/** +* ##cInput +* * puts STDIN in raw mode +* * activates mouse tracking +* * reverts console back to normal operation on destruction. +* Compatible with xterm compatible terminal emulators +*/ class cInput { public: @@ -42,7 +42,12 @@ public: /** Reads inputevents * returns event struct - * event queu is empty, when sInputEvent.type == _EVENT_NULL + * ### sInputEvent.type + * * _EVENT_NULL: No input recorded + * * _EVENT_CHAR: A Key was pressed, stored in .c + * * _EVENT_KEY: Escape sequence recorded, stored in .c without escape char + * * _EVENT_MOUSE: Console registered click at (.x, .y) with origin at (0,0) (top left). Mouse button stored in b. + * * _EVENT_TERM: Console registered Ctrl+C */ sInputEvent poll(); |