Enum smithay_client_toolkit::data_device::DndEvent[][src]

pub enum DndEvent<'a> {
    Enter {
        offer: Option<&'a DataOffer>,
        serial: u32,
        surface: WlSurface,
        x: f64,
        y: f64,
    },
    Motion {
        offer: Option<&'a DataOffer>,
        time: u32,
        x: f64,
        y: f64,
    },
    Leave,
    Drop {
        offer: Option<&'a DataOffer>,
    },
}
Expand description

Possible events generated during a drag’n’drop session

Variants

Enter

A new drag’n’drop entered your surfaces

Fields of Enter

offer: Option<&'a DataOffer>

The associated data offer

Is None if it is an internal drag’n’drop you started with no source. See DataDevice::start_drag for details.

serial: u32

A serial associated with the entry of this dnd

surface: WlSurface

The entered surface

x: f64

horizontal location on the surface

y: f64

vertical location on the surface

Motion

The drag’n’drop offer moved on the surface

Fields of Motion

offer: Option<&'a DataOffer>

The associated data offer

Is None if it is an internal drag’n’drop you started with no source. See DataDevice::start_drag for details.

time: u32

The time of this motion

x: f64

new horizontal location

y: f64

new vertical location

Leave

The drag’n’drop offer left your surface

Drop

The drag’n’drop was dropped on your surface

Fields of Drop

offer: Option<&'a DataOffer>

The associated data offer

Is None if it is an internal drag’n’drop you started with no source. See DataDevice::start_drag for details.

Trait Implementations

Formats the value using the given formatter. 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.