Struct wayland_protocols::xdg::activation::v1::client::xdg_activation_token_v1::XdgActivationTokenV1
source · pub struct XdgActivationTokenV1 { /* private fields */ }
Expand description
an exported activation handle
An object for setting up a token and receiving a token handle that can be passed as an activation token to another client.
The object is created using the xdg_activation_v1.get_activation_token request. This object should then be populated with the app_id, surface and serial information and committed. The compositor shall then issue a done event with the token. In case the request’s parameters are invalid, the compositor will provide an invalid token.
See also the Event enum for this interface.
Implementations§
source§impl XdgActivationTokenV1
impl XdgActivationTokenV1
sourcepub fn set_serial(&self, serial: u32, seat: &WlSeat)
pub fn set_serial(&self, serial: u32, seat: &WlSeat)
specifies the seat and serial of the activating event
Provides information about the seat and serial event that requested the token.
The serial can come from an input or focus event. For instance, if a click triggers the launch of a third-party client, the launcher client should send a set_serial request with the serial and seat from the wl_pointer.button event.
Some compositors might refuse to activate toplevels when the token doesn’t have a valid and recent enough event serial.
Must be sent before commit. This information is optional.
sourcepub fn set_app_id(&self, app_id: String)
pub fn set_app_id(&self, app_id: String)
specifies the application being activated
The requesting client can specify an app_id to associate the token being created with it.
Must be sent before commit. This information is optional.
sourcepub fn set_surface(&self, surface: &WlSurface)
pub fn set_surface(&self, surface: &WlSurface)
specifies the surface requesting activation
This request sets the surface requesting the activation. Note, this is different from the surface that will be activated.
Some compositors might refuse to activate toplevels when the token doesn’t have a requesting surface.
Must be sent before commit. This information is optional.
Trait Implementations§
source§impl Borrow<ObjectId> for XdgActivationTokenV1
impl Borrow<ObjectId> for XdgActivationTokenV1
source§impl Clone for XdgActivationTokenV1
impl Clone for XdgActivationTokenV1
source§fn clone(&self) -> XdgActivationTokenV1
fn clone(&self) -> XdgActivationTokenV1
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for XdgActivationTokenV1
impl Debug for XdgActivationTokenV1
source§impl Hash for XdgActivationTokenV1
impl Hash for XdgActivationTokenV1
source§impl PartialEq for XdgActivationTokenV1
impl PartialEq for XdgActivationTokenV1
source§impl Proxy for XdgActivationTokenV1
impl Proxy for XdgActivationTokenV1
source§fn data<U: Send + Sync + 'static>(&self) -> Option<&U>
fn data<U: Send + Sync + 'static>(&self) -> Option<&U>
source§fn object_data(&self) -> Option<&Arc<dyn ObjectData>>
fn object_data(&self) -> Option<&Arc<dyn ObjectData>>
source§fn backend(&self) -> &WeakBackend
fn backend(&self) -> &WeakBackend
source§fn send_request(&self, req: Self::Request<'_>) -> Result<(), InvalidId>
fn send_request(&self, req: Self::Request<'_>) -> Result<(), InvalidId>
source§fn send_constructor<I: Proxy>(
&self,
req: Self::Request<'_>,
data: Arc<dyn ObjectData>,
) -> Result<I, InvalidId>
fn send_constructor<I: Proxy>( &self, req: Self::Request<'_>, data: Arc<dyn ObjectData>, ) -> Result<I, InvalidId>
source§fn from_id(conn: &Connection, id: ObjectId) -> Result<Self, InvalidId>
fn from_id(conn: &Connection, id: ObjectId) -> Result<Self, InvalidId>
source§fn inert(backend: WeakBackend) -> Self
fn inert(backend: WeakBackend) -> Self
source§fn parse_event(
conn: &Connection,
msg: Message<ObjectId, OwnedFd>,
) -> Result<(Self, Self::Event), DispatchError>
fn parse_event( conn: &Connection, msg: Message<ObjectId, OwnedFd>, ) -> Result<(Self, Self::Event), DispatchError>
source§fn write_request<'a>(
&self,
conn: &Connection,
msg: Self::Request<'a>,
) -> Result<(Message<ObjectId, BorrowedFd<'a>>, Option<(&'static Interface, u32)>), InvalidId>
fn write_request<'a>( &self, conn: &Connection, msg: Self::Request<'a>, ) -> Result<(Message<ObjectId, BorrowedFd<'a>>, Option<(&'static Interface, u32)>), InvalidId>
impl Eq for XdgActivationTokenV1
Auto Trait Implementations§
impl Freeze for XdgActivationTokenV1
impl !RefUnwindSafe for XdgActivationTokenV1
impl Send for XdgActivationTokenV1
impl Sync for XdgActivationTokenV1
impl Unpin for XdgActivationTokenV1
impl !UnwindSafe for XdgActivationTokenV1
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.