discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f6964f50e3ed0da6ee853a57ca7e82181021112b
commit f6964f50e3ed0da6ee853a57ca7e82181021112b Author: Mike Blumenkrantz <[email protected]> Date: Fri May 12 12:08:32 2017 -0400 ecore-wl2: add function for accepting a single mime type @feature --- src/lib/ecore_wl2/Ecore_Wl2.h | 10 ++++++++++ src/lib/ecore_wl2/ecore_wl2_dnd.c | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index cd8146f..79cd8e5 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1380,6 +1380,16 @@ EAPI Eina_Array* ecore_wl2_offer_mimes_get(Ecore_Wl2_Offer *offer); EAPI void ecore_wl2_offer_mimes_set(Ecore_Wl2_Offer *offer, Eina_Array *mimes); /** + * Accept a single mime type for an offer + * + * @param offer the offer to use + * @param mime_type the mime type + * + * @since 1.20 + */ +EAPI void ecore_wl2_offer_accept(Ecore_Wl2_Offer *offer, const char *mime_type); + +/** * Request the data from this offer. * The event ECORE_WL2_EVENT_OFFER_DATA_READY is called when the data is available. * There offer will be not destroyed as long as requested data is not emitted by the event. diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c index 76e1459..e64fb21 100644 --- a/src/lib/ecore_wl2/ecore_wl2_dnd.c +++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c @@ -744,6 +744,14 @@ ecore_wl2_offer_mimes_set(Ecore_Wl2_Offer *offer, Eina_Array *mimes) wl_data_offer_accept(offer->offer, offer->serial, NULL); } +EAPI void +ecore_wl2_offer_accept(Ecore_Wl2_Offer *offer, const char *mime_type) +{ + EINA_SAFETY_ON_NULL_RETURN(offer); + + wl_data_offer_accept(offer->offer, offer->serial, mime_type); +} + typedef struct { int len; void *data; --
