pub struct DataDeviceHandler { /* private fields */ }
Expand description
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
sourceimpl DataDeviceHandler
impl DataDeviceHandler
sourcepub fn init<S>(seat_handler: &mut S) -> DataDeviceHandler where
S: SeatHandling,
pub fn init<S>(seat_handler: &mut S) -> DataDeviceHandler where
S: SeatHandling,
Initialize a data device handler
It needs access to a seat handler in order to track the creation and removal of seats.
Trait Implementations
sourceimpl DataDeviceHandling for DataDeviceHandler
impl DataDeviceHandling for DataDeviceHandler
sourcefn set_callback<F: FnMut(WlSeat, DndEvent<'_>, DispatchData<'_>) + 'static>(
&mut self,
callback: F
) -> Result<(), MissingGlobal>
fn set_callback<F: FnMut(WlSeat, DndEvent<'_>, DispatchData<'_>) + 'static>(
&mut self,
callback: F
) -> Result<(), MissingGlobal>
Set the global drag’n’drop callback Read more
sourcefn with_device<F: FnOnce(&DataDevice)>(
&self,
seat: &WlSeat,
f: F
) -> Result<(), MissingGlobal>
fn with_device<F: FnOnce(&DataDevice)>(
&self,
seat: &WlSeat,
f: F
) -> Result<(), MissingGlobal>
Access the data device associated with a seat Read more
sourceimpl Debug for DataDeviceHandler
impl Debug for DataDeviceHandler
Auto Trait Implementations
impl !RefUnwindSafe for DataDeviceHandler
impl !Send for DataDeviceHandler
impl !Sync for DataDeviceHandler
impl Unpin for DataDeviceHandler
impl !UnwindSafe for DataDeviceHandler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more