aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/tree/container.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-31 21:27:38 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-11-01 18:09:51 +1000
commit9fc736f4e1804b06538191786500f927ba0cda13 (patch)
tree8399de2ba00a8a0dd57f49dfc30455c330500b54 /include/sway/tree/container.h
parentMerge pull request #3040 from RyanDwyer/border-props-to-container (diff)
downloadsway-9fc736f4e1804b06538191786500f927ba0cda13.tar.gz
sway-9fc736f4e1804b06538191786500f927ba0cda13.tar.zst
sway-9fc736f4e1804b06538191786500f927ba0cda13.zip
Move view marks properties to container struct
Like border properties, this will be needed to implement layout saving and restoring.
Diffstat (limited to 'include/sway/tree/container.h')
-rw-r--r--include/sway/tree/container.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index c0c803f1..4366a010 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -127,6 +127,12 @@ struct sway_container {
127 size_t title_height; 127 size_t title_height;
128 size_t title_baseline; 128 size_t title_baseline;
129 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
130 struct { 136 struct {
131 struct wl_signal destroy; 137 struct wl_signal destroy;
132 } events; 138 } events;
@@ -304,4 +310,26 @@ struct sway_container *container_split(struct sway_container *child,
304bool container_is_transient_for(struct sway_container *child, 310bool container_is_transient_for(struct sway_container *child,
305 struct sway_container *ancestor); 311 struct sway_container *ancestor);
306 312
313/**
314 * Find any container that has the given mark and return it.
315 */
316struct 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 */
322bool container_find_and_unmark(char *mark);
323
324/**
325 * Remove all marks from the container.
326 */
327void container_clear_marks(struct sway_container *container);
328
329bool container_has_mark(struct sway_container *container, char *mark);
330
331void container_add_mark(struct sway_container *container, char *mark);
332
333void container_update_marks_textures(struct sway_container *container);
334
307#endif 335#endif