aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorwil <william.barsse@gmail.com>2016-12-10 16:44:43 +0100
committerwil <william.barsse@gmail.com>2016-12-29 20:31:30 +0100
commit97f7d47413967e2b6f405c4fa303850b7c56f57a (patch)
tree5237aea545fd2665b5e4a3967df5d6688d81858d /include
parent6a1df17fb7f7bcfa26d825173de4d31b771fd7a6 (diff)
Added Awesome/Monad type "auto" layouts
Diffstat (limited to 'include')
-rw-r--r--include/sway/container.h17
-rw-r--r--include/sway/layout.h3
2 files changed, 20 insertions, 0 deletions
diff --git a/include/sway/container.h b/include/sway/container.h
index 2bedd136..1d0fb265 100644
--- a/include/sway/container.h
+++ b/include/sway/container.h
@@ -37,6 +37,13 @@ enum swayc_layouts {
L_STACKED,
L_TABBED,
L_FLOATING, /**< A psuedo-container, removed from the tree, to hold floating windows */
+
+ /* Awesome/Monad style auto layouts */
+ L_AUTO_LEFT,
+ L_AUTO_RIGHT,
+ L_AUTO_TOP,
+ L_AUTO_BOTTOM,
+
// Keep last
L_LAYOUTS,
};
@@ -144,6 +151,16 @@ struct sway_container {
struct wlc_geometry title_bar_geometry;
struct wlc_geometry actual_geometry;
int border_thickness;
+
+ /**
+ * Number of master views in auto layouts.
+ */
+ uint32_t nb_master;
+
+ /**
+ * Number of slave groups (e.g. columns) in auto layouts.
+ */
+ uint32_t nb_slave_groups;
};
enum visibility_mask {
diff --git a/include/sway/layout.h b/include/sway/layout.h
index b982365c..38096947 100644
--- a/include/sway/layout.h
+++ b/include/sway/layout.h
@@ -75,4 +75,7 @@ void swayc_log(log_importance_t verbosity, swayc_t *cont, const char* format, ..
*/
enum swayc_layouts default_layout(swayc_t *output);
+inline bool is_auto_layout(enum swayc_layouts layout) {
+ return (layout >= L_AUTO_LEFT) && (layout <= L_AUTO_BOTTOM);
+}
#endif