diff options
Diffstat (limited to 'include/sway')
-rw-r--r-- | include/sway/config.h | 7 | ||||
-rw-r--r-- | include/sway/server.h | 6 | ||||
-rw-r--r-- | include/sway/tree/view.h | 27 |
3 files changed, 40 insertions, 0 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index b20458cb..f77c3b50 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -107,6 +107,12 @@ struct seat_config { | |||
107 | list_t *attachments; // list of seat_attachment configs | 107 | list_t *attachments; // list of seat_attachment configs |
108 | }; | 108 | }; |
109 | 109 | ||
110 | enum config_dpms { | ||
111 | DPMS_IGNORE, | ||
112 | DPMS_ON, | ||
113 | DPMS_OFF | ||
114 | }; | ||
115 | |||
110 | /** | 116 | /** |
111 | * Size and position configuration for a particular output. | 117 | * Size and position configuration for a particular output. |
112 | * | 118 | * |
@@ -123,6 +129,7 @@ struct output_config { | |||
123 | 129 | ||
124 | char *background; | 130 | char *background; |
125 | char *background_option; | 131 | char *background_option; |
132 | enum config_dpms dpms_state; | ||
126 | }; | 133 | }; |
127 | 134 | ||
128 | /** | 135 | /** |
diff --git a/include/sway/server.h b/include/sway/server.h index 296fbf22..d04ea896 100644 --- a/include/sway/server.h +++ b/include/sway/server.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <wlr/types/wlr_data_device.h> | 8 | #include <wlr/types/wlr_data_device.h> |
9 | #include <wlr/types/wlr_layer_shell.h> | 9 | #include <wlr/types/wlr_layer_shell.h> |
10 | #include <wlr/types/wlr_xdg_shell_v6.h> | 10 | #include <wlr/types/wlr_xdg_shell_v6.h> |
11 | #include <wlr/types/wlr_xdg_shell.h> | ||
11 | #include <wlr/render/wlr_renderer.h> | 12 | #include <wlr/render/wlr_renderer.h> |
12 | // TODO WLR: make Xwayland optional | 13 | // TODO WLR: make Xwayland optional |
13 | #include <wlr/xwayland.h> | 14 | #include <wlr/xwayland.h> |
@@ -21,6 +22,7 @@ struct sway_server { | |||
21 | 22 | ||
22 | struct wlr_compositor *compositor; | 23 | struct wlr_compositor *compositor; |
23 | struct wlr_data_device_manager *data_device_manager; | 24 | struct wlr_data_device_manager *data_device_manager; |
25 | struct wlr_idle *idle; | ||
24 | 26 | ||
25 | struct sway_input_manager *input; | 27 | struct sway_input_manager *input; |
26 | 28 | ||
@@ -32,6 +34,9 @@ struct sway_server { | |||
32 | struct wlr_xdg_shell_v6 *xdg_shell_v6; | 34 | struct wlr_xdg_shell_v6 *xdg_shell_v6; |
33 | struct wl_listener xdg_shell_v6_surface; | 35 | struct wl_listener xdg_shell_v6_surface; |
34 | 36 | ||
37 | struct wlr_xdg_shell *xdg_shell; | ||
38 | struct wl_listener xdg_shell_surface; | ||
39 | |||
35 | struct wlr_xwayland *xwayland; | 40 | struct wlr_xwayland *xwayland; |
36 | struct wlr_xcursor_manager *xcursor_manager; | 41 | struct wlr_xcursor_manager *xcursor_manager; |
37 | struct wl_listener xwayland_surface; | 42 | struct wl_listener xwayland_surface; |
@@ -51,6 +56,7 @@ void handle_new_output(struct wl_listener *listener, void *data); | |||
51 | 56 | ||
52 | void handle_layer_shell_surface(struct wl_listener *listener, void *data); | 57 | void handle_layer_shell_surface(struct wl_listener *listener, void *data); |
53 | void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); | 58 | void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); |
59 | void handle_xdg_shell_surface(struct wl_listener *listener, void *data); | ||
54 | void handle_xwayland_surface(struct wl_listener *listener, void *data); | 60 | void handle_xwayland_surface(struct wl_listener *listener, void *data); |
55 | void handle_wl_shell_surface(struct wl_listener *listener, void *data); | 61 | void handle_wl_shell_surface(struct wl_listener *listener, void *data); |
56 | 62 | ||
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index de431c89..e163e3fe 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -12,6 +12,7 @@ struct sway_container; | |||
12 | enum sway_view_type { | 12 | enum sway_view_type { |
13 | SWAY_VIEW_WL_SHELL, | 13 | SWAY_VIEW_WL_SHELL, |
14 | SWAY_VIEW_XDG_SHELL_V6, | 14 | SWAY_VIEW_XDG_SHELL_V6, |
15 | SWAY_VIEW_XDG_SHELL, | ||
15 | SWAY_VIEW_XWAYLAND, | 16 | SWAY_VIEW_XWAYLAND, |
16 | }; | 17 | }; |
17 | 18 | ||
@@ -58,6 +59,7 @@ struct sway_view { | |||
58 | 59 | ||
59 | union { | 60 | union { |
60 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; | 61 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; |
62 | struct wlr_xdg_surface *wlr_xdg_surface; | ||
61 | struct wlr_xwayland_surface *wlr_xwayland_surface; | 63 | struct wlr_xwayland_surface *wlr_xwayland_surface; |
62 | struct wlr_wl_shell_surface *wlr_wl_shell_surface; | 64 | struct wlr_wl_shell_surface *wlr_wl_shell_surface; |
63 | }; | 65 | }; |
@@ -86,6 +88,22 @@ struct sway_xdg_shell_v6_view { | |||
86 | int pending_width, pending_height; | 88 | int pending_width, pending_height; |
87 | }; | 89 | }; |
88 | 90 | ||
91 | struct sway_xdg_shell_view { | ||
92 | struct sway_view view; | ||
93 | |||
94 | struct wl_listener commit; | ||
95 | struct wl_listener request_move; | ||
96 | struct wl_listener request_resize; | ||
97 | struct wl_listener request_maximize; | ||
98 | struct wl_listener request_fullscreen; | ||
99 | struct wl_listener new_popup; | ||
100 | struct wl_listener map; | ||
101 | struct wl_listener unmap; | ||
102 | struct wl_listener destroy; | ||
103 | |||
104 | int pending_width, pending_height; | ||
105 | }; | ||
106 | |||
89 | struct sway_xwayland_view { | 107 | struct sway_xwayland_view { |
90 | struct sway_view view; | 108 | struct sway_view view; |
91 | 109 | ||
@@ -160,6 +178,15 @@ struct sway_xdg_popup_v6 { | |||
160 | struct wl_listener destroy; | 178 | struct wl_listener destroy; |
161 | }; | 179 | }; |
162 | 180 | ||
181 | struct sway_xdg_popup { | ||
182 | struct sway_view_child child; | ||
183 | |||
184 | struct wlr_xdg_surface *wlr_xdg_surface; | ||
185 | |||
186 | struct wl_listener new_popup; | ||
187 | struct wl_listener destroy; | ||
188 | }; | ||
189 | |||
163 | const char *view_get_title(struct sway_view *view); | 190 | const char *view_get_title(struct sway_view *view); |
164 | 191 | ||
165 | const char *view_get_app_id(struct sway_view *view); | 192 | const char *view_get_app_id(struct sway_view *view); |