aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/tree/container.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-26 12:05:16 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-26 12:05:16 +1000
commit5dbbab7bdc56fc513eea2f9a39d722859a3b0c2e (patch)
tree2aad57ba7f7eec9fdb51b98859f6da826a4d39a1 /include/sway/tree/container.h
parentMerge pull request #2488 from RyanDwyer/separate-gaps-functions (diff)
downloadsway-5dbbab7bdc56fc513eea2f9a39d722859a3b0c2e.tar.gz
sway-5dbbab7bdc56fc513eea2f9a39d722859a3b0c2e.tar.zst
sway-5dbbab7bdc56fc513eea2f9a39d722859a3b0c2e.zip
Remove layout.c
When we have type safety we'll need to have functions for workspace_add_tiling and so on. This means the existing container functions will be just for containers, so they are being moved to container.c. At this point layout.c doesn't contain much else, so I've relocated everything and removed the file. * container_swap and its static functions have been moved to the swap command and made static. * container_recursive_resize has been moved to the resize command and made static. * The following have been moved to container.c: * container_handle_fullscreen_reparent * container_insert_child * container_add_sibling * container_add_child * container_remove_child * container_replace_child * container_split * enum movement_direction and sway_dir_to_wlr have been moved to util.c. Side note: Several commands included layout.h which then included root.h. With layout.h gone, root.h has to be included by those commands.
Diffstat (limited to 'include/sway/tree/container.h')
-rw-r--r--include/sway/tree/container.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 2b6e6e0c..e4071cfe 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -53,6 +53,9 @@ struct sway_output;
53struct sway_workspace; 53struct sway_workspace;
54struct sway_view; 54struct sway_view;
55 55
56enum movement_direction;
57enum wlr_direction;
58
56struct sway_container_state { 59struct sway_container_state {
57 // Container/swayc properties 60 // Container/swayc properties
58 enum sway_container_layout layout; 61 enum sway_container_layout layout;
@@ -341,4 +344,29 @@ void container_add_gaps(struct sway_container *container);
341 344
342int container_sibling_index(const struct sway_container *child); 345int container_sibling_index(const struct sway_container *child);
343 346
347void container_handle_fullscreen_reparent(struct sway_container *con,
348 struct sway_container *old_parent);
349
350void container_add_child(struct sway_container *parent,
351 struct sway_container *child);
352
353void container_insert_child(struct sway_container *parent,
354 struct sway_container *child, int i);
355
356struct sway_container *container_add_sibling(struct sway_container *parent,
357 struct sway_container *child);
358
359struct sway_container *container_remove_child(struct sway_container *child);
360
361struct sway_container *container_replace_child(struct sway_container *child,
362 struct sway_container *new_child);
363
364bool sway_dir_to_wlr(enum movement_direction dir, enum wlr_direction *out);
365
366enum sway_container_layout container_get_default_layout(
367 struct sway_container *con);
368
369struct sway_container *container_split(struct sway_container *child,
370 enum sway_container_layout layout);
371
344#endif 372#endif