pub struct LayerSurface {Show 19 fields
pub id: u32,
pub surface_id: u32,
pub layer: Layer,
pub anchor: Anchor,
pub exclusive_zone: i32,
pub margin_top: i32,
pub margin_bottom: i32,
pub margin_left: i32,
pub margin_right: i32,
pub keyboard_interactivity: KeyboardInteractivity,
pub desired_width: u32,
pub desired_height: u32,
pub actual_width: u32,
pub actual_height: u32,
pub namespace: [u8; 64],
pub namespace_len: usize,
pub configured: bool,
pub configure_serial: u32,
pub mapped: bool,
}Expand description
Layer surface configuration.
A layer surface is a surface that is anchored to screen edges and belongs to a specific rendering layer. It can claim an exclusive zone to prevent normal windows from occupying that screen area.
Fields§
§id: u32Layer surface object ID
surface_id: u32Underlying compositor surface ID
layer: LayerWhich layer this surface belongs to
anchor: AnchorWhich screen edges the surface is anchored to
exclusive_zone: i32Exclusive zone in pixels (-1 = no exclusive zone, 0+ = reserve space)
margin_top: i32Margin from top edge in pixels
margin_bottom: i32Margin from bottom edge in pixels
margin_left: i32Margin from left edge in pixels
margin_right: i32Margin from right edge in pixels
keyboard_interactivity: KeyboardInteractivityKeyboard focus mode
desired_width: u32Requested width (0 = fill available width when anchored)
desired_height: u32Requested height (0 = fill available height when anchored)
actual_width: u32Actual configured width (assigned by compositor)
actual_height: u32Actual configured height (assigned by compositor)
namespace: [u8; 64]Namespace for grouping (e.g., “panel”, “notifications”, “wallpaper”)
namespace_len: usizeLength of the namespace string
configured: boolWhether the client has acknowledged the latest configure
configure_serial: u32Last configure serial sent to client
mapped: boolWhether the surface is currently mapped (has a buffer and is visible)
Implementations§
Source§impl LayerSurface
impl LayerSurface
Sourcepub fn new(id: u32, surface_id: u32, layer: Layer) -> Self
pub fn new(id: u32, surface_id: u32, layer: Layer) -> Self
Create a new layer surface with default settings.
Sourcepub fn set_namespace(&mut self, ns: &[u8])
pub fn set_namespace(&mut self, ns: &[u8])
Set the namespace string for this layer surface.
Sourcepub fn namespace_bytes(&self) -> &[u8]
pub fn namespace_bytes(&self) -> &[u8]
Get the namespace as a byte slice.