Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
IPlacementState.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include <phosphorengine_export.h>
7#include <QString>
8#include <QStringList>
9
10namespace PhosphorEngine {
11
27class PHOSPHORENGINE_EXPORT IPlacementState
28{
29public:
30 virtual ~IPlacementState() = default;
31
33 virtual QString screenId() const = 0;
34
36 virtual int windowCount() const = 0;
37
39 virtual QStringList managedWindows() const = 0;
40
42 virtual bool containsWindow(const QString& windowId) const = 0;
43
45 virtual bool isFloating(const QString& windowId) const = 0;
46
48 virtual QStringList floatingWindows() const = 0;
49
61 virtual QString placementIdForWindow(const QString& windowId) const = 0;
62
64 virtual int tiledWindowCount() const
65 {
66 return 0;
67 }
68
70 virtual int masterCount() const
71 {
72 return 1;
73 }
74};
75
76} // namespace PhosphorEngine
Per-screen placement state contract.
Definition IPlacementState.h:28
virtual int masterCount() const
Number of master windows (autotile concept; snap returns 1).
Definition IPlacementState.h:70
virtual QStringList floatingWindows() const =0
All currently-floating windows.
virtual bool isFloating(const QString &windowId) const =0
Whether the window is floating (excluded from placement).
virtual int windowCount() const =0
Total number of managed windows (tiled + floating).
virtual int tiledWindowCount() const
Number of tiled (non-floating) windows in the managed set.
Definition IPlacementState.h:64
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 QString placementIdForWindow(const QString &windowId) const =0
Opaque placement identifier for the window's current slot.
virtual ~IPlacementState()=default
virtual QString screenId() const =0
Screen this state object manages.
Definition EngineTypes.h:14