Struct smithay_client_toolkit::data_device::DataOffer [−][src]
pub struct DataOffer { /* fields omitted */ }
Expand description
A data offer for receiving data though copy/paste or drag and drop
Implementations
Access the list of mime types proposed by this offer
Get the list of available actions for this offer
Get the currently set final action for this offer
Accept a mime type for receiving data through this offer
Request to receive the data of a given mime type
You can do this several times, as a reaction to motion of the dnd cursor, or to inspect the data in order to choose your response.
Note that you should not read the contents right away in a blocking way, as you may deadlock your application doing so. At least make sure you flush your events to the server before doing so.
Fails if too many file descriptors were already open and a pipe could not be created.
Notify the send and compositor of the dnd actions you accept
You need to provide the set of supported actions, as well as a single preferred action.