Struct wayland_protocols::xdg::shell::server::xdg_wm_base::XdgWmBase
source · [−]pub struct XdgWmBase { /* private fields */ }
server
only.Expand description
create desktop-style surfaces
The xdg_wm_base interface is exposed as a global object enabling clients to turn their wl_surfaces into windows in a desktop environment. It defines the basic functionality needed for clients and the compositor to create windows that can be dragged, resized, maximized, etc, as well as creating transient windows such as popup menus.
See also the Request enum for this interface.
Implementations
sourceimpl XdgWmBase
impl XdgWmBase
sourcepub fn ping(&self, serial: u32)
pub fn ping(&self, serial: u32)
check if the client is alive
The ping event asks the client if it’s still alive. Pass the serial specified in the event back to the compositor by sending a “pong” request back with the specified serial. See xdg_wm_base.pong.
Compositors can use this to determine if the client is still alive. It’s unspecified what will happen if the client doesn’t respond to the ping request, or in what timeframe. Clients should try to respond in a reasonable amount of time.
A compositor is free to ping in any way it wants, but a client must always respond to any xdg_wm_base object it created.
Trait Implementations
sourceimpl Resource for XdgWmBase
impl Resource for XdgWmBase
type Request = Request
type Event = Event
fn interface() -> &'static Interface
fn id(&self) -> ObjectId
fn version(&self) -> u32
fn data<U: 'static>(&self) -> Option<&U>
fn object_data(&self) -> Option<&Arc<dyn Any + Send + Sync>>
fn handle(&self) -> &WeakHandle
fn from_id(conn: &DisplayHandle, id: ObjectId) -> Result<Self, InvalidId>
fn send_event(&self, evt: Self::Event) -> Result<(), InvalidId>
fn parse_request(
conn: &DisplayHandle,
msg: Message<ObjectId>
) -> Result<(Self, Self::Request), DispatchError>
fn write_event(
&self,
conn: &DisplayHandle,
msg: Self::Event
) -> Result<Message<ObjectId>, InvalidId>
fn client_id(&self) -> Option<ClientId>
fn post_error(&self, code: impl Into<u32>, error: impl Into<String>)
impl Eq for XdgWmBase
Auto Trait Implementations
impl !RefUnwindSafe for XdgWmBase
impl Send for XdgWmBase
impl Sync for XdgWmBase
impl Unpin for XdgWmBase
impl !UnwindSafe for XdgWmBase
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert 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
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more