[−][src]Struct smithay_client_toolkit::primary_selection::PrimarySelectionHandler
A handler for primary selection.
It provides automatic tracking of primary selection device for each available seat, allowing you to manipulate the primary selection clipboard.
It's automatically included in the default_environment!
.
Implementations
impl PrimarySelectionHandler
[src]
pub fn init<S: SeatHandling>(seat_handler: &mut S) -> Self
[src]
Initialize a primary selection handler.
In requires the access to the seat handler in order to track the creation and removal of seats.
Trait Implementations
impl GlobalHandler<GtkPrimarySelectionDeviceManager> for PrimarySelectionHandler
[src]
fn created(
&mut self,
registry: Attached<WlRegistry>,
id: u32,
version: u32,
_: DispatchData<'_>
)
[src]
&mut self,
registry: Attached<WlRegistry>,
id: u32,
version: u32,
_: DispatchData<'_>
)
fn get(&self) -> Option<Attached<GtkPrimarySelectionDeviceManager>>
[src]
impl GlobalHandler<ZwpPrimarySelectionDeviceManagerV1> for PrimarySelectionHandler
[src]
fn created(
&mut self,
registry: Attached<WlRegistry>,
id: u32,
version: u32,
_: DispatchData<'_>
)
[src]
&mut self,
registry: Attached<WlRegistry>,
id: u32,
version: u32,
_: DispatchData<'_>
)
fn get(&self) -> Option<Attached<ZwpPrimarySelectionDeviceManagerV1>>
[src]
impl PrimarySelectionHandling for PrimarySelectionHandler
[src]
fn get_primary_selection_manager(&self) -> Option<PrimarySelectionDeviceManager>
[src]
Get the best available primary selection device manager protocol.
Returns None
if no primary selection device manager was advertised.
fn with_primary_selection<F: FnOnce(&PrimarySelectionDevice)>(
&self,
seat: &WlSeat,
f: F
) -> Result<(), ()>
[src]
&self,
seat: &WlSeat,
f: F
) -> Result<(), ()>
Access the primary selection associated with a seat.
Returns an error if the seat is not found (for example if it has since been removed by
the server) of if the zwp_primary_selection_device_manager_v1
or
gtk_primary_selection_device_manager
globals are missing.
Auto Trait Implementations
impl !RefUnwindSafe for PrimarySelectionHandler
impl !Send for PrimarySelectionHandler
impl !Sync for PrimarySelectionHandler
impl Unpin for PrimarySelectionHandler
impl !UnwindSafe for PrimarySelectionHandler
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,