Interface WlDataSourceEvents
- All Known Subinterfaces:
WlDataSourceEventsV2
,WlDataSourceEventsV3
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
cancelled
(WlDataSourceProxy emitter) selection was cancelledvoid
send
(WlDataSourceProxy emitter, String mimeType, int fd) send the datavoid
target
(WlDataSourceProxy emitter, String mimeType) a target accepts an offered mime type
-
Field Details
-
VERSION
static final int VERSION- See Also:
-
-
Method Details
-
target
a target accepts an offered mime typeSent when a target accepts pointer_focus or motion events. If a target does not accept any of the offered types, type is NULL.
Used for feedback during drag-and-drop.
- Parameters:
emitter
- The protocol object that emitted the event.mimeType
- mime type accepted by the target
-
send
send the dataRequest for data from the client. Send the data as the specified mime type over the passed file descriptor, then close it.
- Parameters:
emitter
- The protocol object that emitted the event.mimeType
- mime type for the datafd
- file descriptor for the data
-
cancelled
selection was cancelledThis data source is no longer valid. There are several reasons why this could happen:
- The data source has been replaced by another data source. - The drag-and-drop operation was performed, but the drop destination did not accept any of the mime types offered through wl_data_source.target. - The drag-and-drop operation was performed, but the drop destination did not select any of the actions present in the mask offered through wl_data_source.action. - The drag-and-drop operation was performed but didn't happen over a surface. - The compositor cancelled the drag-and-drop operation (e.g. compositor dependent timeouts to avoid stale drag-and-drop transfers).
The client should clean up and destroy this data source.
For objects of version 2 or older, wl_data_source.cancelled will only be emitted if the data source was replaced by another data source.
- Parameters:
emitter
- The protocol object that emitted the event.
-