4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
9 #ifndef ION_IONCORE_EVENT_H
10 #define ION_IONCORE_EVENT_H
12 #include <libmainloop/hooks.h>
16 #define IONCORE_EVENTMASK_PTRGRAB (ButtonPressMask|ButtonReleaseMask| \
19 #define IONCORE_EVENTMASK_PTRLOOP (IONCORE_EVENTMASK_PTRGRAB|ExposureMask| \
20 KeyPressMask|KeyReleaseMask| \
21 EnterWindowMask|FocusChangeMask)
23 #define IONCORE_EVENTMASK_NORMAL (ExposureMask|KeyPressMask| \
24 ButtonPressMask|ButtonReleaseMask| \
25 FocusChangeMask|EnterWindowMask)
27 #define IONCORE_EVENTMASK_CWINMGR (IONCORE_EVENTMASK_NORMAL| \
28 SubstructureRedirectMask)
30 #define IONCORE_EVENTMASK_ROOT (IONCORE_EVENTMASK_CWINMGR| \
31 PropertyChangeMask|ColormapChangeMask)
33 #define IONCORE_EVENTMASK_CLIENTWIN (ColormapChangeMask| \
34 PropertyChangeMask|FocusChangeMask| \
35 StructureNotifyMask|EnterWindowMask)
37 #define IONCORE_EVENTMASK_SCREEN (FocusChangeMask|EnterWindowMask| \
38 KeyPressMask|KeyReleaseMask| \
39 ButtonPressMask|ButtonReleaseMask)
41 #define IONCORE_CLOCK_SKEW_MS 30000
43 extern void ioncore_x_connection_handler(int conn
, void *unused
);
44 extern void ioncore_flush();
45 extern void ioncore_get_event(XEvent
*ev
, long mask
);
47 extern void ioncore_update_timestamp(XEvent
*ev
);
48 extern Time
ioncore_get_timestamp();
50 /* Handlers to this hook should take XEvent* as parameter. */
51 extern WHook
*ioncore_handle_event_alt
;
53 extern void ioncore_mainloop();
55 #endif /* ION_IONCORE_EVENT_H */