Functions that deal with creating, destroying, or interacting with Wayland Drag-n-Drop. More...
Functions | |
EAPI void | ecore_wl2_dnd_drag_types_set (Ecore_Wl2_Input *input, const char **types) |
Set the types which are supported by a possible drag and drop operation. More... | |
EAPI uint32_t | ecore_wl2_dnd_drag_start (Ecore_Wl2_Input *input, Ecore_Wl2_Window *window, Ecore_Wl2_Window *drag_window) |
Start a drag on the given input. More... | |
EAPI void | ecore_wl2_dnd_set_actions (Ecore_Wl2_Input *input) |
Call wl_data_source.set_actions on an existing source. More... | |
EAPI void | ecore_wl2_dnd_drag_end (Ecore_Wl2_Input *input) |
End a drag started by a call to ecore_wl2_dnd_drag_start. More... | |
EAPI Ecore_Wl2_Offer * | ecore_wl2_dnd_selection_get (Ecore_Wl2_Input *input) |
Get the offer which is currently resposible for the clipboard. More... | |
EAPI uint32_t | ecore_wl2_dnd_selection_set (Ecore_Wl2_Input *input, const char **types) |
Set the types which are available from this client Later the event ECORE_WL2_EVENT_DATA_SOURCE_SEND is emitted, where the caller of this api must write the data (encoded in the given mimetype) to the fd. More... | |
EAPI uint32_t | ecore_wl2_dnd_selection_clear (Ecore_Wl2_Input *input) |
Clear the selection currently setted on this input. More... | |
EAPI Ecore_Wl2_Drag_Action | ecore_wl2_offer_actions_get (Ecore_Wl2_Offer *offer) |
Get the actions available from the data source. More... | |
EAPI void | ecore_wl2_offer_actions_set (Ecore_Wl2_Offer *offer, Ecore_Wl2_Drag_Action actions, Ecore_Wl2_Drag_Action action) |
Set the actions which are supported by you. More... | |
EAPI Ecore_Wl2_Drag_Action | ecore_wl2_offer_action_get (Ecore_Wl2_Offer *offer) |
Get action which is set by either the data source or in the last call of actions_set. More... | |
EAPI Eina_Array * | ecore_wl2_offer_mimes_get (Ecore_Wl2_Offer *offer) |
Get the mime types which are given by the source. More... | |
EAPI void | ecore_wl2_offer_mimes_set (Ecore_Wl2_Offer *offer, Eina_Array *mimes) |
Set mimetypes you are accepting under this offer. More... | |
EAPI void | ecore_wl2_offer_accept (Ecore_Wl2_Offer *offer, const char *mime_type) |
Accept a single mime type for an offer. More... | |
EAPI void | ecore_wl2_offer_receive (Ecore_Wl2_Offer *offer, char *mime) |
Request the data from this offer. More... | |
EAPI void | ecore_wl2_offer_proxy_receive (Ecore_Wl2_Offer *offer, const char *mime, int fd) |
Request the data from this offer on an externally managed fd. More... | |
EAPI void | ecore_wl2_offer_proxy_receive_end (Ecore_Wl2_Offer *offer) |
End the use of a proxy received offer. More... | |
EAPI Eina_Bool | ecore_wl2_offer_supports_mime (Ecore_Wl2_Offer *offer, const char *mime) |
Check if the given offer supports the given mimetype. More... | |
EAPI void | ecore_wl2_offer_finish (Ecore_Wl2_Offer *offer) |
Mark this offer as finished This will call the dnd_finished event on the source of the sender. More... | |
Functions that deal with creating, destroying, or interacting with Wayland Drag-n-Drop.
EAPI void ecore_wl2_dnd_drag_types_set | ( | Ecore_Wl2_Input * | input, |
const char ** | types | ||
) |
Set the types which are supported by a possible drag and drop operation.
This call initializes a data source and offeres the given mimetypes
input | the input where to add on the data source |
types | a null-terminated array of mimetypes |
References EINA_SAFETY_ON_NULL_RETURN, and ERR.
EAPI uint32_t ecore_wl2_dnd_drag_start | ( | Ecore_Wl2_Input * | input, |
Ecore_Wl2_Window * | window, | ||
Ecore_Wl2_Window * | drag_window | ||
) |
Start a drag on the given input.
input | the input to use |
window | the window which is the origin of the drag operation |
drag_window | the window which is used as window of the visible hint. |
References ecore_wl2_input_cursor_from_name_set(), ecore_wl2_window_surface_get(), and EINA_SAFETY_ON_NULL_RETURN_VAL.
EAPI void ecore_wl2_dnd_set_actions | ( | Ecore_Wl2_Input * | input | ) |
Call wl_data_source.set_actions on an existing source.
input | the input to use |
References EINA_SAFETY_ON_NULL_RETURN.
EAPI void ecore_wl2_dnd_drag_end | ( | Ecore_Wl2_Input * | input | ) |
End a drag started by a call to ecore_wl2_dnd_drag_start.
input | the input object on which the drag was started |
References ecore_event_add(), ECORE_WL2_EVENT_DND_END, and EINA_SAFETY_ON_NULL_RETURN.
EAPI Ecore_Wl2_Offer * ecore_wl2_dnd_selection_get | ( | Ecore_Wl2_Input * | input | ) |
Get the offer which is currently resposible for the clipboard.
input | the input object to use |
References EINA_SAFETY_ON_NULL_RETURN_VAL.
EAPI uint32_t ecore_wl2_dnd_selection_set | ( | Ecore_Wl2_Input * | input, |
const char ** | types | ||
) |
Set the types which are available from this client Later the event ECORE_WL2_EVENT_DATA_SOURCE_SEND is emitted, where the caller of this api must write the data (encoded in the given mimetype) to the fd.
input | the input to provice this types on |
types | a null-terminated array of mimetypes supported by the client |
References EINA_SAFETY_ON_NULL_RETURN_VAL, and ERR.
EAPI uint32_t ecore_wl2_dnd_selection_clear | ( | Ecore_Wl2_Input * | input | ) |
Clear the selection currently setted on this input.
input | the input to clear |
References EINA_SAFETY_ON_NULL_RETURN_VAL.
EAPI Ecore_Wl2_Drag_Action ecore_wl2_offer_actions_get | ( | Ecore_Wl2_Offer * | offer | ) |
Get the actions available from the data source.
offer | Offer object to use |
EAPI void ecore_wl2_offer_actions_set | ( | Ecore_Wl2_Offer * | offer, |
Ecore_Wl2_Drag_Action | actions, | ||
Ecore_Wl2_Drag_Action | action | ||
) |
Set the actions which are supported by you.
offer | Offer object to use |
actions | A or´ed value of mutliple Ecore_Wl2_Drag_Action values |
action | the preferred action out of the actions |
References EINA_SAFETY_ON_NULL_RETURN.
EAPI Ecore_Wl2_Drag_Action ecore_wl2_offer_action_get | ( | Ecore_Wl2_Offer * | offer | ) |
Get action which is set by either the data source or in the last call of actions_set.
offer | Offer object to use |
References EINA_SAFETY_ON_NULL_RETURN_VAL.
EAPI Eina_Array * ecore_wl2_offer_mimes_get | ( | Ecore_Wl2_Offer * | offer | ) |
Get the mime types which are given by the source.
offer | the offer to query |
References EINA_SAFETY_ON_NULL_RETURN_VAL.
EAPI void ecore_wl2_offer_mimes_set | ( | Ecore_Wl2_Offer * | offer, |
Eina_Array * | mimes | ||
) |
Set mimetypes you are accepting under this offer.
offer | the offer to use |
References eina_array_foreach(), and EINA_SAFETY_ON_NULL_RETURN.
EAPI void ecore_wl2_offer_accept | ( | Ecore_Wl2_Offer * | offer, |
const char * | mime_type | ||
) |
Accept a single mime type for an offer.
offer | the offer to use |
mime_type | the mime type |
References EINA_SAFETY_ON_NULL_RETURN.
EAPI void ecore_wl2_offer_receive | ( | Ecore_Wl2_Offer * | offer, |
char * | mime | ||
) |
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.
offer | the offer to use |
mime | the mimetype to receive |
References ECORE_FD_ERROR, ECORE_FD_READ, ecore_main_fd_handler_file_add(), eina_list_append(), EINA_SAFETY_ON_NULL_RETURN, and ERR.
EAPI void ecore_wl2_offer_proxy_receive | ( | Ecore_Wl2_Offer * | offer, |
const char * | mime, | ||
int | fd | ||
) |
Request the data from this offer on an externally managed fd.
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.
offer | the offer to use |
mime | the mimetype to receive |
fd | the fd to pass for receiving |
References EINA_SAFETY_ON_NULL_RETURN.
EAPI void ecore_wl2_offer_proxy_receive_end | ( | Ecore_Wl2_Offer * | offer | ) |
End the use of a proxy received offer.
This may invalidate the offer object
offer | the offer |
References EINA_SAFETY_ON_NULL_RETURN.
Check if the given offer supports the given mimetype.
offer | the offer to use |
mime | the mimetype to check |
References eina_array_foreach(), EINA_FALSE, and EINA_SAFETY_ON_NULL_RETURN_VAL.
EAPI void ecore_wl2_offer_finish | ( | Ecore_Wl2_Offer * | offer | ) |
Mark this offer as finished This will call the dnd_finished event on the source of the sender.
offer | the offer to use |
References EINA_SAFETY_ON_NULL_RETURN.