4 * Copyright (c) Tuomo Valkonen 1999-2007.
6 * See the included file LICENSE for details.
9 #ifndef ION_IONCORE_FOCUS_H
10 #define ION_IONCORE_FOCUS_H
12 #include <libmainloop/hooks.h>
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);
23 extern void region_warp(WRegion *reg); /* maybewarp TRUE */
24 extern void region_set_focus(WRegion *reg); /* maybewarp FALSE */
26 extern void region_finalise_focusing(WRegion* reg, Window win, bool warp);
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);
32 /* Awaiting focus state */
33 extern void region_set_await_focus(WRegion *reg);
34 extern WRegion *ioncore_await_focus();
37 extern void region_got_focus(WRegion *reg);
38 extern void region_lost_focus(WRegion *reg);
40 /* May reg transfer focus to its children? */
41 extern bool region_may_control_focus(WRegion *reg);
43 /* Does reg have focus? */
44 extern bool region_is_active(WRegion *reg, bool pseudoact_ok);
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);
52 extern WRegion *ioncore_goto_previous();
54 /* Handlers to this hook should take WRegion* as parameter. */
55 extern WHook *region_do_warp_alt;
58 extern bool region_skip_focus(WRegion *reg);
59 WRegion *ioncore_current();
61 extern void region_pointer_focus_hack(WRegion *reg);
63 #endif /* ION_IONCORE_FOCUS_H */