pub struct PrimarySelectionHandler { /* private fields */ }
Expand description
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§
source§impl PrimarySelectionHandler
impl PrimarySelectionHandler
sourcepub fn init<S: SeatHandling>(seat_handler: &mut S) -> Self
pub fn init<S: SeatHandling>(seat_handler: &mut S) -> Self
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§
source§impl Debug for PrimarySelectionHandler
impl Debug for PrimarySelectionHandler
source§impl GlobalHandler<GtkPrimarySelectionDeviceManager> for PrimarySelectionHandler
impl GlobalHandler<GtkPrimarySelectionDeviceManager> for PrimarySelectionHandler
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<'_> )
source§impl GlobalHandler<ZwpPrimarySelectionDeviceManagerV1> for PrimarySelectionHandler
impl GlobalHandler<ZwpPrimarySelectionDeviceManagerV1> for PrimarySelectionHandler
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<'_> )
source§impl PrimarySelectionHandling for PrimarySelectionHandler
impl PrimarySelectionHandling for PrimarySelectionHandler
source§fn get_primary_selection_manager(&self) -> Option<PrimarySelectionDeviceManager>
fn get_primary_selection_manager(&self) -> Option<PrimarySelectionDeviceManager>
Get the best available primary selection device manager protocol.
Returns None
if no primary selection device manager was advertised.
source§fn with_primary_selection<F: FnOnce(&PrimarySelectionDevice)>(
&self,
seat: &WlSeat,
f: F
) -> Result<(), MissingGlobal>
fn with_primary_selection<F: FnOnce(&PrimarySelectionDevice)>( &self, seat: &WlSeat, f: F ) -> Result<(), MissingGlobal>
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.