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

SettingsApp

Struct SettingsApp 

Source
pub struct SettingsApp {
Show 13 fields pub active_panel: SettingsPanel, pub display: DisplaySettings, pub network: NetworkSettings, pub user: UserSettings, pub appearance: AppearanceSettings, pub about: AboutInfo, pub audio: AudioSettings, pub bluetooth: BluetoothSettings, pub power_settings: PowerSettings, pub selected_item: usize, pub surface_id: Option<u32>, pub width: usize, pub height: usize,
}
Expand description

System Settings application state.

Fields§

§active_panel: SettingsPanel

Currently active panel.

§display: DisplaySettings

Per-panel state.

§network: NetworkSettings§user: UserSettings§appearance: AppearanceSettings§about: AboutInfo§audio: AudioSettings§bluetooth: BluetoothSettings§power_settings: PowerSettings§selected_item: usize

Index of the selected item within the active panel’s content area.

§surface_id: Option<u32>

Compositor surface ID (set when wired to the desktop).

§width: usize

Window dimensions.

§height: usize

Implementations§

Source§

impl SettingsApp

Source

pub fn new() -> Self

Create a new settings application with default values.

Source

pub fn refresh_from_kernel(&mut self)

Refresh settings fields from live kernel subsystem state.

Source

pub fn switch_panel(&mut self, panel: SettingsPanel)

Switch the active panel, resetting the item selection.

Source

pub fn handle_key(&mut self, key: u8) -> SettingsAction

Handle a keyboard event and return the resulting action.

Source

pub fn handle_click(&mut self, x: usize, y: usize) -> SettingsAction

Handle a mouse click and return the resulting action.

Source

pub fn render_to_u8_buffer( &self, buf: &mut [u8], buf_width: usize, buf_height: usize, )

Render the settings UI directly into a BGRA u8 pixel buffer.

buf must be at least buf_width * buf_height * 4 bytes.

Source

pub fn render_to_buffer( &self, buffer: &mut [u32], buf_width: usize, buf_height: usize, )

Render the settings window into a u32 BGRA pixel buffer.

buffer must be at least buf_width * buf_height elements.

Trait Implementations§

Source§

impl Default for SettingsApp

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for SettingsApp

§

impl RefUnwindSafe for SettingsApp

§

impl Send for SettingsApp

§

impl Sync for SettingsApp

§

impl Unpin for SettingsApp

§

impl UnwindSafe for SettingsApp

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.