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

Panel

Struct Panel 

Source
pub struct Panel { /* private fields */ }
Expand description

Desktop panel state.

Implementations§

Source§

impl Panel

Source

pub fn new(screen_width: u32, screen_height: u32) -> Self

Create a new panel for the given screen dimensions.

Source

pub fn y(&self) -> i32

Get the Y coordinate of the panel (bottom of screen).

Source

pub fn init_layer_surface(&mut self) -> Option<u32>

Initialize the layer-shell surface for the panel.

This creates a layer-shell surface anchored to the bottom edge of the output with an exclusive zone equal to the panel height. The compositor will reserve this space and prevent normal windows from overlapping.

Returns the layer surface ID, or None if already initialized.

Source

pub fn layer_surface_id(&self) -> Option<u32>

Get the layer-shell surface ID.

Source

pub fn set_active_workspace(&self, index: usize)

Set the active workspace.

Source

pub fn active_workspace(&self) -> usize

Get the active workspace index.

Source

pub fn update_workspace_counts(&self)

Update workspace window counts from the window manager.

Source

pub fn update_buttons(&self)

Update the panel button list from the window manager.

Source

pub fn update_clock(&self)

Update the clock display with real wall-clock date and time.

Source

pub fn handle_click(&self, x: i32, _y: i32) -> Option<WindowId>

Handle a click on the panel.

Returns the window ID that should be focused, if any.

Source

pub fn render(&self, buf: &mut [u8])

Render the panel into a pixel buffer.

The buffer is assumed to be screen_width * PANEL_HEIGHT * 4 bytes (BGRA format). Renders workspace indicators, window buttons, and the date/time clock.

Auto Trait Implementations§

§

impl !Freeze for Panel

§

impl !RefUnwindSafe for Panel

§

impl Send for Panel

§

impl Sync for Panel

§

impl Unpin for Panel

§

impl UnwindSafe for Panel

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.