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 @@ | |||
5 | #include <wlr/types/wlr_output_layout.h> | 5 | #include <wlr/types/wlr_output_layout.h> |
6 | #include <wlr/render/wlr_texture.h> | 6 | #include <wlr/render/wlr_texture.h> |
7 | #include "sway/tree/container.h" | 7 | #include "sway/tree/container.h" |
8 | #include "sway/tree/node.h" | ||
8 | #include "config.h" | 9 | #include "config.h" |
9 | #include "list.h" | 10 | #include "list.h" |
10 | 11 | ||
11 | extern struct sway_container root_container; | 12 | extern struct sway_root *root; |
12 | 13 | ||
13 | struct sway_root { | 14 | struct sway_root { |
15 | struct sway_node node; | ||
14 | struct wlr_output_layout *output_layout; | 16 | struct wlr_output_layout *output_layout; |
15 | 17 | ||
16 | struct wl_listener output_layout_change; | 18 | struct wl_listener output_layout_change; |
@@ -24,17 +26,21 @@ struct sway_root { | |||
24 | // Includes disabled outputs | 26 | // Includes disabled outputs |
25 | struct wl_list all_outputs; // sway_output::link | 27 | struct wl_list all_outputs; // sway_output::link |
26 | 28 | ||
29 | double x, y; | ||
30 | double width, height; | ||
31 | |||
32 | list_t *outputs; // struct sway_output | ||
27 | list_t *scratchpad; // struct sway_container | 33 | list_t *scratchpad; // struct sway_container |
28 | list_t *saved_workspaces; // For when there's no connected outputs | 34 | list_t *saved_workspaces; // For when there's no connected outputs |
29 | 35 | ||
30 | struct { | 36 | struct { |
31 | struct wl_signal new_container; | 37 | struct wl_signal new_node; |
32 | } events; | 38 | } events; |
33 | }; | 39 | }; |
34 | 40 | ||
35 | void root_create(void); | 41 | struct sway_root *root_create(void); |
36 | 42 | ||
37 | void root_destroy(void); | 43 | void root_destroy(struct sway_root *root); |
38 | 44 | ||
39 | /** | 45 | /** |
40 | * Move a container to the scratchpad. | 46 | * Move a container to the scratchpad. |
@@ -56,23 +62,25 @@ void root_scratchpad_show(struct sway_container *con); | |||
56 | */ | 62 | */ |
57 | void root_scratchpad_hide(struct sway_container *con); | 63 | void root_scratchpad_hide(struct sway_container *con); |
58 | 64 | ||
59 | struct sway_container *root_workspace_for_pid(pid_t pid); | 65 | struct sway_workspace *root_workspace_for_pid(pid_t pid); |
60 | 66 | ||
61 | void root_record_workspace_pid(pid_t pid); | 67 | void root_record_workspace_pid(pid_t pid); |
62 | 68 | ||
63 | void root_for_each_workspace(void (*f)(struct sway_container *con, void *data), | 69 | void root_for_each_workspace(void (*f)(struct sway_workspace *ws, void *data), |
64 | void *data); | 70 | void *data); |
65 | 71 | ||
66 | void root_for_each_container(void (*f)(struct sway_container *con, void *data), | 72 | void root_for_each_container(void (*f)(struct sway_container *con, void *data), |
67 | void *data); | 73 | void *data); |
68 | 74 | ||
69 | struct sway_container *root_find_output( | 75 | struct sway_output *root_find_output( |
70 | bool (*test)(struct sway_container *con, void *data), void *data); | 76 | bool (*test)(struct sway_output *output, void *data), void *data); |
71 | 77 | ||
72 | struct sway_container *root_find_workspace( | 78 | struct sway_workspace *root_find_workspace( |
73 | bool (*test)(struct sway_container *con, void *data), void *data); | 79 | bool (*test)(struct sway_workspace *ws, void *data), void *data); |
74 | 80 | ||
75 | struct sway_container *root_find_container( | 81 | struct sway_container *root_find_container( |
76 | bool (*test)(struct sway_container *con, void *data), void *data); | 82 | bool (*test)(struct sway_container *con, void *data), void *data); |
77 | 83 | ||
84 | void root_get_box(struct sway_root *root, struct wlr_box *box); | ||
85 | |||
78 | #endif | 86 | #endif |