summaryrefslogtreecommitdiff
path: root/global.h
diff options
context:
space:
mode:
Diffstat (limited to 'global.h')
-rw-r--r--global.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/global.h b/global.h
index 0ea6f7b..92fbb00 100644
--- a/global.h
+++ b/global.h
@@ -1,5 +1,18 @@
extern Display *dpy;
+/* standard events */
void xev_init(Window w);
void xev_dump(XEvent *event);
+
+/* XInput */
+extern int xi_opcode;
+
+void xinput_init(Display *display, Window win);
+void xinput_dump(Display *display, XGenericEventCookie *cookie);
+
+static inline int
+is_xinput_event(XEvent *event)
+{
+ return event->type == GenericEvent && event->xgeneric.extension == xi_opcode;
+}