pub struct Panel { /* private fields */ }Expand description
Desktop panel state.
Implementations§
Source§impl Panel
impl Panel
Sourcepub fn new(screen_width: u32, screen_height: u32) -> Self
pub fn new(screen_width: u32, screen_height: u32) -> Self
Create a new panel for the given screen dimensions.
Sourcepub fn init_layer_surface(&mut self) -> Option<u32>
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.
Sourcepub fn layer_surface_id(&self) -> Option<u32>
pub fn layer_surface_id(&self) -> Option<u32>
Get the layer-shell surface ID.
Sourcepub fn set_active_workspace(&self, index: usize)
pub fn set_active_workspace(&self, index: usize)
Set the active workspace.
Sourcepub fn active_workspace(&self) -> usize
pub fn active_workspace(&self) -> usize
Get the active workspace index.
Sourcepub fn update_workspace_counts(&self)
pub fn update_workspace_counts(&self)
Update workspace window counts from the window manager.
Update the panel button list from the window manager.
Sourcepub fn update_clock(&self)
pub fn update_clock(&self)
Update the clock display with real wall-clock date and time.
Sourcepub fn handle_click(&self, x: i32, _y: i32) -> Option<WindowId>
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.