Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorLayer::Role Struct Reference

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)
 

Detailed Description

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:

inline const Role PzOverlay =
QStringLiteral("pz-overlay"));
PHOSPHORSHELLPATTERNS_EXPORT const PhosphorLayer::Role & Hud()
Heads-up display.
Value type describing a surface's protocol-level configuration.
Definition Role.h:77
Role withScopePrefix(QString prefix) const

Member Function Documentation

◆ isValid()

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.

◆ withAnchors()

Role PhosphorLayer::Role::withAnchors ( Anchors  a) const

◆ withExclusiveZone()

Role PhosphorLayer::Role::withExclusiveZone ( int  z) const

◆ withKeyboard()

Role PhosphorLayer::Role::withKeyboard ( KeyboardInteractivity  k) const

◆ withLayer()

Role PhosphorLayer::Role::withLayer ( Layer  l) const

◆ withMargins()

Role PhosphorLayer::Role::withMargins ( QMargins  m) const

◆ withScopePrefix()

Role PhosphorLayer::Role::withScopePrefix ( QString  prefix) const

Member Data Documentation

◆ anchors

Anchors PhosphorLayer::Role::anchors = AnchorNone

◆ defaultMargins

QMargins PhosphorLayer::Role::defaultMargins

◆ exclusiveZone

int PhosphorLayer::Role::exclusiveZone = -1

-1 = ignore other surfaces' zones

◆ keyboard

KeyboardInteractivity PhosphorLayer::Role::keyboard = KeyboardInteractivity::None

◆ layer

Layer PhosphorLayer::Role::layer = Layer::Overlay

◆ scopePrefix

QString PhosphorLayer::Role::scopePrefix

Namespace for this role's surfaces (wl_surface scope)


The documentation for this struct was generated from the following file: