#[non_exhaustive]pub enum ShellSurfaceKind {
MenuBar,
StatusItems,
Taskbar,
Panel,
Dock,
Desktop,
Flyout,
Unknown,
}Expand description
What kind of OS shell surface a ShellSurface is.
#[non_exhaustive]: backends map platform → kind, never the reverse (the
same direction as Role), and the set grows as more shell
UI is classified — Start menu, jump lists, secondary taskbars, widget
boards.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MenuBar
The system menu bar: the frontmost application’s menus, Apple menu included. macOS only — Windows and Linux have no equivalent object.
StatusItems
One process’s status items (AXExtrasMenuBar). One surface per owning
process; macOS only. The Windows tray has no per-app hosting, so tray
icons live inside the Taskbar surface instead.
Taskbar
The Windows taskbar (Shell_TrayWnd), including the task band, the
visible tray row, and the overflow chevron.
Panel
A Linux desktop panel or dock: an AT-SPI frame carrying the
window-type:dock attribute. One surface per frame.
Dock
The macOS Dock.
Desktop
The desktop icon surface: Progman’s list view on Windows, Finder’s
desktop scroll area on macOS.
Flyout
A transient shell window that exists only while open: the tray overflow flyout, Quick Settings, Notification Center, a shell context-menu popup, an opened Control Center panel.
Unknown
A shell-owned window the backend could not classify. The documented
fallback, like Role::Unknown — present so a
new OS surface degrades to “reachable but untagged” rather than
invisible.
Implementations§
Source§impl ShellSurfaceKind
impl ShellSurfaceKind
Sourcepub const ALL: &'static [ShellSurfaceKind]
pub const ALL: &'static [ShellSurfaceKind]
Every kind, in the order the CLI, MCP and both bindings advertise them.
The single source for every list of kind spellings outside this crate:
the CLI’s --shell help and error message, MCP’s shell enum, and
each binding’s parse-failure message all derive from
ALL + to_snake_case rather than writing the
strings out again. ShellSurfaceKind is #[non_exhaustive], so a
downstream match cannot be the thing that fails when a variant is
added; every_variant_is_in_all in this module’s tests is. It matches
exhaustively (legal in the defining crate, so a new variant is a
compile error there) and compares this list against strum’s derived
iterator, so ALL cannot quietly fall one kind behind the enum.
Sourcepub fn from_snake_case(s: &str) -> Option<Self>
pub fn from_snake_case(s: &str) -> Option<Self>
Parse a snake_case kind name into a ShellSurfaceKind variant.
Returns None if the name doesn’t match any known kind.
Sourcepub fn to_snake_case(self) -> &'static str
pub fn to_snake_case(self) -> &'static str
Convert a ShellSurfaceKind to its snake_case string representation.
This is the spelling the kind carries across every surface: the
bindings, the CLI’s --shell flag, MCP’s shell parameter, and the
shell_kind raw attribute on the surface root.