diff options
Diffstat (limited to 'global.h')
-rw-r--r-- | global.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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; +} |