diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/container.h | 20 | ||||
-rw-r--r-- | include/sway/server.h | 10 |
2 files changed, 24 insertions, 6 deletions
diff --git a/include/sway/container.h b/include/sway/container.h index 37192ce3..f6aae7d1 100644 --- a/include/sway/container.h +++ b/include/sway/container.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _SWAY_CONTAINER_H | 2 | #define _SWAY_CONTAINER_H |
3 | #include <sys/types.h> | 3 | #include <sys/types.h> |
4 | #include <wlc/wlc.h> | 4 | #include <wlc/wlc.h> |
5 | #include <wlr/types/wlr_output.h> | ||
5 | #include <stdint.h> | 6 | #include <stdint.h> |
6 | 7 | ||
7 | #include "list.h" | 8 | #include "list.h" |
@@ -27,6 +28,14 @@ enum swayc_types { | |||
27 | C_TYPES, | 28 | C_TYPES, |
28 | }; | 29 | }; |
29 | 30 | ||
31 | enum swayc_view_types { | ||
32 | V_WL_SHELL, | ||
33 | V_XDG_SHELL_V6, | ||
34 | V_XWAYLAND, | ||
35 | // Keep last | ||
36 | V_TYPES, | ||
37 | }; | ||
38 | |||
30 | /** | 39 | /** |
31 | * Different ways to arrange a container. | 40 | * Different ways to arrange a container. |
32 | */ | 41 | */ |
@@ -63,12 +72,13 @@ enum swayc_border_types { | |||
63 | * The tree is made of these. Views are containers that cannot have children. | 72 | * The tree is made of these. Views are containers that cannot have children. |
64 | */ | 73 | */ |
65 | struct sway_container { | 74 | struct sway_container { |
66 | /** | 75 | // TODO WLR: reconcile these |
67 | * If this container maps to a WLC object, this is set to that object's | ||
68 | * handle. Otherwise, NULL. | ||
69 | */ | ||
70 | wlc_handle handle; | 76 | wlc_handle handle; |
71 | 77 | ||
78 | union { | ||
79 | struct wlr_output *output; | ||
80 | } _handle; | ||
81 | |||
72 | /** | 82 | /** |
73 | * A unique ID to identify this container. Primarily used in the | 83 | * A unique ID to identify this container. Primarily used in the |
74 | * get_tree JSON output. | 84 | * get_tree JSON output. |
@@ -179,7 +189,7 @@ enum visibility_mask { | |||
179 | /** | 189 | /** |
180 | * Allocates a new output container. | 190 | * Allocates a new output container. |
181 | */ | 191 | */ |
182 | swayc_t *new_output(wlc_handle handle); | 192 | swayc_t *new_output(struct wlr_output *wlr_output); |
183 | /** | 193 | /** |
184 | * Allocates a new workspace container. | 194 | * Allocates a new workspace container. |
185 | */ | 195 | */ |
diff --git a/include/sway/server.h b/include/sway/server.h index 22069f9c..f3e86bcb 100644 --- a/include/sway/server.h +++ b/include/sway/server.h | |||
@@ -12,6 +12,7 @@ | |||
12 | struct sway_server { | 12 | struct sway_server { |
13 | struct wl_display *wl_display; | 13 | struct wl_display *wl_display; |
14 | struct wl_event_loop *wl_event_loop; | 14 | struct wl_event_loop *wl_event_loop; |
15 | const char *socket; | ||
15 | 16 | ||
16 | struct wlr_backend *backend; | 17 | struct wlr_backend *backend; |
17 | struct wlr_renderer *renderer; | 18 | struct wlr_renderer *renderer; |
@@ -19,11 +20,18 @@ struct sway_server { | |||
19 | struct wlr_data_device_manager *data_device_manager; | 20 | struct wlr_data_device_manager *data_device_manager; |
20 | 21 | ||
21 | struct sway_input *input; | 22 | struct sway_input *input; |
23 | |||
24 | struct wl_listener output_add; | ||
25 | struct wl_listener output_remove; | ||
26 | struct wl_listener output_frame; | ||
22 | }; | 27 | }; |
23 | 28 | ||
29 | struct sway_server server; | ||
30 | |||
24 | bool server_init(struct sway_server *server); | 31 | bool server_init(struct sway_server *server); |
25 | void server_fini(struct sway_server *server); | 32 | void server_fini(struct sway_server *server); |
33 | void server_run(struct sway_server *server); | ||
26 | 34 | ||
27 | struct sway_server server; | 35 | void output_add_notify(struct wl_listener *listener, void *data); |
28 | 36 | ||
29 | #endif | 37 | #endif |