diff options
author | wil <william.barsse@gmail.com> | 2016-12-10 16:44:43 +0100 |
---|---|---|
committer | wil <william.barsse@gmail.com> | 2016-12-29 20:31:30 +0100 |
commit | 97f7d47413967e2b6f405c4fa303850b7c56f57a (patch) | |
tree | 5237aea545fd2665b5e4a3967df5d6688d81858d /include | |
parent | Fix user-set LD_LIBRARY_PATH (diff) | |
download | sway-97f7d47413967e2b6f405c4fa303850b7c56f57a.tar.gz sway-97f7d47413967e2b6f405c4fa303850b7c56f57a.tar.zst sway-97f7d47413967e2b6f405c4fa303850b7c56f57a.zip |
Added Awesome/Monad type "auto" layouts
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/container.h | 17 | ||||
-rw-r--r-- | include/sway/layout.h | 3 |
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 { | |||
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 | |||
40 | // Keep last | 47 | // Keep last |
41 | L_LAYOUTS, | 48 | L_LAYOUTS, |
42 | }; | 49 | }; |
@@ -144,6 +151,16 @@ struct sway_container { | |||
144 | struct wlc_geometry title_bar_geometry; | 151 | struct wlc_geometry title_bar_geometry; |
145 | struct wlc_geometry actual_geometry; | 152 | struct wlc_geometry actual_geometry; |
146 | int border_thickness; | 153 | int border_thickness; |
154 | |||
155 | /** | ||
156 | * Number of master views in auto layouts. | ||
157 | */ | ||
158 | uint32_t nb_master; | ||
159 | |||
160 | /** | ||
161 | * Number of slave groups (e.g. columns) in auto layouts. | ||
162 | */ | ||
163 | uint32_t nb_slave_groups; | ||
147 | }; | 164 | }; |
148 | 165 | ||
149 | enum visibility_mask { | 166 | 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, .. | |||
75 | */ | 75 | */ |
76 | enum swayc_layouts default_layout(swayc_t *output); | 76 | enum swayc_layouts default_layout(swayc_t *output); |
77 | 77 | ||
78 | inline bool is_auto_layout(enum swayc_layouts layout) { | ||
79 | return (layout >= L_AUTO_LEFT) && (layout <= L_AUTO_BOTTOM); | ||
80 | } | ||
78 | #endif | 81 | #endif |