summaryrefslogtreecommitdiff
path: root/global.h
blob: ab270733aefbace472f446ffda0f03b0c8175569 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#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;
}

#ifdef __cplusplus
}
#endif