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

Fields

§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

A new drag’n’drop entered your surfaces

§

Motion

Fields

§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

The drag’n’drop offer moved on the surface

§

Leave

The drag’n’drop offer left your surface

§

Drop

Fields

§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.

The drag’n’drop was dropped on your surface

Trait Implementations§

source§

impl<'a> Debug for DndEvent<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for DndEvent<'a>

§

impl<'a> Send for DndEvent<'a>

§

impl<'a> Sync for DndEvent<'a>

§

impl<'a> Unpin for DndEvent<'a>

§

impl<'a> !UnwindSafe for DndEvent<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.