From 663bfe4cd8a8c2c9f0de285c8112b108e9a61bae Mon Sep 17 00:00:00 2001 From: emersion Date: Wed, 27 Sep 2017 21:15:31 +0200 Subject: wlr_wl_shell: implement all requests except set_popup --- include/rootston/view.h | 5 +++- include/wlr/types/wlr_wl_shell.h | 52 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/rootston/view.h b/include/rootston/view.h index eee61563..67ca9b62 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -7,7 +7,10 @@ struct roots_wl_shell_surface { struct roots_view *view; - // TODO + // TODO: Maybe destroy listener should go in roots_view + struct wl_listener destroy; + struct wl_listener ping_timeout; + // TODO: other stuff }; struct roots_xdg_surface_v6 { diff --git a/include/wlr/types/wlr_wl_shell.h b/include/wlr/types/wlr_wl_shell.h index d5b8a982..612e5811 100644 --- a/include/wlr/types/wlr_wl_shell.h +++ b/include/wlr/types/wlr_wl_shell.h @@ -16,6 +16,13 @@ struct wlr_wl_shell { void *data; }; +struct wlr_wl_shell_surface_transient_state { + struct wlr_wl_shell_surface *parent; + int32_t x; + int32_t y; + uint32_t flags; +}; + struct wlr_wl_shell_surface { struct wlr_wl_shell *shell; struct wl_client *client; @@ -26,13 +33,58 @@ struct wlr_wl_shell_surface { uint32_t ping_serial; struct wl_event_source *ping_timer; + bool toplevel; + struct wlr_wl_shell_surface_transient_state *transient_state; + char *title; + char *class_; + struct { + struct wl_signal destroy; struct wl_signal ping_timeout; + + struct wl_signal request_move; + struct wl_signal request_resize; + struct wl_signal request_set_fullscreen; + struct wl_signal request_set_popup; + struct wl_signal request_set_maximized; + struct wl_signal set_toplevel; + struct wl_signal set_transient; + struct wl_signal set_title; + struct wl_signal set_class; } events; void *data; }; +struct wlr_wl_shell_surface_move_event { + struct wl_client *client; + struct wlr_wl_shell_surface *surface; + struct wlr_seat_handle *seat_handle; + uint32_t serial; +}; + +struct wlr_wl_shell_surface_resize_event { + struct wl_client *client; + struct wlr_wl_shell_surface *surface; + struct wlr_seat_handle *seat_handle; + uint32_t serial; + uint32_t edges; +}; + +struct wlr_wl_shell_surface_set_fullscreen_event { + struct wl_client *client; + struct wlr_wl_shell_surface *surface; + uint32_t method; + uint32_t framerate; + struct wlr_output *output; +}; + +struct wlr_wl_shell_surface_set_maximized_event { + struct wl_client *client; + struct wlr_wl_shell_surface *surface; + struct wlr_output *output; +}; + struct wlr_wl_shell *wlr_wl_shell_create(struct wl_display *display); void wlr_wl_shell_destroy(struct wlr_wl_shell *wlr_wl_shell); -- cgit v1.2.3