diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/scratchpad.h | 26 | ||||
-rw-r--r-- | include/sway/tree/container.h | 5 | ||||
-rw-r--r-- | include/sway/tree/layout.h | 2 |
3 files changed, 33 insertions, 0 deletions
diff --git a/include/sway/scratchpad.h b/include/sway/scratchpad.h new file mode 100644 index 00000000..5af5256f --- /dev/null +++ b/include/sway/scratchpad.h | |||
@@ -0,0 +1,26 @@ | |||
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/container.h b/include/sway/tree/container.h index 59c5b4c7..2a4be18c 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h | |||
@@ -135,6 +135,11 @@ struct sway_container { | |||
135 | 135 | ||
136 | struct sway_container *parent; | 136 | struct sway_container *parent; |
137 | 137 | ||
138 | // Indicates that the container is a scratchpad container. | ||
139 | // Both hidden and visible scratchpad containers have scratchpad=true. | ||
140 | // Hidden scratchpad containers have a NULL parent. | ||
141 | bool scratchpad; | ||
142 | |||
138 | float alpha; | 143 | float alpha; |
139 | 144 | ||
140 | struct wlr_texture *title_focused; | 145 | struct wlr_texture *title_focused; |
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h index 5a78fd58..7d7da2d7 100644 --- a/include/sway/tree/layout.h +++ b/include/sway/tree/layout.h | |||
@@ -35,6 +35,8 @@ struct sway_root { | |||
35 | 35 | ||
36 | struct wl_list outputs; // sway_output::link | 36 | struct wl_list outputs; // sway_output::link |
37 | 37 | ||
38 | list_t *scratchpad; // struct sway_container | ||
39 | |||
38 | struct { | 40 | struct { |
39 | struct wl_signal new_container; | 41 | struct wl_signal new_container; |
40 | } events; | 42 | } events; |