Skip to content

zwp_primary_selection_device_v1¤

wayland.zwp_primary_selection_device_v1 ¤

Methods:

events

data_offer ¤

data_offer(offer: zwp_primary_selection_offer_v1) -> None

Introduce a new wp_primary_selection_offer

Introduces a new wp_primary_selection_offer object that may be used to receive the current primary selection. Immediately following this event, the new wp_primary_selection_offer object will send wp_primary_selection_offer.offer events to describe the offered mime types.

selection ¤

selection(id: zwp_primary_selection_offer_v1) -> None

Advertise a new primary selection

The wp_primary_selection_device.selection event is sent to notify the client of a new primary selection. This event is sent after the wp_primary_selection.data_offer event introducing this object, and after the offer has announced its mimetypes through wp_primary_selection_offer.offer.

The data_offer is valid until a new offer or NULL is received or until the client loses keyboard focus. The client must destroy the previous selection data_offer, if any, upon receiving this event.

set_selection ¤

set_selection(source: zwp_primary_selection_source_v1, serial: int) -> None

Set the primary selection

Replaces the current selection. The previous owner of the primary selection will receive a wp_primary_selection_source.cancelled event.

To unset the selection, set the source to NULL.

Parameters:

  • serial ¤

    (int) –

    Serial of the event that triggered this request

destroy ¤

destroy() -> None

Destroy the primary selection device

Destroy the primary selection device.

on_data_offer ¤

on_data_offer(offer: zwp_primary_selection_offer_v1) -> None

Introduce a new wp_primary_selection_offer.

Override to handle wayland.zwp_primary_selection_device_v1.events.data_offer.

on_selection ¤

on_selection(id: zwp_primary_selection_offer_v1) -> None

Advertise a new primary selection.

Override to handle wayland.zwp_primary_selection_device_v1.events.selection.