summaryrefslogtreecommitdiffstats
path: root/include/sway/focus.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/focus.h')
-rw-r--r--include/sway/focus.h43
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
3enum 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
21swayc_t *get_focused_container(swayc_t *parent);
22swayc_t *get_focused_view(swayc_t *parent);
23swayc_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
27swayc_t *get_focused_view_include_floating(swayc_t *parent);
28
29bool set_focused_container(swayc_t *container);
30bool 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
35extern bool locked_container_focus;
36
37// Prevents wss from being destroyed on focus switch
38extern bool suspend_workspace_cleanup;
39
40bool move_focus(enum movement_direction direction);
41
42#endif
43