Per-screen placement state contract. More...
#include <phosphor-engine/include/PhosphorEngine/IPlacementState.h>
Public Member Functions | |
| virtual | ~IPlacementState ()=default |
| virtual QString | screenId () const =0 |
| Screen this state object manages. | |
| virtual int | windowCount () const =0 |
| Total number of managed windows (tiled + floating). | |
| virtual QStringList | managedWindows () const =0 |
| All windows managed by this state (tiled + floating). | |
| virtual bool | containsWindow (const QString &windowId) const =0 |
| Whether the window is in this state's managed set. | |
| virtual bool | isFloating (const QString &windowId) const =0 |
| Whether the window is floating (excluded from placement). | |
| virtual QStringList | floatingWindows () const =0 |
| All currently-floating windows. | |
| virtual QString | placementIdForWindow (const QString &windowId) const =0 |
| Opaque placement identifier for the window's current slot. | |
| virtual int | tiledWindowCount () const |
| Number of tiled (non-floating) windows in the managed set. | |
| virtual int | masterCount () const |
| Number of master windows (autotile concept; snap returns 1). | |
Per-screen placement state contract.
Both snap-mode (zone assignments) and autotile-mode (tiling order) implement this so the daemon's D-Bus adaptor and compositor plugins can read state uniformly without branching on mode.
Deliberately NOT a persistence interface: neither state is written to disk. What survives a restart is per-window (WindowPlacementStore), so a placement state is rebuilt from those records rather than restored wholesale.
The interface is deliberately read-only. Mutation goes through engine-specific APIs (SnapState::assignWindowToZone, TilingState::addWindow, etc.) because the semantics diverge — the daemon routes mutations through IPlacementEngine which delegates to the correct concrete state object.
|
virtualdefault |
|
pure virtual |
Whether the window is in this state's managed set.
Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.
|
pure virtual |
All currently-floating windows.
Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.
|
pure virtual |
Whether the window is floating (excluded from placement).
Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.
|
pure virtual |
All windows managed by this state (tiled + floating).
Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.
|
inlinevirtual |
Number of master windows (autotile concept; snap returns 1).
Reimplemented in PhosphorTiles::TilingState.
|
pure virtual |
Opaque placement identifier for the window's current slot.
Snap mode: zone UUID. Autotile mode: tiling-order index as string. Empty if the window is floating or unassigned.
NO in-tree caller today — the three implementations are reached only from their own tests. Kept because it is the one piece of this interface that answers "where is this window" in a form comparable ACROSS modes, which is what a cross-mode restore or a support bundle would need, and each implementation is a handful of lines over state it already holds. Anyone auditing for dead code has now found this note rather than the silence; delete it if the answer is still no consumer.
Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.
|
pure virtual |
Screen this state object manages.
Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.
|
inlinevirtual |
Number of tiled (non-floating) windows in the managed set.
Reimplemented in PhosphorTiles::TilingState.
|
pure virtual |
Total number of managed windows (tiled + floating).
Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.