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§
source§impl DataDeviceHandler
impl DataDeviceHandler
sourcepub fn init<S>(seat_handler: &mut S) -> DataDeviceHandlerwhere
S: SeatHandling,
pub fn init<S>(seat_handler: &mut S) -> DataDeviceHandlerwhere
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§
source§impl DataDeviceHandling for DataDeviceHandler
impl DataDeviceHandling for DataDeviceHandler
source§fn 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
source§fn 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
source§impl Debug for DataDeviceHandler
impl Debug for DataDeviceHandler
source§impl GlobalHandler<WlDataDeviceManager> for DataDeviceHandler
impl GlobalHandler<WlDataDeviceManager> for DataDeviceHandler
source§fn created(
&mut self,
registry: Attached<WlRegistry>,
id: u32,
version: u32,
_: DispatchData<'_>
)
fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, _: DispatchData<'_> )
This global was created and signaled in the registry with given id and version
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more