Struct smithay_client_toolkit::data_device::DataDevice[][src]

pub struct DataDevice { /* fields omitted */ }
Expand description

Handle to support data exchange on a given seat

This type provides you with functionality to send and receive data through drag’n’drop or copy/paste actions. It is associated with a seat upon creation.

Implementations

Create the DataDevice helper for this seat.

You need to provide an implementation that will handle drag’n’drop events.

Start a drag’n’drop offer

You need to specify the origin surface, as well a serial associated to an implicit grab on this surface (for example received by a pointer click).

An optional DataSource can be provided. If it is None, this drag’n’drop will be considered as internal to your application, and other applications will not be notified of it. You are then responsible for acting accordingly on drop.

You also need to specify which possible drag’n’drop actions are associated to this drag (copy, move, or ask), the final action will be chosen by the target and/or compositor.

You can finally provide a surface that will be used as an icon associated with this drag’n’drop for user visibility.

Provide a data source as the new content for the selection

Correspond to traditional copy/paste behavior. Setting the source to None will clear the selection.

Access the DataOffer currently associated with the selection buffer

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

Performs the conversion.

Performs the conversion.

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.