diff options
Diffstat (limited to 'include/sway/tree/root.h')
-rw-r--r-- | include/sway/tree/root.h | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h index ec6516c9..a2d464f9 100644 --- a/include/sway/tree/root.h +++ b/include/sway/tree/root.h @@ -5,12 +5,14 @@ #include <wlr/types/wlr_output_layout.h> #include <wlr/render/wlr_texture.h> #include "sway/tree/container.h" +#include "sway/tree/node.h" #include "config.h" #include "list.h" -extern struct sway_container root_container; +extern struct sway_root *root; struct sway_root { + struct sway_node node; struct wlr_output_layout *output_layout; struct wl_listener output_layout_change; @@ -24,17 +26,21 @@ struct sway_root { // Includes disabled outputs struct wl_list all_outputs; // sway_output::link + double x, y; + double width, height; + + list_t *outputs; // struct sway_output list_t *scratchpad; // struct sway_container list_t *saved_workspaces; // For when there's no connected outputs struct { - struct wl_signal new_container; + struct wl_signal new_node; } events; }; -void root_create(void); +struct sway_root *root_create(void); -void root_destroy(void); +void root_destroy(struct sway_root *root); /** * Move a container to the scratchpad. @@ -56,23 +62,25 @@ void root_scratchpad_show(struct sway_container *con); */ void root_scratchpad_hide(struct sway_container *con); -struct sway_container *root_workspace_for_pid(pid_t pid); +struct sway_workspace *root_workspace_for_pid(pid_t pid); void root_record_workspace_pid(pid_t pid); -void root_for_each_workspace(void (*f)(struct sway_container *con, void *data), +void root_for_each_workspace(void (*f)(struct sway_workspace *ws, void *data), void *data); void root_for_each_container(void (*f)(struct sway_container *con, void *data), void *data); -struct sway_container *root_find_output( - bool (*test)(struct sway_container *con, void *data), void *data); +struct sway_output *root_find_output( + bool (*test)(struct sway_output *output, void *data), void *data); -struct sway_container *root_find_workspace( - bool (*test)(struct sway_container *con, void *data), void *data); +struct sway_workspace *root_find_workspace( + bool (*test)(struct sway_workspace *ws, void *data), void *data); struct sway_container *root_find_container( bool (*test)(struct sway_container *con, void *data), void *data); +void root_get_box(struct sway_root *root, struct wlr_box *box); + #endif |