aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/old/focus.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/old/focus.h')
-rw-r--r--include/sway/old/focus.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/sway/old/focus.h b/include/sway/old/focus.h
new file mode 100644
index 00000000..652cdccc
--- /dev/null
+++ b/include/sway/old/focus.h
@@ -0,0 +1,45 @@
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 MOVE_NEXT,
11 MOVE_PREV,
12 MOVE_FIRST
13};
14
15#include "container.h"
16
17// focused_container - the container found by following the `focused` pointer
18// from a given container to a container with `is_focused` boolean set
19// ---
20// focused_view - the container found by following the `focused` pointer from a
21// given container to a view.
22// ---
23
24swayc_t *get_focused_container(swayc_t *parent);
25swayc_t *get_focused_view(swayc_t *parent);
26swayc_t *get_focused_float(swayc_t *ws);
27
28// a special-case function to get the focused view, regardless
29// of whether it's tiled or floating
30swayc_t *get_focused_view_include_floating(swayc_t *parent);
31
32bool set_focused_container(swayc_t *container);
33bool set_focused_container_for(swayc_t *ancestor, swayc_t *container);
34
35// lock focused container/view. locked by windows with OVERRIDE attribute
36// and unlocked when they are destroyed
37
38extern bool locked_container_focus;
39
40// Prevents wss from being destroyed on focus switch
41extern bool suspend_workspace_cleanup;
42
43bool move_focus(enum movement_direction direction);
44
45#endif