aboutsummaryrefslogtreecommitdiffstats
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.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 728daa84..2a4be18c 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -68,6 +68,9 @@ struct sway_container_state {
68 struct sway_container *parent; 68 struct sway_container *parent;
69 list_t *children; 69 list_t *children;
70 70
71 struct sway_container *focused_inactive_child;
72 bool focused;
73
71 // View properties 74 // View properties
72 double view_x, view_y; 75 double view_x, view_y;
73 double view_width, view_height; 76 double view_width, view_height;
@@ -132,6 +135,11 @@ struct sway_container {
132 135
133 struct sway_container *parent; 136 struct sway_container *parent;
134 137
138 // Indicates that the container is a scratchpad container.
139 // Both hidden and visible scratchpad containers have scratchpad=true.
140 // Hidden scratchpad containers have a NULL parent.
141 bool scratchpad;
142
135 float alpha; 143 float alpha;
136 144
137 struct wlr_texture *title_focused; 145 struct wlr_texture *title_focused;
@@ -144,6 +152,10 @@ struct sway_container {
144 152
145 bool destroying; 153 bool destroying;
146 154
155 // If true, indicates that the container has pending state that differs from
156 // the current.
157 bool dirty;
158
147 struct { 159 struct {
148 struct wl_signal destroy; 160 struct wl_signal destroy;
149 // Raised after the tree updates, but before arrange_windows 161 // Raised after the tree updates, but before arrange_windows
@@ -297,4 +309,30 @@ bool container_is_floating(struct sway_container *container);
297 */ 309 */
298void container_get_box(struct sway_container *container, struct wlr_box *box); 310void container_get_box(struct sway_container *container, struct wlr_box *box);
299 311
312/**
313 * Move a floating container by the specified amount.
314 */
315void container_floating_translate(struct sway_container *con,
316 double x_amount, double y_amount);
317
318/**
319 * Move a floating container to a new layout-local position.
320 */
321void container_floating_move_to(struct sway_container *con,
322 double lx, double ly);
323
324/**
325 * Mark a container as dirty if it isn't already. Dirty containers will be
326 * included in the next transaction then unmarked as dirty.
327 */
328void container_set_dirty(struct sway_container *container);
329
330bool container_has_urgent_child(struct sway_container *container);
331
332/**
333 * If the container is involved in a drag or resize operation via a mouse, this
334 * ends the operation.
335 */
336void container_end_mouse_operation(struct sway_container *container);
337
300#endif 338#endif