Skip to content

zwp_primary_selection_source_v1¤

wayland.zwp_primary_selection_source_v1 ¤

Offer to replace the contents of the primary selection

The source side of a wp_primary_selection_offer, it provides a way to describe the offered data and respond to requests to transfer the requested contents of the primary selection clipboard.

Methods:

  • offer

    Add an offered mime type

  • destroy

    Destroy the primary selection source

  • on_send

    Send the primary selection contents.

  • on_cancelled

    Request for primary selection contents was canceled.

events

send ¤

send(mime_type: str, fd: fd) -> None

Send the primary selection contents

Request for the current primary selection contents from the client. Send the specified mime type over the passed file descriptor, then close it.

cancelled ¤

cancelled() -> None

Request for primary selection contents was canceled

This primary selection source is no longer valid. The client should clean up and destroy this primary selection source.

offer ¤

offer(mime_type: str) -> None

Add an offered mime type

This request adds a mime type to the set of mime types advertised to targets. Can be called several times to offer multiple types.

destroy ¤

destroy() -> None

Destroy the primary selection source

Destroy the primary selection source.

on_send ¤

on_send(mime_type: str, fd: fd) -> None

Send the primary selection contents.

Override to handle wayland.zwp_primary_selection_source_v1.events.send.

on_cancelled ¤

on_cancelled() -> None

Request for primary selection contents was canceled.

Override to handle wayland.zwp_primary_selection_source_v1.events.cancelled.