Add comments to fork() logic for readibility
[notion/jeffpc.git] / ioncore / focus.h
blobfa7960fc2371c0f63b0f965b5a160567f1f7ad70
1 /*
2 * ion/ioncore/focus.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
9 #ifndef ION_IONCORE_FOCUS_H
10 #define ION_IONCORE_FOCUS_H
12 #include <libmainloop/hooks.h>
13 #include "common.h"
14 #include "window.h"
15 #include "region.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, Time time, int set_input);
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();
36 /* Event handling */
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);
42 extern bool region_manager_is_focusnext(WRegion *reg);
44 /* Does reg have focus? */
45 extern bool region_is_active(WRegion *reg, bool pseudoact_ok);
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);
53 extern WRegion *ioncore_goto_previous();
55 /* Handlers to this hook should take WRegion* as parameter. */
56 extern WHook *region_do_warp_alt;
58 /* Misc. */
59 extern bool region_skip_focus(WRegion *reg);
60 WRegion *ioncore_current();
62 extern void region_pointer_focus_hack(WRegion *reg);
64 #endif /* ION_IONCORE_FOCUS_H */