summaryrefslogtreecommitdiff
path: root/cInput.h
diff options
context:
space:
mode:
authorGravatar jonas <himself@jonasgunz.de> 2019-02-01 13:38:52 +0100
committerGravatar jonas <himself@jonasgunz.de> 2019-02-01 13:38:52 +0100
commitb59b93d3943262cb66e3355e0c9ce0ea672ff196 (patch)
treeb74e581021f01bdfd415a73ee195ed24a88d1413 /cInput.h
parent6c7c4cc2f161eb02747e2ef6d1d59efae178db43 (diff)
downloadtermgl-b59b93d3943262cb66e3355e0c9ce0ea672ff196.tar.gz
Documentation
Diffstat (limited to 'cInput.h')
-rw-r--r--cInput.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/cInput.h b/cInput.h
index 49d13b7..529aa81 100644
--- a/cInput.h
+++ b/cInput.h
@@ -32,7 +32,12 @@ 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.
+*/
class cInput
{
public:
@@ -42,7 +47,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();