ext_data_control_source_v1¤
wayland.ext_data_control_source_v1 ¤
Offer to transfer data
The ext_data_control_source object is the source side of a ext_data_control_offer. It is created by the source client in a data transfer and provides a way to describe the offered data and a way to respond to requests to transfer the data.
Methods:
-
offer
–Add an offered mime type
-
destroy
–Destroy this source
-
on_send
–Send the data.
-
on_cancelled
–Selection was cancelled.
error ¤
-
invalid_offer
–Offer sent after `ext_data_control_device`.`set_selection`
events
offer ¤
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.
Calling this after ext_data_control_device.set_selection is a protocol error.
Parameters:
on_send ¤
on_send(mime_type: str, fd: fd) -> None
Send the data.
Override to handle wayland.ext_data_control_source_v1.events.send
.
on_cancelled ¤
on_cancelled() -> None
Selection was cancelled.
Override to handle wayland.ext_data_control_source_v1.events.cancelled
.