diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-03 16:35:06 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-09 10:08:43 +1000 |
commit | 59c94887018bdfa578c4371c4275061ca6e71b3e (patch) | |
tree | 62bdaa6ac4777d1fcb292013bddd2043dad7765a /include/sway/tree/container.h | |
parent | Merge pull request #2115 from RedSoxFan/restore-workspaces (diff) | |
download | sway-59c94887018bdfa578c4371c4275061ca6e71b3e.tar.gz sway-59c94887018bdfa578c4371c4275061ca6e71b3e.tar.zst sway-59c94887018bdfa578c4371c4275061ca6e71b3e.zip |
WIP: Atomic layout updates ground work
Diffstat (limited to 'include/sway/tree/container.h')
-rw-r--r-- | include/sway/tree/container.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 7ed6aab1..dd5bd47c 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h | |||
@@ -54,6 +54,28 @@ struct sway_output; | |||
54 | struct sway_workspace; | 54 | struct sway_workspace; |
55 | struct sway_view; | 55 | struct sway_view; |
56 | 56 | ||
57 | struct sway_container_state { | ||
58 | // Container/swayc properties | ||
59 | enum sway_container_layout layout; | ||
60 | double swayc_x, swayc_y; | ||
61 | double swayc_width, swayc_height; | ||
62 | |||
63 | //struct sway_container *parent; | ||
64 | //list_t *children; | ||
65 | |||
66 | // View properties | ||
67 | double view_x, view_y; | ||
68 | double view_width, view_height; | ||
69 | bool is_fullscreen; | ||
70 | |||
71 | enum sway_container_border border; | ||
72 | int border_thickness; | ||
73 | bool border_top; | ||
74 | bool border_bottom; | ||
75 | bool border_left; | ||
76 | bool border_right; | ||
77 | }; | ||
78 | |||
57 | struct sway_container { | 79 | struct sway_container { |
58 | union { | 80 | union { |
59 | // TODO: Encapsulate state for other node types as well like C_CONTAINER | 81 | // TODO: Encapsulate state for other node types as well like C_CONTAINER |
@@ -69,6 +91,8 @@ struct sway_container { | |||
69 | */ | 91 | */ |
70 | size_t id; | 92 | size_t id; |
71 | 93 | ||
94 | struct sway_container_state pending; | ||
95 | |||
72 | char *name; // The view's title (unformatted) | 96 | char *name; // The view's title (unformatted) |
73 | char *formatted_title; // The title displayed in the title bar | 97 | char *formatted_title; // The title displayed in the title bar |
74 | 98 | ||
@@ -246,4 +270,9 @@ void container_set_geometry_from_floating_view(struct sway_container *con); | |||
246 | */ | 270 | */ |
247 | bool container_is_floating(struct sway_container *container); | 271 | bool container_is_floating(struct sway_container *container); |
248 | 272 | ||
273 | /** | ||
274 | * Get a container's box in layout coordinates. | ||
275 | */ | ||
276 | struct wlr_box *container_get_box(struct sway_container *container); | ||
277 | |||
249 | #endif | 278 | #endif |