From c5ce69a867a915fc8c6993705ab36c454616319f Mon Sep 17 00:00:00 2001 From: epoch Date: Mon, 1 Jul 2019 05:01:47 -0500 Subject: added a input handler since x11 mouse and kb events come through the same fd --- src/input.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/input.c (limited to 'src') 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 +#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)) { + } +} -- cgit v1.2.3