]> git.decadent.org.uk Git - ion3.git/blob - ioncore/focus.h
[svn-upgrade] Integrating new upstream version, ion3 (20070506)
[ion3.git] / ioncore / focus.h
1 /*
2  * ion/ioncore/focus.h
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2007. 
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
43 /* Does reg have focus? */
44 extern bool region_is_active(WRegion *reg);
45
46 /* Focus history */
47 extern void region_focuslist_remove_with_mgrs(WRegion *reg);
48 extern void region_focuslist_push(WRegion *reg);
49 extern void region_focuslist_move_after(WRegion *reg, WRegion *after);
50 extern void region_focuslist_deinit(WRegion *reg);
51
52 extern WRegion *ioncore_goto_previous();
53
54 /* Handlers to this hook should take WRegion* as parameter. */
55 extern WHook *region_do_warp_alt;
56
57 /* Misc. */
58 extern bool region_skip_focus(WRegion *reg);
59 WRegion *ioncore_current();
60
61 extern void region_pointer_focus_hack(WRegion *reg);
62
63 #endif /* ION_IONCORE_FOCUS_H */