4 * Copyright (c) Tuomo Valkonen 1999-2009.
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
, 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();
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
);
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
;
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 */