4 * Copyright (c) Tuomo Valkonen 1999-2006.
6 * Ion is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
12 #ifndef ION_IONCORE_EVENT_H
13 #define ION_IONCORE_EVENT_H
15 #include <libmainloop/hooks.h>
19 #define IONCORE_EVENTMASK_PTRGRAB (ButtonPressMask|ButtonReleaseMask| \
22 #define IONCORE_EVENTMASK_PTRLOOP (IONCORE_EVENTMASK_PTRGRAB|ExposureMask| \
23 KeyPressMask|KeyReleaseMask| \
24 EnterWindowMask|FocusChangeMask)
26 #define IONCORE_EVENTMASK_NORMAL (ExposureMask|KeyPressMask| \
27 ButtonPressMask|ButtonReleaseMask| \
28 FocusChangeMask|EnterWindowMask)
30 #define IONCORE_EVENTMASK_CWINMGR (IONCORE_EVENTMASK_NORMAL| \
31 SubstructureRedirectMask)
33 #define IONCORE_EVENTMASK_ROOT (IONCORE_EVENTMASK_CWINMGR| \
34 PropertyChangeMask|ColormapChangeMask)
36 #define IONCORE_EVENTMASK_CLIENTWIN (ColormapChangeMask| \
37 PropertyChangeMask|FocusChangeMask| \
38 StructureNotifyMask|EnterWindowMask)
40 extern void ioncore_x_connection_handler(int conn, void *unused);
41 extern void ioncore_flush();
42 extern void ioncore_get_event(XEvent *ev, long mask);
44 extern void ioncore_update_timestamp(XEvent *ev);
45 extern Time ioncore_get_timestamp();
47 /* Handlers to this hook should take XEvent* as parameter. */
48 extern WHook *ioncore_handle_event_alt;
50 extern void ioncore_mainloop();
52 #endif /* ION_IONCORE_EVENT_H */