pub struct AppSwitcher { /* private fields */ }Expand description
Switcher overlay state.
The overlay is drawn centered on screen and shows one entry per open window. Entries are rendered as an icon + title, with the currently selected entry highlighted.
Implementations§
Source§impl AppSwitcher
impl AppSwitcher
Sourcepub fn show(&mut self, windows: Vec<(u32, String)>)
pub fn show(&mut self, windows: Vec<(u32, String)>)
Show the switcher overlay populated with the given windows.
windows is a list of (window_id, title) pairs in Z-order (top
first). The first entry is pre-selected.
Sourcepub fn hide(&mut self) -> Option<u32>
pub fn hide(&mut self) -> Option<u32>
Hide the overlay and return the selected window ID (if any).
Sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
Returns true if the overlay is currently visible.
Sourcepub fn selected_window_id(&self) -> Option<u32>
pub fn selected_window_id(&self) -> Option<u32>
Get the currently selected window ID (without hiding the overlay).
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Get the number of entries.