pub struct DataOffer { /* private fields */ }
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.

Notify that you are finished with this offer, and will no longer be using it

Note that it is a protocol error to finish if no action or mime type was accepted.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.