Shell UI patterns. More...
Enumerations | |
| enum class | Edge : int { Top = 0 , Bottom = 1 , Left = 2 , Right = 3 } |
| Screen edge a Panel anchors to. More... | |
| enum class | Corner : int { TopLeft = 0 , TopRight = 1 , BottomLeft = 2 , BottomRight = 3 } |
| Screen corner a Toast anchors to. More... | |
Functions | |
| PHOSPHORSHELLPATTERNS_EXPORT const PhosphorLayer::Role & | Wallpaper () |
| Wallpaper. | |
| PHOSPHORSHELLPATTERNS_EXPORT const PhosphorLayer::Role & | Hud () |
| Heads-up display. | |
| PHOSPHORSHELLPATTERNS_EXPORT const PhosphorLayer::Role & | Modal () |
| Modal dialog. | |
| PHOSPHORSHELLPATTERNS_EXPORT const PhosphorLayer::Role & | Floating () |
| Free-floating overlay. | |
| PHOSPHORSHELLPATTERNS_EXPORT PhosphorLayer::Role | Panel (Edge edge) |
Panel anchored to a screen edge, reserving space via exclusive zone, keyboard-on-demand (clicking gives focus). | |
| PHOSPHORSHELLPATTERNS_EXPORT PhosphorLayer::Role | Toast (Corner corner) |
| Transient corner-anchored display. | |
Shell UI patterns.
The axis-2 vocabulary on top of the wlr-layer-shell primitives in PhosphorLayer::Role.
A Pattern is a UI concept ("a panel reserves screen space", "a toast appears in a corner") realised as a PhosphorLayer::Role bundle. Each Pattern is orthogonal to:
pz_roles.h).This library is the seam between protocol primitives and consumer app-roles, so any Phosphor shell (PZ today, Phosphor-as-standalone tomorrow) composes its public roles from these recipes without having to know the wlr-layer-shell wire details.
The four fixed presets (Wallpaper, Hud, Modal, Floating) are exposed as accessor functions returning const Role&. Each accessor wraps a Meyers-style function-local static so the Role value is constructed on first access regardless of dynamic-initialization order across translation units. Consumers can safely take the result by reference and store derived Roles in their own inline const globals.
|
strong |
Screen corner a Toast anchors to.
| Enumerator | |
|---|---|
| TopLeft | |
| TopRight | |
| BottomLeft | |
| BottomRight | |
|
strong |
Screen edge a Panel anchors to.
| Enumerator | |
|---|---|
| Top | |
| Bottom | |
| Left | |
| Right | |
| PHOSPHORSHELLPATTERNS_EXPORT const PhosphorLayer::Role & PhosphorShellPatterns::Floating | ( | ) |
Free-floating overlay.
Overlay layer, no anchors, no keyboard. Position is supplied by the consumer (e.g. shader previews, tear-off windows).
| PHOSPHORSHELLPATTERNS_EXPORT const PhosphorLayer::Role & PhosphorShellPatterns::Hud | ( | ) |
Heads-up display.
Overlay layer, anchors all edges, click-through, no exclusive zone (drawn on top of panels). Typical for drag indicators, zone highlights, focus rings.
| PHOSPHORSHELLPATTERNS_EXPORT const PhosphorLayer::Role & PhosphorShellPatterns::Modal | ( | ) |
Modal dialog.
Top layer, no anchors (centred by the compositor), exclusive keyboard grab. Typical for confirmation prompts, pickers.
| PHOSPHORSHELLPATTERNS_EXPORT PhosphorLayer::Role PhosphorShellPatterns::Panel | ( | Edge | edge | ) |
Panel anchored to a screen edge, reserving space via exclusive zone, keyboard-on-demand (clicking gives focus).
The returned PhosphorLayer::Role has the scope prefix "pl-{edge}-panel".
| PHOSPHORSHELLPATTERNS_EXPORT PhosphorLayer::Role PhosphorShellPatterns::Toast | ( | Corner | corner | ) |
Transient corner-anchored display.
Click-through, no exclusive zone. Typical for short-lived OSDs, snack-bars, success indicators. The returned PhosphorLayer::Role has the scope prefix "pl-{corner}-toast".
| PHOSPHORSHELLPATTERNS_EXPORT const PhosphorLayer::Role & PhosphorShellPatterns::Wallpaper | ( | ) |
Wallpaper.
Background layer, anchors all edges, exclusive-zone 0 so panels and other layer surfaces render on top. No keyboard.