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: SettingsPanelCurrently active panel.
display: DisplaySettingsPer-panel state.
network: NetworkSettings§user: UserSettings§appearance: AppearanceSettings§about: AboutInfo§audio: AudioSettings§bluetooth: BluetoothSettings§power_settings: PowerSettings§selected_item: usizeIndex 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: usizeWindow dimensions.
height: usizeImplementations§
Source§impl SettingsApp
impl SettingsApp
Sourcepub fn refresh_from_kernel(&mut self)
pub fn refresh_from_kernel(&mut self)
Refresh settings fields from live kernel subsystem state.
Sourcepub fn switch_panel(&mut self, panel: SettingsPanel)
pub fn switch_panel(&mut self, panel: SettingsPanel)
Switch the active panel, resetting the item selection.
Sourcepub fn handle_key(&mut self, key: u8) -> SettingsAction
pub fn handle_key(&mut self, key: u8) -> SettingsAction
Handle a keyboard event and return the resulting action.
Sourcepub fn handle_click(&mut self, x: usize, y: usize) -> SettingsAction
pub fn handle_click(&mut self, x: usize, y: usize) -> SettingsAction
Handle a mouse click and return the resulting action.
Sourcepub fn render_to_u8_buffer(
&self,
buf: &mut [u8],
buf_width: usize,
buf_height: usize,
)
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.
Sourcepub fn render_to_buffer(
&self,
buffer: &mut [u32],
buf_width: usize,
buf_height: usize,
)
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.