]> git.decadent.org.uk Git - ion3.git/blob - ioncore/focus.h
Imported Upstream version 20090110
[ion3.git] / ioncore / focus.h
1 /*
2  * ion/ioncore/focus.h
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2009. 
5  *
6  * See the included file LICENSE for details.
7  */
8
9 #ifndef ION_IONCORE_FOCUS_H
10 #define ION_IONCORE_FOCUS_H
11
12 #include <libmainloop/hooks.h>
13 #include "common.h"
14 #include "window.h"
15 #include "region.h"
16
17
18 /* Delayed (until return to main loop) warp/focus */
19 extern void region_maybewarp(WRegion *reg, bool warp);
20 /* warp/focus now; do not skip enter window events etc. in mainloop */
21 extern void region_maybewarp_now(WRegion *reg, bool warp);
22
23 extern void region_warp(WRegion *reg); /* maybewarp TRUE */
24 extern void region_set_focus(WRegion *reg); /* maybewarp FALSE */
25
26 extern void region_finalise_focusing(WRegion* reg, Window win, bool warp);
27
28 DYNFUN void region_do_set_focus(WRegion *reg, bool warp);
29 extern void region_do_warp(WRegion *reg);
30 extern bool region_do_warp_default(WRegion *reg);
31
32 /* Awaiting focus state */
33 extern void region_set_await_focus(WRegion *reg);
34 extern WRegion *ioncore_await_focus();
35
36 /* Event handling */
37 extern void region_got_focus(WRegion *reg);
38 extern void region_lost_focus(WRegion *reg);
39
40 /* May reg transfer focus to its children? */
41 extern bool region_may_control_focus(WRegion *reg);
42 extern bool region_manager_is_focusnext(WRegion *reg);
43
44 /* Does reg have focus? */
45 extern bool region_is_active(WRegion *reg, bool pseudoact_ok);
46
47 /* Focus history */
48 extern void region_focuslist_remove_with_mgrs(WRegion *reg);
49 extern void region_focuslist_push(WRegion *reg);
50 extern void region_focuslist_move_after(WRegion *reg, WRegion *after);
51 extern void region_focuslist_deinit(WRegion *reg);
52
53 extern WRegion *ioncore_goto_previous();
54
55 /* Handlers to this hook should take WRegion* as parameter. */
56 extern WHook *region_do_warp_alt;
57
58 /* Misc. */
59 extern bool region_skip_focus(WRegion *reg);
60 WRegion *ioncore_current();
61
62 extern void region_pointer_focus_hack(WRegion *reg);
63
64 #endif /* ION_IONCORE_FOCUS_H */