phosphor-tiles

Tiling algorithms, sandboxed JS, and TilingState.

The algorithm vocabulary and per-screen tiling state. TilingAlgorithm is the base; built-in C++ algorithms (binary-split, master-stack, columns, spiral, …) plus ScriptedAlgorithm for user JavaScript, sandboxed via ScriptedAlgorithmSandbox with ScriptedAlgorithmJsBuiltins as the allowlist. AlgorithmRegistry is the concrete catalogue. TilingState tracks per-screen window order + master count + split tree and implements IPlacementState. AutotileLayoutSource is the ILayoutSource adapter. The runtime engine lives in phosphor-tile-engine.

Full API →

Key types

TilingAlgorithm
Abstract base; calculateZones(TilingParams) → QVector<QRect>.
TilingState
Per-screen state implementing IPlacementState.
AlgorithmRegistry
Concrete registry: built-ins + scripted algorithms.
ScriptedAlgorithmSandbox
QJSEngine subclass with stripped globals + watchdog.
AutotileLayoutSource
ILayoutSource adapter wrapping the registry.
AutotilePreviewRender
Paint-a-thumbnail helper for the algorithm picker.

Dependencies

See also

References