summaryrefslogtreecommitdiff
path: root/include/sway/tree/container.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/tree/container.h')
-rw-r--r--include/sway/tree/container.h51
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;
struct sway_workspace;
struct sway_view;
-enum movement_direction;
enum wlr_direction;
struct sway_container_state {
@@ -54,16 +53,16 @@ struct sway_container_state {
struct sway_container *focused_inactive_child;
bool focused;
- // View properties
- double view_x, view_y;
- double view_width, view_height;
-
enum sway_container_border border;
int border_thickness;
bool border_top;
bool border_bottom;
bool border_left;
bool border_right;
+
+ // View properties
+ double view_x, view_y;
+ double view_width, view_height;
};
struct sway_container {
@@ -92,6 +91,18 @@ struct sway_container {
bool is_fullscreen;
+ enum sway_container_border border;
+
+ // Used when the view changes to CSD unexpectedly. This will be a non-B_CSD
+ // border which we use to restore when the view returns to SSD.
+ enum sway_container_border saved_border;
+
+ int border_thickness;
+ bool border_top;
+ bool border_bottom;
+ bool border_left;
+ bool border_right;
+
// The gaps currently applied to the container.
double current_gaps;
@@ -116,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;
@@ -287,12 +304,32 @@ void container_detach(struct sway_container *child);
void container_replace(struct sway_container *container,
struct sway_container *replacement);
-bool sway_dir_to_wlr(enum movement_direction dir, enum wlr_direction *out);
-
struct sway_container *container_split(struct sway_container *child,
enum sway_container_layout layout);
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