pub struct XdgSurface { /* private fields */ }
Expand description
An XdgSurface
is the common base to the different surfaces in the
XdgShell
(ex: XdgToplevel
, XdgPopup
).
Implementations§
Source§impl XdgSurface
impl XdgSurface
Sourcepub fn surface_ref(&self) -> ObjectRef<Surface>
pub fn surface_ref(&self) -> ObjectRef<Surface>
Returns a reference to the underlying Surface
for this XdgSurface
.
Sourcepub fn root_surface_ref(&self) -> ObjectRef<Surface>
pub fn root_surface_ref(&self) -> ObjectRef<Surface>
Returns a reference to the root Surface
for this XdgSurface
.
Sourcepub fn set_xdg_role(&mut self, xdg_role: XdgSurfaceRole) -> Result<(), Error>
pub fn set_xdg_role(&mut self, xdg_role: XdgSurfaceRole) -> Result<(), Error>
Sets the concrete role for this XdgSurface
.
Similar to Surface
, an XdgSurface
isn’t of much use until a role
has been assigned.
Sourcepub fn configure(
this: ObjectRef<Self>,
client: &mut Client,
) -> Result<(), Error>
pub fn configure( this: ObjectRef<Self>, client: &mut Client, ) -> Result<(), Error>
Performs a surface configuration sequence.
Each concrete XdgSurface
role configuration sequence is concluded and
committed by a xdg_surface::configure event.
Sourcepub fn finalize_commit(
this: ObjectRef<Self>,
client: &mut Client,
) -> Result<bool, Error>
pub fn finalize_commit( this: ObjectRef<Self>, client: &mut Client, ) -> Result<bool, Error>
Handle a commit request to this XdgSurface
.
This will be triggered by a wl_surface::commit request to the backing wl_surface object for this xdg_surface, and simply delegates the request to the concrete surface.
pub fn shutdown(&self, client: &Client)
Trait Implementations§
Source§impl RequestReceiver<XdgSurface> for XdgSurface
impl RequestReceiver<XdgSurface> for XdgSurface
Auto Trait Implementations§
impl Freeze for XdgSurface
impl !RefUnwindSafe for XdgSurface
impl !Send for XdgSurface
impl !Sync for XdgSurface
impl Unpin for XdgSurface
impl !UnwindSafe for XdgSurface
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
Mutably borrows from an owned value. Read more