diff options
author | 2015-08-18 07:02:31 -0400 | |
---|---|---|
committer | 2015-08-18 07:02:31 -0400 | |
commit | 2f6dd0687bac748f414e5deb090f38d755f66d29 (patch) | |
tree | 098ea31107357e0ebedd5435d870f11fe4b60836 /include/focus.h | |
parent | Fix #64 (diff) | |
parent | minor fixes (diff) | |
download | sway-2f6dd0687bac748f414e5deb090f38d755f66d29.tar.gz sway-2f6dd0687bac748f414e5deb090f38d755f66d29.tar.zst sway-2f6dd0687bac748f414e5deb090f38d755f66d29.zip |
Merge pull request #65 from taiyu-len/focus_v2
Focus v2
Diffstat (limited to 'include/focus.h')
-rw-r--r-- | include/focus.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/focus.h b/include/focus.h new file mode 100644 index 00000000..185910f3 --- /dev/null +++ b/include/focus.h | |||
@@ -0,0 +1,36 @@ | |||
1 | #ifndef _SWAY_FOCUS_H | ||
2 | #define _SWAY_FOCUS_H | ||
3 | #include "container.h" | ||
4 | |||
5 | enum movement_direction { | ||
6 | MOVE_LEFT, | ||
7 | MOVE_RIGHT, | ||
8 | MOVE_UP, | ||
9 | MOVE_DOWN, | ||
10 | MOVE_PARENT | ||
11 | }; | ||
12 | |||
13 | //focused_container - the container found by following the `focused` pointer | ||
14 | //from a given container to a container with `is_focused` boolean set | ||
15 | //--- | ||
16 | //focused_view - the container found by following the `focused` pointer from a | ||
17 | //given container to a view. | ||
18 | //--- | ||
19 | |||
20 | swayc_t *get_focused_container(swayc_t *parent); | ||
21 | swayc_t *get_focused_view(swayc_t *parent); | ||
22 | |||
23 | void set_focused_container(swayc_t *container); | ||
24 | void set_focused_container_for(swayc_t *ancestor, swayc_t *container); | ||
25 | |||
26 | //lock focused container/view. locked by windows with OVERRIDE attribute | ||
27 | //and unlocked when they are destroyed | ||
28 | |||
29 | extern bool locked_container_focus; | ||
30 | extern bool locked_view_focus; | ||
31 | |||
32 | |||
33 | bool move_focus(enum movement_direction direction); | ||
34 | |||
35 | #endif | ||
36 | |||