zwlr_data_control_device_v1¤
wayland.zwlr_data_control_device_v1 ¤
Manage a data device for a seat
This interface allows a client to manage a seat's selection.
When the seat is destroyed, this object becomes inert.
Methods:
-
set_selection
–Copy data to the selection
-
destroy
–Destroy this data device
-
set_primary_selection
–Copy data to the primary selection
-
on_data_offer
–Introduce a new
wlr_data_control_offer
. -
on_selection
–Advertise new selection.
-
on_finished
–This data control is no longer valid.
-
on_primary_selection
–Advertise new primary selection.
error ¤
-
used_source
–Source given to `set_selection` or `set_primary_selection` was already used before
events
data_offer ¤
data_offer(id: zwlr_data_control_offer_v1) -> None
Introduce a new wlr_data_control_offer
The data_offer event introduces a new wlr_data_control_offer object, which will subsequently be used in either the wlr_data_control_device.selection event (for the regular clipboard selections) or the wlr_data_control_device.primary_selection event (for the primary clipboard selections). Immediately following the wlr_data_control_device.data_offer event, the new data_offer object will send out wlr_data_control_offer.offer events to describe the MIME types it offers.
selection ¤
selection(id: zwlr_data_control_offer_v1) -> None
Advertise new selection
The selection event is sent out to notify the client of a new wlr_data_control_offer for the selection for this device. The wlr_data_control_device.data_offer and the wlr_data_control_offer.offer events are sent out immediately before this event to introduce the data offer object. The selection event is sent to a client when a new selection is set. The wlr_data_control_offer is valid until a new wlr_data_control_offer or NULL is received. The client must destroy the previous selection wlr_data_control_offer, if any, upon receiving this event.
The first selection event is sent upon binding the wlr_data_control_device object.
finished ¤
finished() -> None
This data control is no longer valid
This data control object is no longer valid and should be destroyed by the client.
primary_selection ¤
primary_selection(id: zwlr_data_control_offer_v1) -> None
Advertise new primary selection
The primary_selection event is sent out to notify the client of a new wlr_data_control_offer for the primary selection for this device. The wlr_data_control_device.data_offer and the wlr_data_control_offer.offer events are sent out immediately before this event to introduce the data offer object. The primary_selection event is sent to a client when a new primary selection is set. The wlr_data_control_offer is valid until a new wlr_data_control_offer or NULL is received. The client must destroy the previous primary selection wlr_data_control_offer, if any, upon receiving this event.
If the compositor supports primary selection, the first primary_selection event is sent upon binding the wlr_data_control_device object.
set_selection ¤
set_selection(source: zwlr_data_control_source_v1) -> None
Copy data to the selection
This request asks the compositor to set the selection to the data from the source on behalf of the client.
The given source may not be used in any further set_selection or set_primary_selection requests. Attempting to use a previously used source is a protocol error.
To unset the selection, set the source to NULL.
set_primary_selection ¤
set_primary_selection(source: zwlr_data_control_source_v1) -> None
Copy data to the primary selection
This request asks the compositor to set the primary selection to the data from the source on behalf of the client.
The given source may not be used in any further set_selection or set_primary_selection requests. Attempting to use a previously used source is a protocol error.
To unset the primary selection, set the source to NULL.
The compositor will ignore this request if it does not support primary selection.
on_data_offer ¤
on_data_offer(id: zwlr_data_control_offer_v1) -> None
Introduce a new wlr_data_control_offer
.
Override to handle wayland.zwlr_data_control_device_v1.events.data_offer
.
on_selection ¤
on_selection(id: zwlr_data_control_offer_v1) -> None
Advertise new selection.
Override to handle wayland.zwlr_data_control_device_v1.events.selection
.
on_finished ¤
on_finished() -> None
This data control is no longer valid.
Override to handle wayland.zwlr_data_control_device_v1.events.finished
.
on_primary_selection ¤
on_primary_selection(id: zwlr_data_control_offer_v1) -> None
Advertise new primary selection.
Override to handle wayland.zwlr_data_control_device_v1.events.primary_selection
.