#ifdef __cplusplus extern "C" { #endif extern Display *dpy; extern int verbose; void record(const char *fn_out, Window win); void play(const char *fn, Window win); /* 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; } struct Rect { int x, y; int width, height; }; #ifdef __cplusplus } Rect get_win_pos(Window win); #endif