pub enum DataDeviceEvent {
    NewSelection(Option<Resource<WlDataSource>>),
    DnDStarted {
        source: Option<Resource<WlDataSource>>,
        icon: Option<Resource<WlSurface>>,
    },
    DnDDropped,
    SendSelection {
        mime_type: String,
        fd: RawFd,
    },
}
Expand description

Events that are generated by interactions of the clients with the data device

Variants§

§

NewSelection(Option<Resource<WlDataSource>>)

A client has set the selection

§

DnDStarted

Fields

§source: Option<Resource<WlDataSource>>

The data source provided by the client

If it is None, this means the DnD is restricted to surfaces of the same client and the client will manage data transfert by itself.

§icon: Option<Resource<WlSurface>>

The icon the client requested to be used to be associated with the cursor icon during the drag’n’drop.

A client started a drag’n’drop as response to a user pointer action

§

DnDDropped

The drag’n’drop action was finished by the user releasing the buttons

At this point, any pointer icon should be removed.

Note that this event will only be genrated for client-initiated drag’n’drop session.

§

SendSelection

Fields

§mime_type: String

the requested mime type

§fd: RawFd

the fd to write into

A client requested to read the server-set selection

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 alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Sets value as a parameter of self.
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.