pub trait PrimarySelectionHandling {
    // Required methods
    fn with_primary_selection<F: FnOnce(&PrimarySelectionDevice)>(
        &self,
        seat: &WlSeat,
        f: F
    ) -> Result<(), MissingGlobal>;
    fn get_primary_selection_manager(
        &self
    ) -> Option<PrimarySelectionDeviceManager>;
}
Expand description

An interface trait to forward the primary selection device handler capability.

You need to implement this trait for your environment struct, by delegating it to its PrimarySelectionHandler field in order to get the associated methods on your Environment.

Required Methods§

source

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) or if the zwp_primary_selection_device_manager_v1 or gtk_primary_selection_device_manager globals are missing.

source

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.

Object Safety§

This trait is not object safe.

Implementors§