summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2019-07-01 05:01:47 -0500
committerepoch <epoch@hacking.allowed.org>2019-07-01 05:01:47 -0500
commitc5ce69a867a915fc8c6993705ab36c454616319f (patch)
tree3f7bff38e8aa43e0acc1a16cb57e8c1167dfd38f /src
parent73a629980bf9c590b75f43a888b63c9d9c670393 (diff)
downloadhackvr-c5ce69a867a915fc8c6993705ab36c454616319f.tar.gz
hackvr-c5ce69a867a915fc8c6993705ab36c454616319f.zip
added a input handler since x11 mouse and kb events come through the same fd
Diffstat (limited to 'src')
-rw-r--r--src/input.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/input.c b/src/input.c
new file mode 100644
index 0000000..567928b
--- /dev/null
+++ b/src/input.c
@@ -0,0 +1,18 @@
+#include <idc.h>
+#include "common.h"
+#include "graphics_x11.h"
+#include "keyboard_x11.h"
+#include "mouse_x11.h"
+
+extern struct x11_global x11_global;
+
+int input_init() {
+ return x11_global.fd;
+}
+
+void input_event_handler(struct shit *me,char *line) {
+ if(keyboard_event_handler(me,line)) {
+ }
+ if(mouse_event_handler(me,line)) {
+ }
+}