zwlr_data_control_offer_v1¤
wayland.zwlr_data_control_offer_v1 ¤
Offer to transfer data
A wlr_data_control_offer represents a piece of data offered for transfer by another client (the source client). The offer describes the different MIME types that the data can be converted to and provides the mechanism for transferring the data directly from the source client.
Methods:
-
receive
–Request that the data is transferred
-
destroy
–Destroy this offer
-
on_offer
–Advertise offered mime type.
events
receive ¤
Request that the data is transferred
To transfer the offered data, the client issues this request and indicates the MIME type 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 then closes its end, at which point the transfer is complete.
This request may happen multiple times for different MIME types.
Parameters:
on_offer ¤
on_offer(mime_type: str) -> None
Advertise offered mime type.
Override to handle wayland.zwlr_data_control_offer_v1.events.offer
.