4 * Copyright (c) Tuomo Valkonen 1999-2007.
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 #define IONCORE_EVENTMASK_SCREEN (FocusChangeMask|EnterWindowMask| \
41 KeyPressMask|KeyReleaseMask| \
42 ButtonPressMask|ButtonReleaseMask)
44 extern void ioncore_x_connection_handler(int conn, void *unused);
45 extern void ioncore_flush();
46 extern void ioncore_get_event(XEvent *ev, long mask);
48 extern void ioncore_update_timestamp(XEvent *ev);
49 extern Time ioncore_get_timestamp();
51 /* Handlers to this hook should take XEvent* as parameter. */
52 extern WHook *ioncore_handle_event_alt;
54 extern void ioncore_mainloop();
56 #endif /* ION_IONCORE_EVENT_H */