[][src]Trait wayland_protocols::misc::gtk_primary_selection::server::gtk_primary_selection_offer::RequestHandler

pub trait RequestHandler {
    fn receive(
        &mut self,
        object: GtkPrimarySelectionOffer,
        mime_type: String,
        fd: RawFd
    ) { ... }
fn destroy(&mut self, object: GtkPrimarySelectionOffer) { ... } }

An interface for handling requests.

Provided methods

fn receive(
    &mut self,
    object: GtkPrimarySelectionOffer,
    mime_type: String,
    fd: RawFd
)

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.

fn destroy(&mut self, object: GtkPrimarySelectionOffer)

destroy the primary selection offer

Destroy the primary selection offer.

This is a destructor, you cannot send requests to this object any longer once this method is called.

Loading content...

Implementors

Loading content...