summaryrefslogtreecommitdiff
path: root/include/sway/focus.h
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2016-09-01 08:18:37 -0400
committerDrew DeVault <[email protected]>2016-09-01 08:18:37 -0400
commit416417a54c5875abcdc257b6ad10ff086c35eefc (patch)
tree00f20884a05d05e620a4a24bba8595557cd41405 /include/sway/focus.h
parent729fdf7d9186ceba0f84b87edfd473642964227f (diff)
Reorganize includes
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 @@
+#ifndef _SWAY_FOCUS_H
+#define _SWAY_FOCUS_H
+enum movement_direction {
+ MOVE_LEFT,
+ MOVE_RIGHT,
+ MOVE_UP,
+ MOVE_DOWN,
+ MOVE_PARENT,
+ MOVE_CHILD
+};
+
+#include "container.h"
+
+// 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);
+swayc_t *get_focused_float(swayc_t *ws);
+
+// a special-case function to get the focused view, regardless
+// of whether it's tiled or floating
+swayc_t *get_focused_view_include_floating(swayc_t *parent);
+
+bool set_focused_container(swayc_t *container);
+bool 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;
+
+// Prevents wss from being destroyed on focus switch
+extern bool suspend_workspace_cleanup;
+
+bool move_focus(enum movement_direction direction);
+
+#endif
+