⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

LayerSurface

Struct LayerSurface 

Source
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: u32

Layer surface object ID

§surface_id: u32

Underlying compositor surface ID

§layer: Layer

Which layer this surface belongs to

§anchor: Anchor

Which screen edges the surface is anchored to

§exclusive_zone: i32

Exclusive zone in pixels (-1 = no exclusive zone, 0+ = reserve space)

§margin_top: i32

Margin from top edge in pixels

§margin_bottom: i32

Margin from bottom edge in pixels

§margin_left: i32

Margin from left edge in pixels

§margin_right: i32

Margin from right edge in pixels

§keyboard_interactivity: KeyboardInteractivity

Keyboard focus mode

§desired_width: u32

Requested width (0 = fill available width when anchored)

§desired_height: u32

Requested height (0 = fill available height when anchored)

§actual_width: u32

Actual configured width (assigned by compositor)

§actual_height: u32

Actual configured height (assigned by compositor)

§namespace: [u8; 64]

Namespace for grouping (e.g., “panel”, “notifications”, “wallpaper”)

§namespace_len: usize

Length of the namespace string

§configured: bool

Whether the client has acknowledged the latest configure

§configure_serial: u32

Last configure serial sent to client

§mapped: bool

Whether the surface is currently mapped (has a buffer and is visible)

Implementations§

Source§

impl LayerSurface

Source

pub fn new(id: u32, surface_id: u32, layer: Layer) -> Self

Create a new layer surface with default settings.

Source

pub fn set_namespace(&mut self, ns: &[u8])

Set the namespace string for this layer surface.

Source

pub fn namespace_bytes(&self) -> &[u8]

Get the namespace as a byte slice.

Auto Trait Implementations§

§

impl Freeze for LayerSurface

§

impl RefUnwindSafe for LayerSurface

§

impl Send for LayerSurface

§

impl Sync for LayerSurface

§

impl Unpin for LayerSurface

§

impl UnwindSafe for LayerSurface

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.