Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorEngine::IPlacementState Class Referenceabstract

Per-screen placement state contract. More...

#include <phosphor-engine/include/PhosphorEngine/IPlacementState.h>

Inheritance diagram for PhosphorEngine::IPlacementState:
[legend]

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).
 
virtual QJsonObject toJson () const =0
 Serialize to JSON for session persistence.
 

Detailed Description

Per-screen placement state contract.

Both snap-mode (zone assignments) and autotile-mode (tiling order) implement this so the daemon's persistence layer, D-Bus adaptor, and compositor plugins can read state uniformly without branching on mode.

The interface is deliberately read-only + serialization. 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.

Constructor & Destructor Documentation

◆ ~IPlacementState()

virtual PhosphorEngine::IPlacementState::~IPlacementState ( )
virtualdefault

Member Function Documentation

◆ containsWindow()

virtual bool PhosphorEngine::IPlacementState::containsWindow ( const QString &  windowId) const
pure virtual

Whether the window is in this state's managed set.

Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.

◆ floatingWindows()

virtual QStringList PhosphorEngine::IPlacementState::floatingWindows ( ) const
pure virtual

All currently-floating windows.

Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.

◆ isFloating()

virtual bool PhosphorEngine::IPlacementState::isFloating ( const QString &  windowId) const
pure virtual

Whether the window is floating (excluded from placement).

Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.

◆ managedWindows()

virtual QStringList PhosphorEngine::IPlacementState::managedWindows ( ) const
pure virtual

All windows managed by this state (tiled + floating).

Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.

◆ masterCount()

virtual int PhosphorEngine::IPlacementState::masterCount ( ) const
inlinevirtual

Number of master windows (autotile concept; snap returns 1).

Reimplemented in PhosphorTiles::TilingState.

◆ placementIdForWindow()

virtual QString PhosphorEngine::IPlacementState::placementIdForWindow ( const QString &  windowId) const
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.

Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.

◆ screenId()

virtual QString PhosphorEngine::IPlacementState::screenId ( ) const
pure virtual

Screen this state object manages.

Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.

◆ tiledWindowCount()

virtual int PhosphorEngine::IPlacementState::tiledWindowCount ( ) const
inlinevirtual

Number of tiled (non-floating) windows in the managed set.

Reimplemented in PhosphorTiles::TilingState.

◆ toJson()

virtual QJsonObject PhosphorEngine::IPlacementState::toJson ( ) const
pure virtual

Serialize to JSON for session persistence.

Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.

◆ windowCount()

virtual int PhosphorEngine::IPlacementState::windowCount ( ) const
pure virtual

Total number of managed windows (tiled + floating).

Implemented in PhosphorSnapEngine::SnapState, and PhosphorTiles::TilingState.


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