6#include <PhosphorShell/phosphorshell_export.h>
15#include <QVariantList>
28struct PHOSPHORSHELL_EXPORT
Cell
127PHOSPHORSHELL_EXPORT qreal
hueFor(
const QRectF& rect);
147 qreal deviceScale = 0.0);
157PHOSPHORSHELL_EXPORT QList<Cell>
parseTileBatch(
const QList<TileRect>& tiles,
const QString& screenId,
158 const QRect& workArea);
210PHOSPHORSHELL_EXPORT QList<Cell>
parseCurrentTiles(
const QString& tilesJson,
const QString& screenId,
211 const QRect& workArea);
221PHOSPHORSHELL_EXPORT
void applyOccupancy(QList<Cell>& cells,
const QHash<QString, QStringList>& occupancy,
222 const QString& focusedWindowId = {});
232PHOSPHORSHELL_EXPORT
void applyOccupancy(QList<Cell>& cells,
const QList<Occupant>& occupants,
233 const QString& focusedWindowId = {});
237PHOSPHORSHELL_EXPORT
void applyMetadata(QList<Cell>& cells,
const QHash<QString, WindowMeta>& meta);
242PHOSPHORSHELL_EXPORT
void applyUrgency(QList<Cell>& cells,
const QSet<QString>& urgent);
254PHOSPHORSHELL_EXPORT QVariantMap
lensToVariant(
const QRectF& lens,
bool vertical =
false);
258PHOSPHORSHELL_EXPORT
int modeForScreen(
const QString& statesJson,
const QString& screenId);
274PHOSPHORSHELL_EXPORT QString
dropProxyJson(
const QRect& rect,
const QVariantList& cells);
Definition PlacementMapParser.h:18
PHOSPHORSHELL_EXPORT void applyUrgency(QList< Cell > &cells, const QSet< QString > &urgent)
Mark the cells whose windowId is in urgent.
PHOSPHORSHELL_EXPORT StripParse parseVisibleStrip(const QString &stripJson)
Parse Scrolling.visibleStripJson into cells plus the lens.
PHOSPHORSHELL_EXPORT QString dropProxyJson(const QRect &rect, const QVariantList &cells)
Build the WindowDrag.registerDropProxy payload.
PHOSPHORSHELL_EXPORT int modeForScreen(const QString &statesJson, const QString &screenId)
Look up one screen's mode in a getScreenStates JSON array.
PHOSPHORSHELL_EXPORT QList< Cell > parseSnappingLayout(const QString &layoutJson, const QSize &workAreaSize, qreal deviceScale=0.0)
Parse a LayoutRegistry.getLayout JSON document into cells.
PHOSPHORSHELL_EXPORT QList< TileRect > tileRectsFromJson(const QString &tilesJson)
Read a Tiling.currentTilesJson array into tile rects.
PHOSPHORSHELL_EXPORT qreal hueFor(const QRectF &rect)
Hue for a cell rect: its horizontal centre, clamped to 0..1.
PHOSPHORSHELL_EXPORT StripParse parseStripModel(const QString &modelJson)
Parse Scrolling.stripModelJson into cells plus the lens.
PHOSPHORSHELL_EXPORT QVariantList toVariantList(const QList< Cell > &cells)
The QML-facing shape: one QVariantMap per cell with the documented keys (id, x, y,...
PHOSPHORSHELL_EXPORT void applyMetadata(QList< Cell > &cells, const QHash< QString, WindowMeta > &meta)
Fill appId / title from meta for every cell with a window id the table knows.
PHOSPHORSHELL_EXPORT QList< Cell > parseTileBatch(const QList< TileRect > &tiles, const QString &screenId, const QRect &workArea)
Normalise a tile batch for one screen against the work area.
PHOSPHORSHELL_EXPORT void applyFocusByWindowId(QList< Cell > &cells, const QString &windowId)
Mark the cell whose id equals windowId focused (tiling cells are keyed by window id).
PHOSPHORSHELL_EXPORT QVariantMap lensToVariant(const QRectF &lens, bool vertical=false)
{x, y, w, h, vertical} for a lens band, or an empty map for a null rect.
PHOSPHORSHELL_EXPORT QList< Cell > stackedColumns(const QStringList &windowIds)
Equal columns for a desktop whose tiles cannot be replayed.
PHOSPHORSHELL_EXPORT QList< Cell > parseCurrentTiles(const QString &tilesJson, const QString &screenId, const QRect &workArea)
parseTileBatch(tileRectsFromJson(tilesJson), screenId, workArea).
PHOSPHORSHELL_EXPORT ScreenState screenStateFor(const QString &statesJson, const QString &screenId)
One screen's full row of a getScreenStates JSON array: the mode plus the resolved layout / algorithm ...
PHOSPHORSHELL_EXPORT void applyOccupancy(QList< Cell > &cells, const QHash< QString, QStringList > &occupancy, const QString &focusedWindowId={})
Mark cells occupied from a window → zone-ids map.
One cell of the placement map, in work-area fractions.
Definition PlacementMapParser.h:29
bool urgent
Snapping: any occupant demands attention.
Definition PlacementMapParser.h:62
qreal stripT
Scrolling only: the column's start as a fraction of the whole strip (stripPosPx / stripExtentPx),...
Definition PlacementMapParser.h:47
QString title
Definition PlacementMapParser.h:59
int zoneNumber
Snapping only: the zone's 1-based number, used by the click path (Snap.snapToZoneByNumber).
Definition PlacementMapParser.h:38
bool focused
Definition PlacementMapParser.h:34
int columnIndex
Scrolling only: the column's index in the strip, the argument to Scrolling.focusColumnAt.
Definition PlacementMapParser.h:50
QString label
Definition PlacementMapParser.h:35
bool minimized
Definition PlacementMapParser.h:64
bool offscreen
Definition PlacementMapParser.h:63
QString appId
WindowTracking.getWindowMetadata for windowId, empty until it has answered.
Definition PlacementMapParser.h:58
bool occupied
Definition PlacementMapParser.h:33
QString windowId
The window this cell stands for: the tile's window (tiling), the column's first tile (scrolling),...
Definition PlacementMapParser.h:55
qreal t
Definition PlacementMapParser.h:32
int stack
Tiling monocle and scrolling columns: how many windows share this rect (a tabbed or stacked column's ...
Definition PlacementMapParser.h:41
QString id
Definition PlacementMapParser.h:30
QRectF rect
Definition PlacementMapParser.h:31
One non-floating window on a screen, for applyOccupancy: the zones it fills and whether it demands at...
Definition PlacementMapParser.h:71
bool urgent
Definition PlacementMapParser.h:74
QString windowId
Definition PlacementMapParser.h:72
QStringList zoneIds
Definition PlacementMapParser.h:73
One screen's row of LayoutRegistry.getScreenStates.
Definition PlacementMapParser.h:86
int mode
0 snapping, 1 tiling, 2 scrolling, -1 when the screen is not listed.
Definition PlacementMapParser.h:88
QString activity
Definition PlacementMapParser.h:91
QString layoutId
Definition PlacementMapParser.h:92
QString algorithmId
Definition PlacementMapParser.h:93
QString scrollingTemplateId
Definition PlacementMapParser.h:94
int virtualDesktop
The daemon's resolved desktop for this screen, 1-based; 0 unknown.
Definition PlacementMapParser.h:90
bool layoutsAvailable
Definition PlacementMapParser.h:95
The scrolling parse: the visible columns as cells plus the lens band.
Definition PlacementMapParser.h:113
bool vertical
Definition PlacementMapParser.h:118
int viewportPx
Definition PlacementMapParser.h:122
QList< Cell > cells
Definition PlacementMapParser.h:114
int viewOffsetPx
Definition PlacementMapParser.h:121
QRectF lens
Definition PlacementMapParser.h:117
int stripExtentPx
Definition PlacementMapParser.h:123
int overflowLeft
Definition PlacementMapParser.h:119
QList< Cell > windows
Every window, including offscreen columns and inactive tabs.
Definition PlacementMapParser.h:116
int overflowRight
Definition PlacementMapParser.h:120
A tile from a Tiling.windowsTileRequested batch, reduced to what the map needs so the parser stays fr...
Definition PlacementMapParser.h:101
bool floating
Definition PlacementMapParser.h:105
QString windowId
Definition PlacementMapParser.h:102
bool monocle
Definition PlacementMapParser.h:106
QRect rect
Definition PlacementMapParser.h:104
QString screenId
Definition PlacementMapParser.h:103