Struct wayland_protocols_wlr::layer_shell::v1::server::zwlr_layer_surface_v1::ZwlrLayerSurfaceV1
source · pub struct ZwlrLayerSurfaceV1 { /* private fields */ }
server
only.Expand description
layer metadata interface
An interface that may be implemented by a wl_surface, for surfaces that are designed to be rendered as a layer of a stacked desktop-like environment.
Layer surface state (layer, size, anchor, exclusive zone, margin, interactivity) is double-buffered, and will be applied at the time wl_surface.commit of the corresponding wl_surface is called.
Attaching a null buffer to a layer surface unmaps it.
Unmapping a layer_surface means that the surface cannot be shown by the compositor until it is explicitly mapped again. The layer_surface returns to the state it had right after layer_shell.get_layer_surface. The client can re-map the surface by performing a commit without any buffer attached, waiting for a configure event and handling it as usual.
See also the Request enum for this interface.
Implementations§
source§impl ZwlrLayerSurfaceV1
impl ZwlrLayerSurfaceV1
sourcepub fn configure(&self, serial: u32, width: u32, height: u32)
pub fn configure(&self, serial: u32, width: u32, height: u32)
suggest a surface change
The configure event asks the client to resize its surface.
Clients should arrange their surface for the new states, and then send an ack_configure request with the serial sent in this configure event at some point before committing the new surface.
The client is free to dismiss all but the last configure event it received.
The width and height arguments specify the size of the window in surface-local coordinates.
The size is a hint, in the sense that the client is free to ignore it if it doesn’t resize, pick a smaller size (to satisfy aspect ratio or resize in steps of NxM pixels). If the client picks a smaller size and is anchored to two opposite anchors (e.g. ‘top’ and ‘bottom’), the surface will be centered on this axis.
If the width or height arguments are zero, it means the client should decide its own window dimension.
sourcepub fn closed(&self)
pub fn closed(&self)
surface should be closed
The closed event is sent by the compositor when the surface will no longer be shown. The output may have been destroyed or the user may have asked for it to be removed. Further changes to the surface will be ignored. The client should destroy the resource after receiving this event, and create a new surface if they so choose.
Trait Implementations§
source§impl Borrow<ObjectId> for ZwlrLayerSurfaceV1
impl Borrow<ObjectId> for ZwlrLayerSurfaceV1
source§impl Clone for ZwlrLayerSurfaceV1
impl Clone for ZwlrLayerSurfaceV1
source§fn clone(&self) -> ZwlrLayerSurfaceV1
fn clone(&self) -> ZwlrLayerSurfaceV1
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ZwlrLayerSurfaceV1
impl Debug for ZwlrLayerSurfaceV1
source§impl Hash for ZwlrLayerSurfaceV1
impl Hash for ZwlrLayerSurfaceV1
source§impl PartialEq<Weak<ZwlrLayerSurfaceV1>> for ZwlrLayerSurfaceV1
impl PartialEq<Weak<ZwlrLayerSurfaceV1>> for ZwlrLayerSurfaceV1
source§impl PartialEq<ZwlrLayerSurfaceV1> for ZwlrLayerSurfaceV1
impl PartialEq<ZwlrLayerSurfaceV1> for ZwlrLayerSurfaceV1
source§fn eq(&self, other: &ZwlrLayerSurfaceV1) -> bool
fn eq(&self, other: &ZwlrLayerSurfaceV1) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Resource for ZwlrLayerSurfaceV1
impl Resource for ZwlrLayerSurfaceV1
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 ZwlrLayerSurfaceV1
Auto Trait Implementations§
impl !RefUnwindSafe for ZwlrLayerSurfaceV1
impl Send for ZwlrLayerSurfaceV1
impl Sync for ZwlrLayerSurfaceV1
impl Unpin for ZwlrLayerSurfaceV1
impl !UnwindSafe for ZwlrLayerSurfaceV1
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
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, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
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.