package wayland

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Offer to transfer primary selection contents.

A wp_primary_selection_offer represents an offer to transfer the contents of the primary selection clipboard to the client. Similar to wl_data_offer, the offer also describes the mime types that the data can be converted to and provides the mechanisms for transferring the data directly to the client.

type 'v t = ([ `Zwp_primary_selection_offer_v1 ], 'v, [ `Client ]) Wayland.Proxy.t

Version 1

val destroy : [< `V1 ] t -> unit

Destroy the primary selection offer.

Destroy the primary selection offer.

val receive : [< `V1 ] t -> mime_type:string -> fd:Unix.file_descr -> unit

Request that the data is transferred.

To transfer the contents of the primary selection clipboard, the client issues this request and indicates the mime type that it wants to receive. The transfer happens through the passed file descriptor (typically created with the pipe system call). The source client writes the data in the mime type representation requested and then closes the file descriptor.

The receiving client reads from the read end of the pipe until EOF and closes its end, at which point the transfer is complete.

Handlers

Note: Servers will always want to use v1.

class virtual +'a v1 : object ... end

Handler for a proxy with version >= 1.