Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
AutotileTypes.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 <PhosphorProtocol/phosphorprotocoltypes_export.h>
7
8#include <QList>
9#include <QMetaType>
10#include <QRect>
11#include <QString>
12
13namespace PhosphorProtocol {
14
17struct PHOSPHORPROTOCOLTYPES_EXPORT TileRequestEntry
18{
19 QString windowId;
20 int x = 0;
21 int y = 0;
22 int width = 0;
23 int height = 0;
28 QString zoneId;
29 QString screenId;
30 bool monocle = false;
31 bool floating = false;
36 bool windowedFullscreen = false;
52 bool maximizedToEdges = false;
55 QString stacking;
71 QString scrollEdge;
97 int viewDelta = 0;
116 int visualX = 0;
117 int visualY = 0;
118 bool hasVisualPos = false;
134 QString tabFrom;
145 bool viewImmediate = false;
146
147 QRect toRect() const
148 {
149 return QRect(x, y, width, height);
150 }
151
160 QString validationError() const;
161};
162
163using TileRequestList = QList<TileRequestEntry>;
164
166struct PHOSPHORPROTOCOLTYPES_EXPORT AlgorithmInfoEntry
167{
168 QString id;
169 QString name;
170 QString description;
172 bool supportsSplitRatio = false;
173 bool centerLayout = false;
175 double defaultSplitRatio = 0.5;
177 bool isScripted = false;
179 bool isUserScript = false;
180 bool supportsMemory = false;
182};
183
184using AlgorithmInfoList = QList<AlgorithmInfoEntry>;
185
188struct PHOSPHORPROTOCOLTYPES_EXPORT PreTileGeometryEntry
189{
190 QString appId;
191 int x = 0;
192 int y = 0;
193 int width = 0;
194 int height = 0;
195 QString screenId;
198 QString windowId;
199
200 QRect toRect() const
201 {
202 return QRect(x, y, width, height);
203 }
204};
205
206using PreTileGeometryList = QList<PreTileGeometryEntry>;
207
208} // namespace PhosphorProtocol
209
210Q_DECLARE_METATYPE(PhosphorProtocol::TileRequestEntry)
211Q_DECLARE_METATYPE(PhosphorProtocol::TileRequestList)
212Q_DECLARE_METATYPE(PhosphorProtocol::AlgorithmInfoEntry)
213Q_DECLARE_METATYPE(PhosphorProtocol::AlgorithmInfoList)
D-Bus marshalling for the shared tiling-family value types (see AutotileTypes.h; the file names preda...
Definition AutotileMarshalling.h:19
QList< PreTileGeometryEntry > PreTileGeometryList
Definition AutotileTypes.h:206
QList< TileRequestEntry > TileRequestList
Definition AutotileTypes.h:163
QList< AlgorithmInfoEntry > AlgorithmInfoList
Definition AutotileTypes.h:184
D-Bus struct for algorithm metadata: (sssbbbbdibsbbb).
Definition AutotileTypes.h:167
bool producesOverlappingZones
Definition AutotileTypes.h:174
bool supportsMasterCount
Definition AutotileTypes.h:171
bool supportsSplitRatio
Definition AutotileTypes.h:172
QString id
Definition AutotileTypes.h:168
QString name
Definition AutotileTypes.h:169
bool isScripted
Definition AutotileTypes.h:177
QString zoneNumberDisplay
Definition AutotileTypes.h:178
QString description
Definition AutotileTypes.h:170
bool supportsMemory
Definition AutotileTypes.h:180
int defaultMaxWindows
Definition AutotileTypes.h:176
bool isUserScript
Definition AutotileTypes.h:179
bool centerLayout
Definition AutotileTypes.h:173
double defaultSplitRatio
Definition AutotileTypes.h:175
bool supportsSingleWindow
Definition AutotileTypes.h:181
D-Bus struct for pre-tile geometry entries: (siiiiss) Replaces the JSON blob previously returned by g...
Definition AutotileTypes.h:189
int height
Definition AutotileTypes.h:194
int width
Definition AutotileTypes.h:193
QString screenId
Definition AutotileTypes.h:195
int x
Definition AutotileTypes.h:191
QString windowId
The window whose record this is (the registry's canonical composite); the consumer applies the entry ...
Definition AutotileTypes.h:198
int y
Definition AutotileTypes.h:192
QRect toRect() const
Definition AutotileTypes.h:200
QString appId
Definition AutotileTypes.h:190
D-Bus struct for the shared tiling-family tile requests (autotile + scrolling ride the same windowsTi...
Definition AutotileTypes.h:18
int visualY
Definition AutotileTypes.h:117
bool windowedFullscreen
Scrolling mode: windowed fullscreen (niri toggle-windowed-fullscreen).
Definition AutotileTypes.h:36
int width
Definition AutotileTypes.h:22
int y
Definition AutotileTypes.h:21
QString stacking
Overlap-layout stacking direction: "firstOnTop" or "lastOnTop".
Definition AutotileTypes.h:55
QString windowId
Definition AutotileTypes.h:19
int height
Definition AutotileTypes.h:23
int visualX
Scrolling strip: where this window really sits on the strip, when that differs from the rect committe...
Definition AutotileTypes.h:116
QString tabFrom
Scrolling mode: the window id of the tab this one is REPLACING in a tabbed column,...
Definition AutotileTypes.h:134
QString validationError() const
Returns empty QString if valid, or a human-readable description of the invariant violation.
bool viewImmediate
Scrolling mode: this batch's view travel is USER-DRIVEN continuous motion (the drag edge auto-scroll ...
Definition AutotileTypes.h:145
bool floating
Definition AutotileTypes.h:31
QRect toRect() const
Definition AutotileTypes.h:147
QString scrollEdge
Scrolling mode: which screen edge this window's motion is anchored to.
Definition AutotileTypes.h:71
int viewDelta
Scrolling mode: how far the whole VIEW slid since the last batch, in logical pixels,...
Definition AutotileTypes.h:97
bool hasVisualPos
Definition AutotileTypes.h:118
QString screenId
Definition AutotileTypes.h:29
bool maximizedToEdges
Scrolling mode: this window's column is maximized to the screen edges (niri maximize-window-to-edges,...
Definition AutotileTypes.h:52
int x
Definition AutotileTypes.h:20
bool monocle
Definition AutotileTypes.h:30
QString zoneId
Reserved and currently always empty on this wire: no producer writes it and no consumer reads it (it ...
Definition AutotileTypes.h:28