Struct smithay_client_toolkit::data_device::DataDeviceHandler[][src]

pub struct DataDeviceHandler { /* fields omitted */ }

A handler for data devices

It provides automatic tracking of data device for each available seat, allowing you to manipulate selection clipboard and drag&drop manipulations.

It is automatically included in the default_environment!.

Implementations

impl DataDeviceHandler[src]

pub fn init<S>(seat_handler: &mut S) -> DataDeviceHandler where
    S: SeatHandling
[src]

Initialize a data device handler

It needs access to a seat handler in order to track the creation and removal of seats.

Trait Implementations

impl DataDeviceHandling for DataDeviceHandler[src]

fn set_callback<F: FnMut(WlSeat, DndEvent<'_>, DispatchData<'_>) + 'static>(
    &mut self,
    callback: F
) -> Result<(), MissingGlobal>
[src]

Set the global drag’n’drop callback Read more

fn with_device<F: FnOnce(&DataDevice)>(
    &self,
    seat: &WlSeat,
    f: F
) -> Result<(), MissingGlobal>
[src]

Access the data device associated with a seat Read more

impl GlobalHandler<WlDataDeviceManager> for DataDeviceHandler[src]

fn created(
    &mut self,
    registry: Attached<WlRegistry>,
    id: u32,
    version: u32,
    _: DispatchData<'_>
)
[src]

This global was created and signaled in the registry with given id and version

fn get(&self) -> Option<Attached<WlDataDeviceManager>>[src]

Access the global if it was signaled

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.