pub struct ZwlrDataControlDeviceV1 { /* private fields */ }
Expand description
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.
See also the Request enum for this interface.
Implementations§
Source§impl ZwlrDataControlDeviceV1
impl ZwlrDataControlDeviceV1
Sourcepub fn data_offer(&self, id: &ZwlrDataControlOfferV1)
pub fn data_offer(&self, id: &ZwlrDataControlOfferV1)
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.
Sourcepub fn selection(&self, id: Option<&ZwlrDataControlOfferV1>)
pub fn selection(&self, id: Option<&ZwlrDataControlOfferV1>)
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.
Sourcepub fn finished(&self)
pub fn finished(&self)
this data control is no longer valid
This data control object is no longer valid and should be destroyed by the client.
Sourcepub fn primary_selection(&self, id: Option<&ZwlrDataControlOfferV1>)
pub fn primary_selection(&self, id: Option<&ZwlrDataControlOfferV1>)
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.
Trait Implementations§
Source§impl Borrow<ObjectId> for ZwlrDataControlDeviceV1
impl Borrow<ObjectId> for ZwlrDataControlDeviceV1
Source§impl Clone for ZwlrDataControlDeviceV1
impl Clone for ZwlrDataControlDeviceV1
Source§fn clone(&self) -> ZwlrDataControlDeviceV1
fn clone(&self) -> ZwlrDataControlDeviceV1
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ZwlrDataControlDeviceV1
impl Debug for ZwlrDataControlDeviceV1
Source§impl Hash for ZwlrDataControlDeviceV1
impl Hash for ZwlrDataControlDeviceV1
Source§impl PartialEq<Weak<ZwlrDataControlDeviceV1>> for ZwlrDataControlDeviceV1
impl PartialEq<Weak<ZwlrDataControlDeviceV1>> for ZwlrDataControlDeviceV1
Source§impl PartialEq for ZwlrDataControlDeviceV1
impl PartialEq for ZwlrDataControlDeviceV1
Source§impl Resource for ZwlrDataControlDeviceV1
impl Resource for ZwlrDataControlDeviceV1
Source§fn object_data(&self) -> Option<&Arc<dyn Any + Send + Sync>>
fn object_data(&self) -> Option<&Arc<dyn Any + Send + Sync>>
Source§fn handle(&self) -> &WeakHandle
fn handle(&self) -> &WeakHandle
Source§fn from_id(conn: &DisplayHandle, id: ObjectId) -> Result<Self, InvalidId>
fn from_id(conn: &DisplayHandle, id: ObjectId) -> Result<Self, InvalidId>
Source§fn send_event(&self, evt: Self::Event<'_>) -> Result<(), InvalidId>
fn send_event(&self, evt: Self::Event<'_>) -> Result<(), InvalidId>
Source§fn parse_request(
conn: &DisplayHandle,
msg: Message<ObjectId, OwnedFd>,
) -> Result<(Self, Self::Request), DispatchError>
fn parse_request( conn: &DisplayHandle, msg: Message<ObjectId, OwnedFd>, ) -> Result<(Self, Self::Request), DispatchError>
Source§fn write_event<'a>(
&self,
conn: &DisplayHandle,
msg: Self::Event<'a>,
) -> Result<Message<ObjectId, BorrowedFd<'a>>, InvalidId>
fn write_event<'a>( &self, conn: &DisplayHandle, msg: Self::Event<'a>, ) -> Result<Message<ObjectId, BorrowedFd<'a>>, InvalidId>
Source§fn is_alive(&self) -> bool
fn is_alive(&self) -> bool
impl Eq for ZwlrDataControlDeviceV1
Auto Trait Implementations§
impl Freeze for ZwlrDataControlDeviceV1
impl !RefUnwindSafe for ZwlrDataControlDeviceV1
impl Send for ZwlrDataControlDeviceV1
impl Sync for ZwlrDataControlDeviceV1
impl Unpin for ZwlrDataControlDeviceV1
impl !UnwindSafe for ZwlrDataControlDeviceV1
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.