data-device: add wlr_data_offer.type

This commit is contained in:
emersion 2018-12-09 17:27:37 +01:00
parent 3f82eb1853
commit 909b3b16f3
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
6 changed files with 23 additions and 7 deletions

View file

@ -17,7 +17,7 @@ struct wlr_client_data_source {
extern const struct wlr_surface_role drag_icon_surface_role;
struct wlr_data_offer *data_offer_create(struct wl_resource *device_resource,
struct wlr_data_source *source);
struct wlr_data_source *source, enum wlr_data_offer_type type);
void data_offer_update_action(struct wlr_data_offer *offer);
void data_offer_destroy(struct wlr_data_offer *offer);

View file

@ -35,9 +35,15 @@ struct wlr_data_device_manager {
void *data;
};
enum wlr_data_offer_type {
WLR_DATA_OFFER_SELECTION,
WLR_DATA_OFFER_DRAG,
};
struct wlr_data_offer {
struct wl_resource *resource;
struct wlr_data_source *source;
enum wlr_data_offer_type type;
uint32_t actions;
enum wl_data_device_manager_dnd_action preferred_action;