]> git.decadent.org.uk Git - ion3.git/blob - ioncore/focus.h
683d8aebba704b75ab14f74f0d46aa691e506227
[ion3.git] / ioncore / focus.h
1 /*
2  * ion/ioncore/focus.h
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2007. 
5  *
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.
10  */
11
12 #ifndef ION_IONCORE_FOCUS_H
13 #define ION_IONCORE_FOCUS_H
14
15 #include <libmainloop/hooks.h>
16 #include "common.h"
17 #include "window.h"
18 #include "region.h"
19
20
21 /* Delayed (until return to main loop) warp/focus */
22 extern void region_maybewarp(WRegion *reg, bool warp);
23 /* warp/focus now; do not skip enter window events etc. in mainloop */
24 extern void region_maybewarp_now(WRegion *reg, bool warp);
25
26 extern void region_warp(WRegion *reg); /* maybewarp TRUE */
27 extern void region_set_focus(WRegion *reg); /* maybewarp FALSE */
28
29 extern void region_finalise_focusing(WRegion* reg, Window win, bool warp);
30
31 DYNFUN void region_do_set_focus(WRegion *reg, bool warp);
32 extern void region_do_warp(WRegion *reg);
33 extern bool region_do_warp_default(WRegion *reg);
34
35 /* Awaiting focus state */
36 extern void region_set_await_focus(WRegion *reg);
37 extern WRegion *ioncore_await_focus();
38
39 /* Event handling */
40 extern void region_got_focus(WRegion *reg);
41 extern void region_lost_focus(WRegion *reg);
42
43 /* May reg transfer focus to its children? */
44 extern bool region_may_control_focus(WRegion *reg);
45
46 /* Does reg have focus? */
47 extern bool region_is_active(WRegion *reg);
48
49 /* Focus history */
50 extern void region_focuslist_remove_with_mgrs(WRegion *reg);
51 extern void region_focuslist_push(WRegion *reg);
52 extern void region_focuslist_move_after(WRegion *reg, WRegion *after);
53 extern void region_focuslist_deinit(WRegion *reg);
54
55 extern WRegion *ioncore_goto_previous();
56
57 /* Handlers to this hook should take WRegion* as parameter. */
58 extern WHook *region_do_warp_alt;
59
60 /* Misc. */
61 extern bool region_skip_focus(WRegion *reg);
62 WRegion *ioncore_current();
63
64 extern void region_pointer_focus_hack(WRegion *reg);
65
66 #endif /* ION_IONCORE_FOCUS_H */