Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorRules::ModeToken Namespace Reference

The closed wire vocabulary of Field::Mode — the placement mode a window is in, or that a context resolves to. More...

Variables

constexpr QLatin1StringView Snapping {"snapping"}
constexpr QLatin1StringView Tiling {"tiling"}
 autotile OR scrolling-engine tiling
constexpr QLatin1StringView Scrolling {"scrolling"}

Detailed Description

The closed wire vocabulary of Field::Mode — the placement mode a window is in, or that a context resolves to.

Every in-tree producer stamps the query THROUGH these constants: the zones-layer context resolvers (resolveContextTilingParams / resolveContextScrollingParams), the daemon's window-tracking query stamp, and the effect's own window query and its scrolling re-stamp. So a rename here really is one edit, which is the point — a hand-repeated literal that drifts produces a leaf that silently never matches rather than anything that fails. Mirrors how the action-param token namespaces (InsertPositionToken, ColumnPlacementToken, …) centralize theirs.

DELIBERATELY DISTINCT from the engine-mode ACTION vocabulary that SetEngineMode / DisableEngine carry (engineModeOptions() in the private ruleaction_builtins_p.h), which spells the middle value "autotile". The action names the ENGINE; this field names the placement mode a window is IN. The two must not be unified or cross-referenced: a Mode match leaf authored with "autotile" silently never matches, and that is the trap keeping them as two independent vocabularies avoids.

A Mode leaf is still validated as a free string at load — the match language has no per-field vocabulary check — so these constants are the spelling contract, not an enforcement point. An unrecognised token simply never equals a stamped mode.

Variable Documentation

◆ Scrolling

QLatin1StringView PhosphorRules::ModeToken::Scrolling {"scrolling"}
inlineconstexpr

◆ Snapping

QLatin1StringView PhosphorRules::ModeToken::Snapping {"snapping"}
inlineconstexpr

◆ Tiling

QLatin1StringView PhosphorRules::ModeToken::Tiling {"tiling"}
inlineconstexpr

autotile OR scrolling-engine tiling