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;
39 QString stacking;
55 QString scrollEdge;
81 int viewDelta = 0;
100 int visualX = 0;
101 int visualY = 0;
102 bool hasVisualPos = false;
118 QString tabFrom;
129 bool viewImmediate = false;
130
131 QRect toRect() const
132 {
133 return QRect(x, y, width, height);
134 }
135
144 QString validationError() const;
145};
146
147using TileRequestList = QList<TileRequestEntry>;
148
150struct PHOSPHORPROTOCOLTYPES_EXPORT AlgorithmInfoEntry
151{
152 QString id;
153 QString name;
154 QString description;
155 bool supportsMasterCount = false;
156 bool supportsSplitRatio = false;
157 bool centerLayout = false;
158 bool producesOverlappingZones = false;
159 double defaultSplitRatio = 0.5;
160 int defaultMaxWindows = 0;
161 bool isScripted = false;
163 bool isUserScript = false;
164 bool supportsMemory = false;
165 bool supportsSingleWindow = false;
166};
167
168using AlgorithmInfoList = QList<AlgorithmInfoEntry>;
169
172struct PHOSPHORPROTOCOLTYPES_EXPORT PreTileGeometryEntry
173{
174 QString appId;
175 int x = 0;
176 int y = 0;
177 int width = 0;
178 int height = 0;
179 QString screenId;
180
181 QRect toRect() const
182 {
183 return QRect(x, y, width, height);
184 }
185};
186
187using PreTileGeometryList = QList<PreTileGeometryEntry>;
188
189} // namespace PhosphorProtocol
190
191Q_DECLARE_METATYPE(PhosphorProtocol::TileRequestEntry)
192Q_DECLARE_METATYPE(PhosphorProtocol::TileRequestList)
193Q_DECLARE_METATYPE(PhosphorProtocol::AlgorithmInfoEntry)
194Q_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< TileRequestEntry > TileRequestList
Definition AutotileTypes.h:147
QList< AlgorithmInfoEntry > AlgorithmInfoList
Definition AutotileTypes.h:168
QList< PreTileGeometryEntry > PreTileGeometryList
Definition AutotileTypes.h:187
D-Bus struct for algorithm metadata: (sssbbbbdibsbbb)
Definition AutotileTypes.h:151
QString id
Definition AutotileTypes.h:152
QString name
Definition AutotileTypes.h:153
QString zoneNumberDisplay
Definition AutotileTypes.h:162
QString description
Definition AutotileTypes.h:154
D-Bus struct for pre-tile geometry entries: (siiiis) Replaces the JSON blob previously returned by ge...
Definition AutotileTypes.h:173
QString screenId
Definition AutotileTypes.h:179
QRect toRect() const
Definition AutotileTypes.h:181
QString appId
Definition AutotileTypes.h:174
D-Bus struct for the shared tiling-family tile requests (autotile + scrolling ride the same windowsTi...
Definition AutotileTypes.h:18
QString stacking
Overlap-layout stacking direction: "firstOnTop" or "lastOnTop".
Definition AutotileTypes.h:39
QString windowId
Definition AutotileTypes.h:19
QString tabFrom
Scrolling mode: the window id of the tab this one is REPLACING in a tabbed column,...
Definition AutotileTypes.h:118
QString validationError() const
Returns empty QString if valid, or a human-readable description of the invariant violation.
QRect toRect() const
Definition AutotileTypes.h:131
QString scrollEdge
Scrolling mode: which screen edge this window's motion is anchored to.
Definition AutotileTypes.h:55
QString screenId
Definition AutotileTypes.h:29
QString zoneId
Reserved and currently always empty on this wire: no producer writes it and no consumer reads it (it ...
Definition AutotileTypes.h:28