diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2015-08-18 00:28:44 -0700 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2015-08-18 00:28:44 -0700 |
| commit | a22fc48aa257c7166168f0b46ae80845ff4b208a (patch) | |
| tree | b0f9bb55eb8c2448139dc63447edf01ffab7fb58 /include/focus.h | |
| parent | d08935892c85b8d81ded9481f74faacb42357edf (diff) | |
changed handling of focus, handling of view by type
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 @@ +#ifndef _SWAY_FOCUS_H +#define _SWAY_FOCUS_H +#include "container.h" + +enum movement_direction { + MOVE_LEFT, + MOVE_RIGHT, + MOVE_UP, + MOVE_DOWN, + MOVE_PARENT +}; + +//focused_container - the container found by following the `focused` pointer +//from a given container to a container with `is_focused` boolean set +//--- +//focused_view - the container found by following the `focused` pointer from a +//given container to a view. +//--- + +swayc_t *get_focused_container(swayc_t *parent); +swayc_t *get_focused_view(swayc_t *parent); + +void set_focused_container(swayc_t *container); +void set_focused_container_for(swayc_t *ancestor, swayc_t *container); + +//lock focused container/view. locked by windows with OVERRIDE attribute +//and unlocked when they are destroyed + +extern bool locked_container_focus; +extern bool locked_view_focus; + + +bool move_focus(enum movement_direction direction); + +#endif + |
