diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/scratchpad.h | 26 | ||||
-rw-r--r-- | include/sway/tree/layout.h | 23 | ||||
-rw-r--r-- | include/sway/tree/root.h | 57 |
3 files changed, 58 insertions, 48 deletions
diff --git a/include/sway/scratchpad.h b/include/sway/scratchpad.h deleted file mode 100644 index 5af5256f..00000000 --- a/include/sway/scratchpad.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | #ifndef _SWAY_SCRATCHPAD_H | ||
2 | #define _SWAY_SCRATCHPAD_H | ||
3 | |||
4 | #include "tree/container.h" | ||
5 | |||
6 | /** | ||
7 | * Move a container to the scratchpad. | ||
8 | */ | ||
9 | void scratchpad_add_container(struct sway_container *con); | ||
10 | |||
11 | /** | ||
12 | * Remove a container from the scratchpad. | ||
13 | */ | ||
14 | void scratchpad_remove_container(struct sway_container *con); | ||
15 | |||
16 | /** | ||
17 | * Show or hide the next container on the scratchpad. | ||
18 | */ | ||
19 | void scratchpad_toggle_auto(void); | ||
20 | |||
21 | /** | ||
22 | * Show or hide a specific container on the scratchpad. | ||
23 | */ | ||
24 | void scratchpad_toggle_container(struct sway_container *con); | ||
25 | |||
26 | #endif | ||
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h index a4c31bf6..77cd954b 100644 --- a/include/sway/tree/layout.h +++ b/include/sway/tree/layout.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <wlr/types/wlr_output_layout.h> | 3 | #include <wlr/types/wlr_output_layout.h> |
4 | #include <wlr/render/wlr_texture.h> | 4 | #include <wlr/render/wlr_texture.h> |
5 | #include "sway/tree/container.h" | 5 | #include "sway/tree/container.h" |
6 | #include "sway/tree/root.h" | ||
6 | #include "config.h" | 7 | #include "config.h" |
7 | 8 | ||
8 | enum movement_direction { | 9 | enum movement_direction { |
@@ -24,28 +25,6 @@ enum resize_edge { | |||
24 | 25 | ||
25 | struct sway_container; | 26 | struct sway_container; |
26 | 27 | ||
27 | struct sway_root { | ||
28 | struct wlr_output_layout *output_layout; | ||
29 | |||
30 | struct wl_listener output_layout_change; | ||
31 | #ifdef HAVE_XWAYLAND | ||
32 | struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link | ||
33 | #endif | ||
34 | struct wl_list drag_icons; // sway_drag_icon::link | ||
35 | |||
36 | struct wlr_texture *debug_tree; | ||
37 | |||
38 | struct wl_list outputs; // sway_output::link | ||
39 | |||
40 | list_t *scratchpad; // struct sway_container | ||
41 | |||
42 | struct { | ||
43 | struct wl_signal new_container; | ||
44 | } events; | ||
45 | }; | ||
46 | |||
47 | void layout_init(void); | ||
48 | |||
49 | void container_add_child(struct sway_container *parent, | 28 | void container_add_child(struct sway_container *parent, |
50 | struct sway_container *child); | 29 | struct sway_container *child); |
51 | 30 | ||
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h new file mode 100644 index 00000000..ada3c73f --- /dev/null +++ b/include/sway/tree/root.h | |||
@@ -0,0 +1,57 @@ | |||
1 | #ifndef _SWAY_ROOT_H | ||
2 | #define _SWAY_ROOT_H | ||
3 | #include <wayland-server-core.h> | ||
4 | #include <wayland-util.h> | ||
5 | #include <wlr/types/wlr_output_layout.h> | ||
6 | #include <wlr/render/wlr_texture.h> | ||
7 | #include "sway/tree/container.h" | ||
8 | #include "config.h" | ||
9 | #include "list.h" | ||
10 | |||
11 | extern struct sway_container root_container; | ||
12 | |||
13 | struct sway_root { | ||
14 | struct wlr_output_layout *output_layout; | ||
15 | |||
16 | struct wl_listener output_layout_change; | ||
17 | #ifdef HAVE_XWAYLAND | ||
18 | struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link | ||
19 | #endif | ||
20 | struct wl_list drag_icons; // sway_drag_icon::link | ||
21 | |||
22 | struct wlr_texture *debug_tree; | ||
23 | |||
24 | struct wl_list outputs; // sway_output::link | ||
25 | |||
26 | list_t *scratchpad; // struct sway_container | ||
27 | |||
28 | struct { | ||
29 | struct wl_signal new_container; | ||
30 | } events; | ||
31 | }; | ||
32 | |||
33 | void root_create(void); | ||
34 | |||
35 | void root_destroy(void); | ||
36 | |||
37 | /** | ||
38 | * Move a container to the scratchpad. | ||
39 | */ | ||
40 | void root_scratchpad_add_container(struct sway_container *con); | ||
41 | |||
42 | /** | ||
43 | * Remove a container from the scratchpad. | ||
44 | */ | ||
45 | void root_scratchpad_remove_container(struct sway_container *con); | ||
46 | |||
47 | /** | ||
48 | * Show a single scratchpad container. | ||
49 | */ | ||
50 | void root_scratchpad_show(struct sway_container *con); | ||
51 | |||
52 | /** | ||
53 | * Hide a single scratchpad container. | ||
54 | */ | ||
55 | void root_scratchpad_hide(struct sway_container *con); | ||
56 | |||
57 | #endif | ||