diff options
Diffstat (limited to 'include/sway/focus.h')
-rw-r--r-- | include/sway/focus.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/include/sway/focus.h b/include/sway/focus.h new file mode 100644 index 00000000..b532edc2 --- /dev/null +++ b/include/sway/focus.h | |||
@@ -0,0 +1,43 @@ | |||
1 | #ifndef _SWAY_FOCUS_H | ||
2 | #define _SWAY_FOCUS_H | ||
3 | enum movement_direction { | ||
4 | MOVE_LEFT, | ||
5 | MOVE_RIGHT, | ||
6 | MOVE_UP, | ||
7 | MOVE_DOWN, | ||
8 | MOVE_PARENT, | ||
9 | MOVE_CHILD | ||
10 | }; | ||
11 | |||
12 | #include "container.h" | ||
13 | |||
14 | // focused_container - the container found by following the `focused` pointer | ||
15 | // from a given container to a container with `is_focused` boolean set | ||
16 | // --- | ||
17 | // focused_view - the container found by following the `focused` pointer from a | ||
18 | // given container to a view. | ||
19 | // --- | ||
20 | |||
21 | swayc_t *get_focused_container(swayc_t *parent); | ||
22 | swayc_t *get_focused_view(swayc_t *parent); | ||
23 | swayc_t *get_focused_float(swayc_t *ws); | ||
24 | |||
25 | // a special-case function to get the focused view, regardless | ||
26 | // of whether it's tiled or floating | ||
27 | swayc_t *get_focused_view_include_floating(swayc_t *parent); | ||
28 | |||
29 | bool set_focused_container(swayc_t *container); | ||
30 | bool set_focused_container_for(swayc_t *ancestor, swayc_t *container); | ||
31 | |||
32 | // lock focused container/view. locked by windows with OVERRIDE attribute | ||
33 | // and unlocked when they are destroyed | ||
34 | |||
35 | extern bool locked_container_focus; | ||
36 | |||
37 | // Prevents wss from being destroyed on focus switch | ||
38 | extern bool suspend_workspace_cleanup; | ||
39 | |||
40 | bool move_focus(enum movement_direction direction); | ||
41 | |||
42 | #endif | ||
43 | |||