[][src]Trait smithay_client_toolkit::primary_selection::PrimarySelectionHandling

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

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

fn with_primary_selection<F: FnOnce(&PrimarySelectionDevice)>(
    &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.

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.

Loading content...

Implementors

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]

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.

Loading content...