diff options
Diffstat (limited to 'include/sway/tree/container.h')
-rw-r--r-- | include/sway/tree/container.h | 51 |
1 files changed, 44 insertions, 7 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 920ef038..4366a010 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h | |||
@@ -36,7 +36,6 @@ struct sway_output; | |||
36 | struct sway_workspace; | 36 | struct sway_workspace; |
37 | struct sway_view; | 37 | struct sway_view; |
38 | 38 | ||
39 | enum movement_direction; | ||
40 | enum wlr_direction; | 39 | enum wlr_direction; |
41 | 40 | ||
42 | struct sway_container_state { | 41 | struct sway_container_state { |
@@ -54,16 +53,16 @@ struct sway_container_state { | |||
54 | struct sway_container *focused_inactive_child; | 53 | struct sway_container *focused_inactive_child; |
55 | bool focused; | 54 | bool focused; |
56 | 55 | ||
57 | // View properties | ||
58 | double view_x, view_y; | ||
59 | double view_width, view_height; | ||
60 | |||
61 | enum sway_container_border border; | 56 | enum sway_container_border border; |
62 | int border_thickness; | 57 | int border_thickness; |
63 | bool border_top; | 58 | bool border_top; |
64 | bool border_bottom; | 59 | bool border_bottom; |
65 | bool border_left; | 60 | bool border_left; |
66 | bool border_right; | 61 | bool border_right; |
62 | |||
63 | // View properties | ||
64 | double view_x, view_y; | ||
65 | double view_width, view_height; | ||
67 | }; | 66 | }; |
68 | 67 | ||
69 | struct sway_container { | 68 | struct sway_container { |
@@ -92,6 +91,18 @@ struct sway_container { | |||
92 | 91 | ||
93 | bool is_fullscreen; | 92 | bool is_fullscreen; |
94 | 93 | ||
94 | enum sway_container_border border; | ||
95 | |||
96 | // Used when the view changes to CSD unexpectedly. This will be a non-B_CSD | ||
97 | // border which we use to restore when the view returns to SSD. | ||
98 | enum sway_container_border saved_border; | ||
99 | |||
100 | int border_thickness; | ||
101 | bool border_top; | ||
102 | bool border_bottom; | ||
103 | bool border_left; | ||
104 | bool border_right; | ||
105 | |||
95 | // The gaps currently applied to the container. | 106 | // The gaps currently applied to the container. |
96 | double current_gaps; | 107 | double current_gaps; |
97 | 108 | ||
@@ -116,6 +127,12 @@ struct sway_container { | |||
116 | size_t title_height; | 127 | size_t title_height; |
117 | size_t title_baseline; | 128 | size_t title_baseline; |
118 | 129 | ||
130 | list_t *marks; // char * | ||
131 | struct wlr_texture *marks_focused; | ||
132 | struct wlr_texture *marks_focused_inactive; | ||
133 | struct wlr_texture *marks_unfocused; | ||
134 | struct wlr_texture *marks_urgent; | ||
135 | |||
119 | struct { | 136 | struct { |
120 | struct wl_signal destroy; | 137 | struct wl_signal destroy; |
121 | } events; | 138 | } events; |
@@ -287,12 +304,32 @@ void container_detach(struct sway_container *child); | |||
287 | void container_replace(struct sway_container *container, | 304 | void container_replace(struct sway_container *container, |
288 | struct sway_container *replacement); | 305 | struct sway_container *replacement); |
289 | 306 | ||
290 | bool sway_dir_to_wlr(enum movement_direction dir, enum wlr_direction *out); | ||
291 | |||
292 | struct sway_container *container_split(struct sway_container *child, | 307 | struct sway_container *container_split(struct sway_container *child, |
293 | enum sway_container_layout layout); | 308 | enum sway_container_layout layout); |
294 | 309 | ||
295 | bool container_is_transient_for(struct sway_container *child, | 310 | bool container_is_transient_for(struct sway_container *child, |
296 | struct sway_container *ancestor); | 311 | struct sway_container *ancestor); |
297 | 312 | ||
313 | /** | ||
314 | * Find any container that has the given mark and return it. | ||
315 | */ | ||
316 | struct sway_container *container_find_mark(char *mark); | ||
317 | |||
318 | /** | ||
319 | * Find any container that has the given mark and remove the mark from the | ||
320 | * container. Returns true if it matched a container. | ||
321 | */ | ||
322 | bool container_find_and_unmark(char *mark); | ||
323 | |||
324 | /** | ||
325 | * Remove all marks from the container. | ||
326 | */ | ||
327 | void container_clear_marks(struct sway_container *container); | ||
328 | |||
329 | bool container_has_mark(struct sway_container *container, char *mark); | ||
330 | |||
331 | void container_add_mark(struct sway_container *container, char *mark); | ||
332 | |||
333 | void container_update_marks_textures(struct sway_container *container); | ||
334 | |||
298 | #endif | 335 | #endif |