Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
AutotileEngineTypes.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
7#include <QJsonObject>
8#include <QRect>
9#include <QString>
10#include <memory>
11#include <unordered_map>
12
13namespace PhosphorTiles {
14class SplitTree;
15}
16
17namespace PhosphorTileEngine {
18
33{
34 QString windowId;
35 bool wasFloating = false;
36};
37
108{
109 QJsonObject scriptState;
110 std::unique_ptr<PhosphorTiles::SplitTree> splitTree;
111 QString algorithmId;
112};
113
126{
127 QString windowId;
134
135 // Prior-state restoration info (used on cancel)
136 bool hadPriorState = false; // True if m_states contained windowId at begin
138 priorKey; // Key of the prior PhosphorTiles::TilingState (meaningful iff hadPriorState)
139 int priorRawIndex = -1; // Raw index in priorState->windowOrder() at begin
140 bool priorFloating = false; // Prior floating flag in priorState
146 bool priorOverflow = false;
147 bool priorSameScreen = false; // priorKey == currentKeyForScreen(targetScreenId)
148
149 // Eviction info (used when the target stack is already at maxWindows
150 // and the dragged window is a new member). The last tiled neighbour
151 // is floated to make room; on cancel the eviction is undone, on
152 // commit the evicted window is sent through the batch-float path so
153 // its pre-tile geometry is restored.
155};
156
157} // namespace PhosphorTileEngine
A binary split tree for interactive window tiling.
Definition SplitTree.h:57
PlacementStateKey TilingStateKey
Backwards-compatible spelling for autotile's existing sources.
Definition EngineTypes.h:60
Definition AutotileConfig.h:13
Definition AutotileEngine.h:52
Active drag-insert preview state.
Definition AutotileEngineTypes.h:126
int lastInsertIndex
Definition AutotileEngineTypes.h:133
QString targetScreenId
Definition AutotileEngineTypes.h:128
bool priorOverflow
Whether that prior float was an OVERFLOW float rather than a user one.
Definition AutotileEngineTypes.h:146
PhosphorEngine::TilingStateKey targetKey
The context key the preview inserted into (targetScreenId's current key at begin),...
Definition AutotileEngineTypes.h:132
bool hadPriorState
Definition AutotileEngineTypes.h:136
QString evictedWindowId
Definition AutotileEngineTypes.h:154
int priorRawIndex
Definition AutotileEngineTypes.h:139
bool priorFloating
Definition AutotileEngineTypes.h:140
QString windowId
Definition AutotileEngineTypes.h:127
PhosphorEngine::TilingStateKey priorKey
Definition AutotileEngineTypes.h:138
bool priorSameScreen
Definition AutotileEngineTypes.h:147
An already-managed window ARRIVING in a state via migrateWindowBetweenKeys, with the float state it h...
Definition AutotileEngineTypes.h:33
QString windowId
Definition AutotileEngineTypes.h:34
bool wasFloating
Definition AutotileEngineTypes.h:35
Script-state bag rescued from a TilingState that a teardown destroys, so a re-created state for the s...
Definition AutotileEngineTypes.h:108
std::unique_ptr< PhosphorTiles::SplitTree > splitTree
Definition AutotileEngineTypes.h:110
QString algorithmId
Definition AutotileEngineTypes.h:111
QJsonObject scriptState
Definition AutotileEngineTypes.h:109