diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/ipc-server.h | 1 | ||||
-rw-r--r-- | include/sway/tree/container.h | 2 | ||||
-rw-r--r-- | include/sway/tree/view.h | 9 | ||||
-rw-r--r-- | include/sway/tree/workspace.h | 7 |
4 files changed, 19 insertions, 0 deletions
diff --git a/include/sway/ipc-server.h b/include/sway/ipc-server.h index c3389fe8..dd16a175 100644 --- a/include/sway/ipc-server.h +++ b/include/sway/ipc-server.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _SWAY_IPC_SERVER_H | 1 | #ifndef _SWAY_IPC_SERVER_H |
2 | #define _SWAY_IPC_SERVER_H | 2 | #define _SWAY_IPC_SERVER_H |
3 | #include <sys/socket.h> | 3 | #include <sys/socket.h> |
4 | #include "sway/config.h" | ||
4 | #include "sway/tree/container.h" | 5 | #include "sway/tree/container.h" |
5 | #include "ipc.h" | 6 | #include "ipc.h" |
6 | 7 | ||
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 2a8b8aba..6efda72f 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h | |||
@@ -45,6 +45,7 @@ enum sway_container_border { | |||
45 | 45 | ||
46 | struct sway_root; | 46 | struct sway_root; |
47 | struct sway_output; | 47 | struct sway_output; |
48 | struct sway_workspace; | ||
48 | struct sway_view; | 49 | struct sway_view; |
49 | 50 | ||
50 | struct sway_container { | 51 | struct sway_container { |
@@ -52,6 +53,7 @@ struct sway_container { | |||
52 | // TODO: Encapsulate state for other node types as well like C_CONTAINER | 53 | // TODO: Encapsulate state for other node types as well like C_CONTAINER |
53 | struct sway_root *sway_root; | 54 | struct sway_root *sway_root; |
54 | struct sway_output *sway_output; | 55 | struct sway_output *sway_output; |
56 | struct sway_workspace *sway_workspace; | ||
55 | struct sway_view *sway_view; | 57 | struct sway_view *sway_view; |
56 | }; | 58 | }; |
57 | 59 | ||
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index b51c54b5..648a74c4 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -28,6 +28,7 @@ struct sway_view_impl { | |||
28 | void (*configure)(struct sway_view *view, double ox, double oy, int width, | 28 | void (*configure)(struct sway_view *view, double ox, double oy, int width, |
29 | int height); | 29 | int height); |
30 | void (*set_activated)(struct sway_view *view, bool activated); | 30 | void (*set_activated)(struct sway_view *view, bool activated); |
31 | void (*set_fullscreen)(struct sway_view *view, bool fullscreen); | ||
31 | void (*for_each_surface)(struct sway_view *view, | 32 | void (*for_each_surface)(struct sway_view *view, |
32 | wlr_surface_iterator_func_t iterator, void *user_data); | 33 | wlr_surface_iterator_func_t iterator, void *user_data); |
33 | void (*close)(struct sway_view *view); | 34 | void (*close)(struct sway_view *view); |
@@ -41,6 +42,7 @@ struct sway_view { | |||
41 | struct sway_container *swayc; // NULL for unmanaged views | 42 | struct sway_container *swayc; // NULL for unmanaged views |
42 | struct wlr_surface *surface; // NULL for unmapped views | 43 | struct wlr_surface *surface; // NULL for unmapped views |
43 | int width, height; | 44 | int width, height; |
45 | bool is_fullscreen; | ||
44 | 46 | ||
45 | union { | 47 | union { |
46 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; | 48 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; |
@@ -63,6 +65,7 @@ struct sway_xdg_shell_v6_view { | |||
63 | struct wl_listener request_move; | 65 | struct wl_listener request_move; |
64 | struct wl_listener request_resize; | 66 | struct wl_listener request_resize; |
65 | struct wl_listener request_maximize; | 67 | struct wl_listener request_maximize; |
68 | struct wl_listener request_fullscreen; | ||
66 | struct wl_listener new_popup; | 69 | struct wl_listener new_popup; |
67 | struct wl_listener map; | 70 | struct wl_listener map; |
68 | struct wl_listener unmap; | 71 | struct wl_listener unmap; |
@@ -79,6 +82,7 @@ struct sway_xwayland_view { | |||
79 | struct wl_listener request_resize; | 82 | struct wl_listener request_resize; |
80 | struct wl_listener request_maximize; | 83 | struct wl_listener request_maximize; |
81 | struct wl_listener request_configure; | 84 | struct wl_listener request_configure; |
85 | struct wl_listener request_fullscreen; | ||
82 | struct wl_listener map; | 86 | struct wl_listener map; |
83 | struct wl_listener unmap; | 87 | struct wl_listener unmap; |
84 | struct wl_listener destroy; | 88 | struct wl_listener destroy; |
@@ -93,6 +97,7 @@ struct sway_xwayland_unmanaged { | |||
93 | int lx, ly; | 97 | int lx, ly; |
94 | 98 | ||
95 | struct wl_listener request_configure; | 99 | struct wl_listener request_configure; |
100 | struct wl_listener request_fullscreen; | ||
96 | struct wl_listener commit; | 101 | struct wl_listener commit; |
97 | struct wl_listener map; | 102 | struct wl_listener map; |
98 | struct wl_listener unmap; | 103 | struct wl_listener unmap; |
@@ -106,6 +111,8 @@ struct sway_wl_shell_view { | |||
106 | struct wl_listener request_move; | 111 | struct wl_listener request_move; |
107 | struct wl_listener request_resize; | 112 | struct wl_listener request_resize; |
108 | struct wl_listener request_maximize; | 113 | struct wl_listener request_maximize; |
114 | struct wl_listener request_fullscreen; | ||
115 | struct wl_listener set_state; | ||
109 | struct wl_listener destroy; | 116 | struct wl_listener destroy; |
110 | 117 | ||
111 | int pending_width, pending_height; | 118 | int pending_width, pending_height; |
@@ -155,6 +162,8 @@ void view_configure(struct sway_view *view, double ox, double oy, int width, | |||
155 | 162 | ||
156 | void view_set_activated(struct sway_view *view, bool activated); | 163 | void view_set_activated(struct sway_view *view, bool activated); |
157 | 164 | ||
165 | void view_set_fullscreen(struct sway_view *view, bool fullscreen); | ||
166 | |||
158 | void view_close(struct sway_view *view); | 167 | void view_close(struct sway_view *view); |
159 | 168 | ||
160 | void view_damage(struct sway_view *view, bool whole); | 169 | void view_damage(struct sway_view *view, bool whole); |
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h index 8d49fefb..35e1df3b 100644 --- a/include/sway/tree/workspace.h +++ b/include/sway/tree/workspace.h | |||
@@ -3,6 +3,13 @@ | |||
3 | 3 | ||
4 | #include "sway/tree/container.h" | 4 | #include "sway/tree/container.h" |
5 | 5 | ||
6 | struct sway_view; | ||
7 | |||
8 | struct sway_workspace { | ||
9 | struct sway_container *swayc; | ||
10 | struct sway_view *fullscreen; | ||
11 | }; | ||
12 | |||
6 | extern char *prev_workspace_name; | 13 | extern char *prev_workspace_name; |
7 | 14 | ||
8 | char *workspace_next_name(const char *output_name); | 15 | char *workspace_next_name(const char *output_name); |