pub struct PrimarySelectionDevice { /* private fields */ }
Expand description
Handle to support primary selection on a given seat.
This type provides you with copy/paste actions. It is associated with a seat upon creation.
Implementations
sourceimpl PrimarySelectionDevice
impl PrimarySelectionDevice
sourcepub fn init_for_seat(
manager: &PrimarySelectionDeviceManager,
seat: &WlSeat
) -> Self
pub fn init_for_seat(
manager: &PrimarySelectionDeviceManager,
seat: &WlSeat
) -> Self
Create the PrimarySelectionDevice
helper for this seat.
sourcepub fn set_selection(
&self,
source: &Option<PrimarySelectionSource>,
serial: u32
)
pub fn set_selection(
&self,
source: &Option<PrimarySelectionSource>,
serial: u32
)
Provide a primary selection source as the new content for the primary selection.
Correspond to traditional copy/paste behavior. Setting the source to None
will clear
the selection.
sourcepub fn with_selection<F: FnOnce(Option<&PrimarySelectionOffer>) -> T, T>(
&self,
f: F
) -> T
pub fn with_selection<F: FnOnce(Option<&PrimarySelectionOffer>) -> T, T>(
&self,
f: F
) -> T
Access the PrimarySelectionOffer
currently associated with the primary selection buffer.
Trait Implementations
sourceimpl Debug for PrimarySelectionDevice
impl Debug for PrimarySelectionDevice
Auto Trait Implementations
impl !RefUnwindSafe for PrimarySelectionDevice
impl Send for PrimarySelectionDevice
impl Sync for PrimarySelectionDevice
impl Unpin for PrimarySelectionDevice
impl !UnwindSafe for PrimarySelectionDevice
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