4 * Copyright (c) Tuomo Valkonen 1999-2006.
6 * Ion is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
12 #ifndef ION_IONCORE_FOCUS_H
13 #define ION_IONCORE_FOCUS_H
15 #include <libmainloop/hooks.h>
20 DYNFUN void region_do_set_focus(WRegion *reg, bool warp);
22 /* Delayed (until return to main loop) warp/focus */
23 extern void region_warp(WRegion *reg);
24 extern void region_set_focus(WRegion *reg);
25 extern void region_maybewarp(WRegion *reg, bool warp);
27 /* Immediate warp/focus */
28 extern void region_do_warp(WRegion *reg);
29 extern bool region_do_warp_default(WRegion *reg);
31 extern void region_finalise_focusing(WRegion* reg, Window win, bool warp);
33 /* Awaiting focus state */
34 extern void region_set_await_focus(WRegion *reg);
35 extern bool ioncore_await_focus();
38 extern void region_got_focus(WRegion *reg);
39 extern void region_lost_focus(WRegion *reg);
41 /* May reg transfer focus to its children? */
42 extern bool region_may_control_focus(WRegion *reg);
44 /* Does reg have focus? */
45 extern bool region_is_active(WRegion *reg);
48 extern void region_focuslist_remove(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);
53 extern WRegion *ioncore_goto_previous();
55 /* Handlers to these shook should take WRegion* as parameter. */
56 extern WHook *region_do_warp_alt;
57 extern WHook *region_activated_hook;
58 extern WHook *region_inactivated_hook;
61 extern bool region_skip_focus(WRegion *reg);
62 WRegion *ioncore_current();
64 #endif /* ION_IONCORE_FOCUS_H */