pub struct ExtDataControlDeviceV1 { /* 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 ExtDataControlDeviceV1
impl ExtDataControlDeviceV1
sourcepub fn data_offer(&self, id: &ExtDataControlOfferV1)
pub fn data_offer(&self, id: &ExtDataControlOfferV1)
introduce a new ext_data_control_offer
The data_offer event introduces a new ext_data_control_offer object, which will subsequently be used in either the ext_data_control_device.selection event (for the regular clipboard selections) or the ext_data_control_device.primary_selection event (for the primary clipboard selections). Immediately following the ext_data_control_device.data_offer event, the new data_offer object will send out ext_data_control_offer.offer events to describe the MIME types it offers.
sourcepub fn selection(&self, id: Option<&ExtDataControlOfferV1>)
pub fn selection(&self, id: Option<&ExtDataControlOfferV1>)
advertise new selection
The selection event is sent out to notify the client of a new ext_data_control_offer for the selection for this device. The ext_data_control_device.data_offer and the ext_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 ext_data_control_offer is valid until a new ext_data_control_offer or NULL is received. The client must destroy the previous selection ext_data_control_offer, if any, upon receiving this event. Regardless, the previous selection will be ignored once a new selection ext_data_control_offer is received.
The first selection event is sent upon binding the ext_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<&ExtDataControlOfferV1>)
pub fn primary_selection(&self, id: Option<&ExtDataControlOfferV1>)
advertise new primary selection
The primary_selection event is sent out to notify the client of a new ext_data_control_offer for the primary selection for this device. The ext_data_control_device.data_offer and the ext_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 ext_data_control_offer is valid until a new ext_data_control_offer or NULL is received. The client must destroy the previous primary selection ext_data_control_offer, if any, upon receiving this event. Regardless, the previous primary selection will be ignored once a new primary selection ext_data_control_offer is received.
If the compositor supports primary selection, the first primary_selection event is sent upon binding the ext_data_control_device object.
Trait Implementations§
source§impl Borrow<ObjectId> for ExtDataControlDeviceV1
impl Borrow<ObjectId> for ExtDataControlDeviceV1
source§impl Clone for ExtDataControlDeviceV1
impl Clone for ExtDataControlDeviceV1
source§fn clone(&self) -> ExtDataControlDeviceV1
fn clone(&self) -> ExtDataControlDeviceV1
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ExtDataControlDeviceV1
impl Debug for ExtDataControlDeviceV1
source§impl Hash for ExtDataControlDeviceV1
impl Hash for ExtDataControlDeviceV1
source§impl PartialEq<Weak<ExtDataControlDeviceV1>> for ExtDataControlDeviceV1
impl PartialEq<Weak<ExtDataControlDeviceV1>> for ExtDataControlDeviceV1
source§impl PartialEq for ExtDataControlDeviceV1
impl PartialEq for ExtDataControlDeviceV1
source§impl Resource for ExtDataControlDeviceV1
impl Resource for ExtDataControlDeviceV1
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 ExtDataControlDeviceV1
Auto Trait Implementations§
impl Freeze for ExtDataControlDeviceV1
impl !RefUnwindSafe for ExtDataControlDeviceV1
impl Send for ExtDataControlDeviceV1
impl Sync for ExtDataControlDeviceV1
impl Unpin for ExtDataControlDeviceV1
impl !UnwindSafe for ExtDataControlDeviceV1
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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.