From 9fc736f4e1804b06538191786500f927ba0cda13 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 31 Oct 2018 21:27:38 +1000 Subject: Move view marks properties to container struct Like border properties, this will be needed to implement layout saving and restoring. --- include/sway/tree/container.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'include/sway/tree/container.h') 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 { size_t title_height; size_t title_baseline; + list_t *marks; // char * + struct wlr_texture *marks_focused; + struct wlr_texture *marks_focused_inactive; + struct wlr_texture *marks_unfocused; + struct wlr_texture *marks_urgent; + struct { struct wl_signal destroy; } events; @@ -304,4 +310,26 @@ struct sway_container *container_split(struct sway_container *child, bool container_is_transient_for(struct sway_container *child, struct sway_container *ancestor); +/** + * Find any container that has the given mark and return it. + */ +struct sway_container *container_find_mark(char *mark); + +/** + * Find any container that has the given mark and remove the mark from the + * container. Returns true if it matched a container. + */ +bool container_find_and_unmark(char *mark); + +/** + * Remove all marks from the container. + */ +void container_clear_marks(struct sway_container *container); + +bool container_has_mark(struct sway_container *container, char *mark); + +void container_add_mark(struct sway_container *container, char *mark); + +void container_update_marks_textures(struct sway_container *container); + #endif -- cgit v1.2.3