]> git.decadent.org.uk Git - ion3.git/blob - ioncore/grab.h
Update cfg_kludge_flash for Flash 10
[ion3.git] / ioncore / grab.h
1 /*
2  * ion/ioncore/grab.h
3  *
4  * Copyright (c) Lukas Schroeder 2002,
5  *               Tuomo Valkonen 2003-2009.
6  *
7  * See the included file LICENSE for details.
8  *
9  * Alternatively, you may apply the Clarified Artistic License to this file,
10  * since Lukas' contributions were originally under that.
11  */
12
13 #ifndef ION_IONCORE_GRAB_H
14 #define ION_IONCORE_GRAB_H
15
16 #include "global.h" /* for InputHandler and InputHandlerContext */
17 #include "common.h"
18 #include "region.h"
19
20 /* GrabHandler:
21    the default_keyboard_handler now simplifies access to subsequent keypresses
22    when you establish a grab using grab_establish().
23
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.
26  */
27 typedef bool GrabHandler(WRegion *reg, XEvent *ev);
28 typedef void GrabKilledHandler(WRegion *reg);
29
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);
39
40 extern bool ioncore_handle_grabs(XEvent *ev);
41
42 #endif /* ION_IONCORE_GRAB_H */
43