Interface WlDataSourceRequestsV3
- All Superinterfaces:
WlDataSourceRequests
,WlDataSourceRequestsV2
The wl_data_source object is the source side of a wl_data_offer. It is created by the source client in a data transfer and provides a way to describe the offered data and a way to respond to requests to transfer the data.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy
(WlDataSourceResource requester) destroy the data sourcevoid
offer
(WlDataSourceResource requester, String mimeType) add an offered mime typevoid
setActions
(WlDataSourceResource requester, int dndActions) set the available drag-and-drop actions
-
Field Details
-
VERSION
static final int VERSION- See Also:
-
-
Method Details
-
offer
add an offered mime typeThis request adds a mime type to the set of mime types advertised to targets. Can be called several times to offer multiple types.
- Specified by:
offer
in interfaceWlDataSourceRequests
- Specified by:
offer
in interfaceWlDataSourceRequestsV2
- Parameters:
requester
- The protocol object that made the request.mimeType
- mime type offered by the data source
-
destroy
destroy the data sourceDestroy the data source.
- Specified by:
destroy
in interfaceWlDataSourceRequests
- Specified by:
destroy
in interfaceWlDataSourceRequestsV2
- Parameters:
requester
- The protocol object that made the request.
-
setActions
set the available drag-and-drop actionsSets the actions that the source side client supports for this operation. This request may trigger wl_data_source.action and wl_data_offer.action events if the compositor needs to change the selected action.
The dnd_actions argument must contain only values expressed in the wl_data_device_manager.dnd_actions enum, otherwise it will result in a protocol error.
This request must be made once only, and can only be made on sources used in drag-and-drop, so it must be performed before wl_data_device.start_drag. Attempting to use the source other than for drag-and-drop will raise a protocol error.
- Parameters:
requester
- The protocol object that made the request.dndActions
- actions supported by the data source
-