Value type describing a surface's protocol-level configuration. More...
#include <phosphor-layer/include/PhosphorLayer/Role.h>
Public Member Functions | |
| Role | withLayer (Layer l) const |
| Role | withAnchors (Anchors a) const |
| Role | withExclusiveZone (int z) const |
| Role | withKeyboard (KeyboardInteractivity k) const |
| Role | withMargins (QMargins m) const |
| Role | withScopePrefix (QString prefix) const |
| bool | isValid () const |
| True if this Role is a semantically valid wlr-layer-shell configuration. | |
Public Attributes | |
| Layer | layer = Layer::Overlay |
| Anchors | anchors = AnchorNone |
| int | exclusiveZone = -1 |
| -1 = ignore other surfaces' zones | |
| KeyboardInteractivity | keyboard = KeyboardInteractivity::None |
| QMargins | defaultMargins |
| QString | scopePrefix |
| Namespace for this role's surfaces (wl_surface scope) | |
Value type describing a surface's protocol-level configuration.
Role captures the wlr-layer-shell parameters that are immutable after show() (layer, anchors, keyboard, scope) plus defaults for parameters that are mutable (margins, exclusive zone). Consumers pick from the PhosphorShellPatterns library (axis-2 UI-pattern recipes) or define their own Role values directly.
The fluent withX() modifiers return copies for composition:
| bool PhosphorLayer::Role::isValid | ( | ) | const |
True if this Role is a semantically valid wlr-layer-shell configuration.
False for combinations the protocol rejects (e.g. Overlay layer with a positive exclusive zone, where Overlay ignores zones so a non-negative value is silently wasted) or that no compositor accepts (empty scopePrefix). The factory calls this and refuses to create malformed surfaces.
| Role PhosphorLayer::Role::withAnchors | ( | Anchors | a | ) | const |
| Role PhosphorLayer::Role::withExclusiveZone | ( | int | z | ) | const |
| Role PhosphorLayer::Role::withKeyboard | ( | KeyboardInteractivity | k | ) | const |
| Role PhosphorLayer::Role::withMargins | ( | QMargins | m | ) | const |
| Role PhosphorLayer::Role::withScopePrefix | ( | QString | prefix | ) | const |
| Anchors PhosphorLayer::Role::anchors = AnchorNone |
| QMargins PhosphorLayer::Role::defaultMargins |
| int PhosphorLayer::Role::exclusiveZone = -1 |
-1 = ignore other surfaces' zones
| KeyboardInteractivity PhosphorLayer::Role::keyboard = KeyboardInteractivity::None |
| Layer PhosphorLayer::Role::layer = Layer::Overlay |
| QString PhosphorLayer::Role::scopePrefix |
Namespace for this role's surfaces (wl_surface scope)