4 * Copyright (c) Tuomo Valkonen 1999-2007.
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 extern void ioncore_x_connection_handler(int conn, void *unused);
42 extern void ioncore_flush();
43 extern void ioncore_get_event(XEvent *ev, long mask);
45 extern void ioncore_update_timestamp(XEvent *ev);
46 extern Time ioncore_get_timestamp();
48 /* Handlers to this hook should take XEvent* as parameter. */
49 extern WHook *ioncore_handle_event_alt;
51 extern void ioncore_mainloop();
53 #endif /* ION_IONCORE_EVENT_H */