Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorLayout::AlgorithmMetadata Struct Reference

Capability + display metadata for a single autotile algorithm. More...

#include <phosphor-layout-api/include/PhosphorLayoutApi/AlgorithmMetadata.h>

Public Attributes

bool supportsMasterCount = false
 True when the algorithm honours an explicit master-window count.
 
bool supportsSplitRatio = false
 True when the algorithm honours an explicit master/secondary split ratio.
 
bool producesOverlappingZones = false
 True when the algorithm can produce overlapping zones (e.g.
 
bool supportsCustomParams = false
 True when the algorithm declares custom.
 
bool supportsMemory = false
 True when the algorithm carries persistent per-screen state across sessions (BSP-style trees that remember user splits).
 
bool reflowsOnResize = false
 True when the algorithm reflows the rest of the layout in response to an interactive window resize (GitHub #652): either a tree algorithm whose split ratios the engine adjusts (supportsMemory), or a scripted algorithm that implements the onWindowResized hook (supportsResizeHook).
 
bool supportsScriptState = false
 True when the algorithm persists an opaque per-screen script-state bag (TilingState::scriptState) across retiles and sessions — a scripted algorithm that opts in via its metadata (e.g.
 
bool isScripted = false
 True when the algorithm is loaded from a Luau script file rather than a built-in implementation.
 
bool isUserScript = false
 True when the script lives in the user's local algorithms directory (vs system-installed).
 
ZoneNumberDisplay zoneNumberDisplay = ZoneNumberDisplay::RendererDecides
 How zone numbers are displayed in previews.
 

Detailed Description

Capability + display metadata for a single autotile algorithm.

Embedded inside LayoutPreview as an optional field — only autotile previews carry it. Manual zone-based previews leave the optional empty.

The fields here are limited to what a layout-picker UI needs to know about an algorithm to render its row correctly (icons, "supports master count" parameter editor, system-vs-user lock badge). Tuning parameters that affect the algorithm's actual computation (split ratio, master count) live in per-algorithm settings, not here.

Member Data Documentation

◆ isScripted

bool PhosphorLayout::AlgorithmMetadata::isScripted = false

True when the algorithm is loaded from a Luau script file rather than a built-in implementation.

Affects how the picker renders the system-vs-user badge (see isUserScript).

◆ isUserScript

bool PhosphorLayout::AlgorithmMetadata::isUserScript = false

True when the script lives in the user's local algorithms directory (vs system-installed).

Only meaningful when isScripted is true. Drives the lock-icon vs user-icon badge in the picker.

◆ producesOverlappingZones

bool PhosphorLayout::AlgorithmMetadata::producesOverlappingZones = false

True when the algorithm can produce overlapping zones (e.g.

"stack" mode where the master area and stack area visually overlap). Picker may render an overlap badge.

◆ reflowsOnResize

bool PhosphorLayout::AlgorithmMetadata::reflowsOnResize = false

True when the algorithm reflows the rest of the layout in response to an interactive window resize (GitHub #652): either a tree algorithm whose split ratios the engine adjusts (supportsMemory), or a scripted algorithm that implements the onWindowResized hook (supportsResizeHook).

Picker surfaces a "drag-to-resize neighbours" filter/indicator.

◆ supportsCustomParams

bool PhosphorLayout::AlgorithmMetadata::supportsCustomParams = false

True when the algorithm declares custom.

Parameters
annotationsbeyond the standard split/master/gap knobs. Picker offers a per-algorithm custom-params editor when set.

◆ supportsMasterCount

bool PhosphorLayout::AlgorithmMetadata::supportsMasterCount = false

True when the algorithm honours an explicit master-window count.

Picker shows a count editor only when this is set.

◆ supportsMemory

bool PhosphorLayout::AlgorithmMetadata::supportsMemory = false

True when the algorithm carries persistent per-screen state across sessions (BSP-style trees that remember user splits).

Picker may surface a "remembers your splits" indicator.

◆ supportsScriptState

bool PhosphorLayout::AlgorithmMetadata::supportsScriptState = false

True when the algorithm persists an opaque per-screen script-state bag (TilingState::scriptState) across retiles and sessions — a scripted algorithm that opts in via its metadata (e.g.

an aligned grid that remembers column widths). Picker surfaces a "remembers script state" filter/indicator.

◆ supportsSplitRatio

bool PhosphorLayout::AlgorithmMetadata::supportsSplitRatio = false

True when the algorithm honours an explicit master/secondary split ratio.

Picker shows a ratio slider only when this is set.

◆ zoneNumberDisplay

ZoneNumberDisplay PhosphorLayout::AlgorithmMetadata::zoneNumberDisplay = ZoneNumberDisplay::RendererDecides

How zone numbers are displayed in previews.

Typed internally; converted to / from the wire-format string at JSON, D-Bus, and QML boundaries via zoneNumberDisplayToString / zoneNumberDisplayFromString.


The documentation for this struct was generated from the following file: