aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Alexander Orzechowski <alex@ozal.ski>2023-11-21 19:51:57 -0500
committerLibravatar Kirill Primak <vyivel@eclair.cafe>2024-01-18 18:36:54 +0300
commit6d7b1321db54155cf78305dbafdcfc7de9b78415 (patch)
treeacf9f02681b1d5a40416be5f4151641920176a93 /include
parentscene_graph: Port layer_shell (diff)
downloadsway-6d7b1321db54155cf78305dbafdcfc7de9b78415.tar.gz
sway-6d7b1321db54155cf78305dbafdcfc7de9b78415.tar.zst
sway-6d7b1321db54155cf78305dbafdcfc7de9b78415.zip
scene_graph: Port container server side decorations
Diffstat (limited to 'include')
-rw-r--r--include/sway/tree/container.h37
1 files changed, 13 insertions, 24 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 6f72439c..4920e064 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -76,6 +76,9 @@ struct sway_container {
76 76
77 struct wlr_scene_tree *border; 77 struct wlr_scene_tree *border;
78 struct wlr_scene_tree *background; 78 struct wlr_scene_tree *background;
79
80 struct sway_text_node *title_text;
81 struct sway_text_node *marks_text;
79 } title_bar; 82 } title_bar;
80 83
81 struct { 84 struct {
@@ -94,6 +97,7 @@ struct sway_container {
94 97
95 char *title; // The view's title (unformatted) 98 char *title; // The view's title (unformatted)
96 char *formatted_title; // The title displayed in the title bar 99 char *formatted_title; // The title displayed in the title bar
100 int title_width;
97 101
98 enum sway_container_layout prev_split_layout; 102 enum sway_container_layout prev_split_layout;
99 103
@@ -141,18 +145,7 @@ struct sway_container {
141 145
142 float alpha; 146 float alpha;
143 147
144 struct wlr_texture *title_focused;
145 struct wlr_texture *title_focused_inactive;
146 struct wlr_texture *title_focused_tab_title;
147 struct wlr_texture *title_unfocused;
148 struct wlr_texture *title_urgent;
149
150 list_t *marks; // char * 148 list_t *marks; // char *
151 struct wlr_texture *marks_focused;
152 struct wlr_texture *marks_focused_inactive;
153 struct wlr_texture *marks_focused_tab_title;
154 struct wlr_texture *marks_unfocused;
155 struct wlr_texture *marks_urgent;
156 149
157 struct { 150 struct {
158 struct wl_signal destroy; 151 struct wl_signal destroy;
@@ -194,7 +187,9 @@ void container_reap_empty(struct sway_container *con);
194 187
195struct sway_container *container_flatten(struct sway_container *container); 188struct sway_container *container_flatten(struct sway_container *container);
196 189
197void container_update_title_textures(struct sway_container *container); 190void container_update_title_bar(struct sway_container *container);
191
192void container_update_marks(struct sway_container *container);
198 193
199size_t container_build_representation(enum sway_container_layout layout, 194size_t container_build_representation(enum sway_container_layout layout,
200 list_t *children, char *buffer); 195 list_t *children, char *buffer);
@@ -231,11 +226,6 @@ void container_set_geometry_from_content(struct sway_container *con);
231bool container_is_floating(struct sway_container *container); 226bool container_is_floating(struct sway_container *container);
232 227
233/** 228/**
234 * Same as above, but for current container state.
235 */
236bool container_is_current_floating(struct sway_container *container);
237
238/**
239 * Get a container's box in layout coordinates. 229 * Get a container's box in layout coordinates.
240 */ 230 */
241void container_get_box(struct sway_container *container, struct wlr_box *box); 231void container_get_box(struct sway_container *container, struct wlr_box *box);
@@ -308,15 +298,10 @@ void container_discover_outputs(struct sway_container *con);
308 298
309enum sway_container_layout container_parent_layout(struct sway_container *con); 299enum sway_container_layout container_parent_layout(struct sway_container *con);
310 300
311enum sway_container_layout container_current_parent_layout(
312 struct sway_container *con);
313
314list_t *container_get_siblings(struct sway_container *container); 301list_t *container_get_siblings(struct sway_container *container);
315 302
316int container_sibling_index(struct sway_container *child); 303int container_sibling_index(struct sway_container *child);
317 304
318list_t *container_get_current_siblings(struct sway_container *container);
319
320void container_handle_fullscreen_reparent(struct sway_container *con); 305void container_handle_fullscreen_reparent(struct sway_container *con);
321 306
322void container_add_child(struct sway_container *parent, 307void container_add_child(struct sway_container *parent,
@@ -364,8 +349,6 @@ bool container_has_mark(struct sway_container *container, char *mark);
364 349
365void container_add_mark(struct sway_container *container, char *mark); 350void container_add_mark(struct sway_container *container, char *mark);
366 351
367void container_update_marks_textures(struct sway_container *container);
368
369void container_raise_floating(struct sway_container *con); 352void container_raise_floating(struct sway_container *con);
370 353
371bool container_is_scratchpad_hidden(struct sway_container *con); 354bool container_is_scratchpad_hidden(struct sway_container *con);
@@ -389,4 +372,10 @@ bool container_is_sticky_or_child(struct sway_container *con);
389 */ 372 */
390int container_squash(struct sway_container *con); 373int container_squash(struct sway_container *con);
391 374
375void container_arrange_title_bar(struct sway_container *con);
376
377void container_update(struct sway_container *con);
378
379void container_update_itself_and_parents(struct sway_container *con);
380
392#endif 381#endif