diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-05-04 11:48:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-04 11:48:41 -0400 |
commit | 57d03a3edab2de807780b0cae6ce12ea3ba11a2f (patch) | |
tree | 398c2719b4cc098d508ff7b4161598c0dad83861 /include | |
parent | bf793a68c1e62a7634c22681b33c33fa557df916 (diff) | |
parent | d136026a2cf04294368ffc6e69f4bc5c734bd6e9 (diff) |
Merge pull request #931 from emersion/redesign-resource-destroy
Redesign resource destruction
Diffstat (limited to 'include')
-rw-r--r-- | include/types/wlr_data_device.h | 3 | ||||
-rw-r--r-- | include/types/wlr_seat.h | 3 | ||||
-rw-r--r-- | include/wlr/types/wlr_data_device.h | 8 | ||||
-rw-r--r-- | include/wlr/types/wlr_linux_dmabuf.h | 12 |
4 files changed, 22 insertions, 4 deletions
diff --git a/include/types/wlr_data_device.h b/include/types/wlr_data_device.h index 4aa53dc0..ee423f80 100644 --- a/include/types/wlr_data_device.h +++ b/include/types/wlr_data_device.h @@ -18,7 +18,8 @@ struct wlr_data_offer *data_offer_create(struct wl_client *client, void data_offer_update_action(struct wlr_data_offer *offer); struct wlr_client_data_source *client_data_source_create( - struct wl_client *client, uint32_t version, uint32_t id); + struct wl_client *client, uint32_t version, uint32_t id, + struct wl_list *resource_list); struct wlr_client_data_source *client_data_source_from_resource( struct wl_resource *resource); struct wlr_data_offer *data_source_send_offer(struct wlr_data_source *source, diff --git a/include/types/wlr_seat.h b/include/types/wlr_seat.h index b76525ec..15f1dc38 100644 --- a/include/types/wlr_seat.h +++ b/include/types/wlr_seat.h @@ -10,11 +10,14 @@ const struct wlr_touch_grab_interface default_touch_grab_impl; void seat_client_create_pointer(struct wlr_seat_client *seat_client, uint32_t version, uint32_t id); +void seat_client_destroy_pointer(struct wl_resource *resource); void seat_client_create_keyboard(struct wlr_seat_client *seat_client, uint32_t version, uint32_t id); +void seat_client_destroy_keyboard(struct wl_resource *resource); void seat_client_create_touch(struct wlr_seat_client *seat_client, uint32_t version, uint32_t id); +void seat_client_destroy_touch(struct wl_resource *resource); #endif diff --git a/include/wlr/types/wlr_data_device.h b/include/wlr/types/wlr_data_device.h index 6fb41c29..80d4bc8b 100644 --- a/include/wlr/types/wlr_data_device.h +++ b/include/wlr/types/wlr_data_device.h @@ -15,8 +15,16 @@ wlr_touch_grab_interface wlr_data_device_touch_drag_interface; struct wlr_data_device_manager { struct wl_global *global; + struct wl_list wl_resources; + struct wl_list data_sources; struct wl_listener display_destroy; + + struct { + struct wl_signal destroy; + } events; + + void *data; }; struct wlr_data_offer { diff --git a/include/wlr/types/wlr_linux_dmabuf.h b/include/wlr/types/wlr_linux_dmabuf.h index 3fe8e1fc..531e68ab 100644 --- a/include/wlr/types/wlr_linux_dmabuf.h +++ b/include/wlr/types/wlr_linux_dmabuf.h @@ -25,8 +25,7 @@ struct wlr_dmabuf_buffer_attribs { uint64_t modifier[WLR_LINUX_DMABUF_MAX_PLANES]; int fd[WLR_LINUX_DMABUF_MAX_PLANES]; /* set via params_create */ - int32_t width; - int32_t height; + int32_t width, height; uint32_t format; uint32_t flags; }; @@ -61,8 +60,15 @@ struct wlr_dmabuf_buffer *wlr_dmabuf_buffer_from_params_resource( /* the protocol interface */ struct wlr_linux_dmabuf { struct wl_global *wl_global; - struct wl_listener display_destroy; struct wlr_renderer *renderer; + struct wl_list wl_resources; + + struct { + struct wl_signal destroy; + } events; + + struct wl_listener display_destroy; + struct wl_listener renderer_destroy; }; /** |