summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/list.h2
-rw-r--r--include/sway/container.h20
-rw-r--r--include/sway/focus.h6
-rw-r--r--include/sway/layout.h7
4 files changed, 33 insertions, 2 deletions
diff --git a/include/list.h b/include/list.h
index f478b6bb..7eead4ac 100644
--- a/include/list.h
+++ b/include/list.h
@@ -22,4 +22,6 @@ void list_qsort(list_t *list, int compare(const void *left, const void *right));
22int list_seq_find(list_t *list, int compare(const void *item, const void *cmp_to), const void *cmp_to); 22int list_seq_find(list_t *list, int compare(const void *item, const void *cmp_to), const void *cmp_to);
23// stable sort since qsort is not guaranteed to be stable 23// stable sort since qsort is not guaranteed to be stable
24void list_stable_sort(list_t *list, int compare(const void *a, const void *b)); 24void list_stable_sort(list_t *list, int compare(const void *a, const void *b));
25// swap two elements in a list
26void list_swap(list_t *list, int src, int dest);
25#endif 27#endif
diff --git a/include/sway/container.h b/include/sway/container.h
index 2bedd136..ff65628c 100644
--- a/include/sway/container.h
+++ b/include/sway/container.h
@@ -37,6 +37,16 @@ enum swayc_layouts {
37 L_STACKED, 37 L_STACKED,
38 L_TABBED, 38 L_TABBED,
39 L_FLOATING, /**< A psuedo-container, removed from the tree, to hold floating windows */ 39 L_FLOATING, /**< A psuedo-container, removed from the tree, to hold floating windows */
40
41 /* Awesome/Monad style auto layouts */
42 L_AUTO_LEFT,
43 L_AUTO_RIGHT,
44 L_AUTO_TOP,
45 L_AUTO_BOTTOM,
46
47 L_AUTO_FIRST = L_AUTO_LEFT,
48 L_AUTO_LAST = L_AUTO_BOTTOM,
49
40 // Keep last 50 // Keep last
41 L_LAYOUTS, 51 L_LAYOUTS,
42}; 52};
@@ -144,6 +154,16 @@ struct sway_container {
144 struct wlc_geometry title_bar_geometry; 154 struct wlc_geometry title_bar_geometry;
145 struct wlc_geometry actual_geometry; 155 struct wlc_geometry actual_geometry;
146 int border_thickness; 156 int border_thickness;
157
158 /**
159 * Number of master views in auto layouts.
160 */
161 size_t nb_master;
162
163 /**
164 * Number of slave groups (e.g. columns) in auto layouts.
165 */
166 size_t nb_slave_groups;
147}; 167};
148 168
149enum visibility_mask { 169enum visibility_mask {
diff --git a/include/sway/focus.h b/include/sway/focus.h
index b532edc2..652cdccc 100644
--- a/include/sway/focus.h
+++ b/include/sway/focus.h
@@ -6,7 +6,10 @@ enum movement_direction {
6 MOVE_UP, 6 MOVE_UP,
7 MOVE_DOWN, 7 MOVE_DOWN,
8 MOVE_PARENT, 8 MOVE_PARENT,
9 MOVE_CHILD 9 MOVE_CHILD,
10 MOVE_NEXT,
11 MOVE_PREV,
12 MOVE_FIRST
10}; 13};
11 14
12#include "container.h" 15#include "container.h"
@@ -40,4 +43,3 @@ extern bool suspend_workspace_cleanup;
40bool move_focus(enum movement_direction direction); 43bool move_focus(enum movement_direction direction);
41 44
42#endif 45#endif
43
diff --git a/include/sway/layout.h b/include/sway/layout.h
index b982365c..fbedcdb3 100644
--- a/include/sway/layout.h
+++ b/include/sway/layout.h
@@ -75,4 +75,11 @@ void swayc_log(log_importance_t verbosity, swayc_t *cont, const char* format, ..
75 */ 75 */
76enum swayc_layouts default_layout(swayc_t *output); 76enum swayc_layouts default_layout(swayc_t *output);
77 77
78bool is_auto_layout(enum swayc_layouts layout);
79int auto_group_start_index(const swayc_t *container, int index);
80int auto_group_end_index(const swayc_t *container, int index);
81size_t auto_group_count(const swayc_t *container);
82size_t auto_group_index(const swayc_t *container, int index);
83bool auto_group_bounds(const swayc_t *container, size_t group_index, int *start, int *end);
84
78#endif 85#endif