4 * Copyright (c) Lukas Schroeder 2002,
7 * Ion is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; either version 2.1 of the License, or
10 * (at your option) any later version.
13 #ifndef ION_IONCORE_GRAB_H
14 #define ION_IONCORE_GRAB_H
16 #include "global.h" /* for InputHandler and InputHandlerContext */
21 the default_keyboard_handler now simplifies access to subsequent keypresses
22 when you establish a grab using grab_establish().
24 if your GrabHandler returns TRUE, your grab will be removed, otherwise it's
25 kept active and you get more grabbed events passed to your handler.
27 typedef bool GrabHandler(WRegion
*reg
, XEvent
*ev
);
28 typedef void GrabKilledHandler(WRegion
*reg
);
30 extern void ioncore_grab_establish(WRegion
*reg
, GrabHandler
*func
,
31 GrabKilledHandler
*kh
,long eventmask
);
32 extern void ioncore_grab_remove(GrabHandler
*func
);
33 extern void ioncore_grab_holder_remove(WRegion
*holder
);
34 extern WRegion
*ioncore_grab_get_holder();
35 extern WRegion
*ioncore_grab_get_my_holder(GrabHandler
*func
);
36 extern bool ioncore_grab_held();
37 extern void ioncore_change_grab_cursor(int cursor
);
38 extern void ioncore_grab_confine_to(Window confine_to
);
40 extern bool ioncore_handle_grabs(XEvent
*ev
);
42 #endif /* ION_IONCORE_GRAB_H */