Simple lua repl for testing
[notion.git] / ioncore / grab.h
blobdcc0675333a5010e7d8b073ed423f5ccf44b5073
1 /*
2 * ion/ioncore/grab.h
4 * Copyright (c) Lukas Schroeder 2002,
5 * Tuomo Valkonen 2003-2009.
7 * See the included file LICENSE for details.
9 * Alternatively, you may apply the Clarified Artistic License to this file,
10 * since Lukas' contributions were originally under that.
13 #ifndef ION_IONCORE_GRAB_H
14 #define ION_IONCORE_GRAB_H
16 #include "global.h" /* for InputHandler and InputHandlerContext */
17 #include "common.h"
18 #include "region.h"
20 /* GrabHandler:
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 */