diff options
author | Ryan Dwyer <RyanDwyer@users.noreply.github.com> | 2018-08-25 13:06:04 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-25 13:06:04 +1000 |
commit | 4b9ad9c2382db9b2a9a224e9ebc60b6298843aa9 (patch) | |
tree | f1ed7e866d4e34f5ef9b8f72ec8095369619aaa7 /include/sway | |
parent | f51b9478f28143a4f1887711497ff131f26ab1c4 (diff) | |
parent | e86d99acd655815781cd2e23877ce58ab5b24826 (diff) |
Merge branch 'master' into commands
Diffstat (limited to 'include/sway')
-rw-r--r-- | include/sway/output.h | 6 | ||||
-rw-r--r-- | include/sway/tree/container.h | 30 | ||||
-rw-r--r-- | include/sway/tree/layout.h | 10 | ||||
-rw-r--r-- | include/sway/tree/root.h | 1 | ||||
-rw-r--r-- | include/sway/tree/view.h | 4 | ||||
-rw-r--r-- | include/sway/tree/workspace.h | 9 |
6 files changed, 23 insertions, 37 deletions
diff --git a/include/sway/output.h b/include/sway/output.h index d0d034b3..098540fb 100644 --- a/include/sway/output.h +++ b/include/sway/output.h @@ -39,6 +39,12 @@ struct sway_output { } events; }; +struct sway_container *output_create(struct sway_output *sway_output); + +void output_destroy(struct sway_container *output); + +void output_begin_destroy(struct sway_container *output); + typedef void (*sway_surface_iterator_func_t)(struct sway_output *output, struct wlr_surface *surface, struct wlr_box *box, float rotation, void *user_data); diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index cd886cd0..2cb23d3c 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -176,27 +176,6 @@ struct sway_container *container_create(enum sway_container_type type); const char *container_type_to_str(enum sway_container_type type); -struct sway_container *output_create(struct sway_output *sway_output); - -/** - * Create a new container container. A container container can be a a child of - * a workspace container or another container container. - */ -struct sway_container *container_container_create(); - -/** - * Create a new output. Outputs are children of the root container and have no - * order in the tree structure. - */ -struct sway_container *output_create(struct sway_output *sway_output); - -/** - * Create a new workspace container. Workspaces are children of an output - * container and are ordered alphabetically by name. - */ -struct sway_container *workspace_create(struct sway_container *output, - const char *name); - /* * Create a new view container. A view can be a child of a workspace container * or a container container and are rendered in the order and structure of @@ -205,9 +184,9 @@ struct sway_container *workspace_create(struct sway_container *output, struct sway_container *container_view_create( struct sway_container *sibling, struct sway_view *sway_view); -void container_free(struct sway_container *cont); +void container_destroy(struct sway_container *con); -struct sway_container *container_destroy(struct sway_container *container); +void container_begin_destroy(struct sway_container *con); struct sway_container *container_close(struct sway_container *container); @@ -255,10 +234,7 @@ void container_update_textures_recursive(struct sway_container *con); void container_damage_whole(struct sway_container *container); -bool container_reap_empty(struct sway_container *con); - -struct sway_container *container_reap_empty_recursive( - struct sway_container *con); +struct sway_container *container_reap_empty(struct sway_container *con); struct sway_container *container_flatten(struct sway_container *container); diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h index 5b803dfe..519189d9 100644 --- a/include/sway/tree/layout.h +++ b/include/sway/tree/layout.h @@ -15,13 +15,7 @@ enum movement_direction { MOVE_CHILD, }; -enum resize_edge { - RESIZE_EDGE_NONE = 0, - RESIZE_EDGE_LEFT = 1, - RESIZE_EDGE_RIGHT = 2, - RESIZE_EDGE_TOP = 4, - RESIZE_EDGE_BOTTOM = 8, -}; +enum wlr_edges; struct sway_container; @@ -52,7 +46,7 @@ struct sway_container *container_split(struct sway_container *child, enum sway_container_layout layout); void container_recursive_resize(struct sway_container *container, - double amount, enum resize_edge edge); + double amount, enum wlr_edges edge); void container_swap(struct sway_container *con1, struct sway_container *con2); diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h index d1f04a96..ee4bd836 100644 --- a/include/sway/tree/root.h +++ b/include/sway/tree/root.h @@ -24,6 +24,7 @@ struct sway_root { struct wl_list outputs; // sway_output::link list_t *scratchpad; // struct sway_container + list_t *saved_workspaces; // For when there's no connected outputs struct { struct wl_signal new_container; diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 5fdecc2b..f73ce571 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h @@ -284,10 +284,10 @@ void view_for_each_popup(struct sway_view *view, void view_init(struct sway_view *view, enum sway_view_type type, const struct sway_view_impl *impl); -void view_free(struct sway_view *view); - void view_destroy(struct sway_view *view); +void view_begin_destroy(struct sway_view *view); + void view_map(struct sway_view *view, struct wlr_surface *wlr_surface); void view_unmap(struct sway_view *view); diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h index 35c91017..efcb7c69 100644 --- a/include/sway/tree/workspace.h +++ b/include/sway/tree/workspace.h @@ -18,6 +18,15 @@ extern char *prev_workspace_name; struct sway_container *workspace_get_initial_output(const char *name); +struct sway_container *workspace_create(struct sway_container *output, + const char *name); + +void workspace_destroy(struct sway_container *workspace); + +void workspace_begin_destroy(struct sway_container *workspace); + +void workspace_consider_destroy(struct sway_container *ws); + char *workspace_next_name(const char *output_name); bool workspace_switch(struct sway_container *workspace, |