Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
AutotileConstants.h File Reference

Algorithm-layer constants for the autotile/tile primitives. More...

#include <PhosphorLayoutApi/GapKeys.h>
#include <QLatin1String>
#include <QMetaType>
#include <limits>

Go to the source code of this file.

Namespaces

namespace  PhosphorTiles
 
namespace  PhosphorTiles::AutotileDefaults
 Auto-tiling algorithm defaults.
 
namespace  PhosphorTiles::AutotileJsonKeys
 JSON keys for autotile state serialization.
 
namespace  PhosphorTiles::AutotileJsonValues
 JSON value strings (enum-ish discriminants) paired with the keys above.
 

Enumerations

enum class  PhosphorTiles::AutotileOverflowBehavior { PhosphorTiles::Float = 0 , PhosphorTiles::Unlimited = 1 }
 
enum class  PhosphorTiles::AutotileInsertPosition { PhosphorTiles::End = 0 , PhosphorTiles::AfterFocused = 1 , PhosphorTiles::AsMaster = 2 }
 
enum class  PhosphorTiles::AutotileDragBehavior { PhosphorTiles::Float = 0 , PhosphorTiles::Reorder = 1 }
 

Functions

constexpr bool PhosphorTiles::AutotileDefaults::isNumericMetaType (int typeId)
 Returns true if typeId is a numeric QMetaType (Double, Float, Int, UInt, LongLong, ULongLong).
 

Variables

constexpr qreal PhosphorTiles::AutotileDefaults::DefaultSplitRatio = 0.5
 50/50 split when nothing else specified
 
constexpr int PhosphorTiles::AutotileDefaults::DefaultMasterCount = 1
 Single master window.
 
constexpr int PhosphorTiles::AutotileDefaults::DefaultMaxWindows = 5
 Maximum tiled windows before overflow.
 
constexpr QLatin1String PhosphorTiles::AutotileDefaults::DefaultAlgorithmId {"bsp"}
 Default tiling algorithm.
 
constexpr qreal PhosphorTiles::AutotileDefaults::DefaultSplitRatioStep = 0.05
 
constexpr qreal PhosphorTiles::AutotileDefaults::MinSplitRatioStep = 0.01
 
constexpr qreal PhosphorTiles::AutotileDefaults::MaxSplitRatioStep = 0.25
 
constexpr qreal PhosphorTiles::AutotileDefaults::MinSplitRatio = 0.1
 
constexpr qreal PhosphorTiles::AutotileDefaults::MaxSplitRatio = 0.9
 
constexpr int PhosphorTiles::AutotileDefaults::MinMasterCount = 1
 
constexpr int PhosphorTiles::AutotileDefaults::MaxMasterCount = 5
 
constexpr int PhosphorTiles::AutotileDefaults::DefaultInnerGap = 8
 
constexpr int PhosphorTiles::AutotileDefaults::DefaultOuterGap = 8
 
constexpr int PhosphorTiles::AutotileDefaults::MinGap = 0
 
constexpr int PhosphorTiles::AutotileDefaults::MaxGap = 50
 
constexpr int PhosphorTiles::AutotileDefaults::MinRectSizePx = 50
 
constexpr int PhosphorTiles::AutotileDefaults::GapEdgeThresholdPx = 5
 
constexpr int PhosphorTiles::AutotileDefaults::MinMaxWindows = 1
 
constexpr int PhosphorTiles::AutotileDefaults::MaxMaxWindows = 12
 
constexpr int PhosphorTiles::AutotileDefaults::UnlimitedMaxWindowsSentinel = std::numeric_limits<int>::max() / 2
 
constexpr int PhosphorTiles::AutotileDefaults::MaxZones = 256
 
constexpr int PhosphorTiles::AutotileDefaults::MaxRuntimeTreeDepth = 50
 Maximum recursion depth for split tree operations.
 
constexpr int PhosphorTiles::AutotileDefaults::MaxTreeNodesForJs = MaxZones * 2
 Cap on total node count when converting a SplitTree to a QJSValue object.
 
constexpr qreal PhosphorTiles::AutotileDefaults::SplitRatioHysteresis = 0.05
 Band within which algorithm-switch ratio reset is suppressed.
 
constexpr int PhosphorTiles::AutotileDefaults::MinMetadataWindows = 1
 
constexpr int PhosphorTiles::AutotileDefaults::MaxMetadataWindows = 100
 
constexpr int PhosphorTiles::AutotileDefaults::MinInsertPosition = 0
 
constexpr int PhosphorTiles::AutotileDefaults::MaxInsertPosition = 2
 
constexpr int PhosphorTiles::AutotileDefaults::ScriptWatchdogTimeoutMs = 100
 Watchdog deadline for a single JS evaluation guarded by ScriptedAlgorithm::guardedCall().
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::ScreenName {"screenName"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::WindowOrder {"windowOrder"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::FloatingWindows {"floatingWindows"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::FocusedWindow {"focusedWindow"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::MasterCount {"masterCount"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::SplitRatio {"splitRatio"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::SplitRatioStep {"splitRatioStep"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::CustomParams {"customParams"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::PerAlgorithmSettings {"perAlgorithmSettings"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::AlgorithmId {"algorithmId"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::InnerGap {"innerGap"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::OuterGap {"outerGap"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::SmartGaps {"smartGaps"}
 < canonical: PhosphorLayoutApi/GapKeys.h
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::FocusNewWindows {"focusNewWindows"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::FocusFollowsMouse {"focusFollowsMouse"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::InsertPosition {"insertPosition"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::RespectMinimumSize {"respectMinimumSize"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::MaxWindows {"maxWindows"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::OverflowBehavior {"overflowBehavior"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::CenteredMasterSplitRatio {"centeredMasterSplitRatio"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::CenteredMasterMasterCount {"centeredMasterMasterCount"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonKeys::SplitTreeKey {"splitTree"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonValues::OverflowFloat {"float"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonValues::OverflowUnlimited {"unlimited"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonValues::InsertEnd {"end"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonValues::InsertAfterFocused {"afterFocused"}
 
constexpr QLatin1String PhosphorTiles::AutotileJsonValues::InsertAsMaster {"asMaster"}
 

Detailed Description

Algorithm-layer constants for the autotile/tile primitives.

This header owns the JSON keys and numeric defaults that the tiling algorithm primitives need to be self-contained. It intentionally has NO dependency on PlasmaZones config or core layers, so it can move cleanly into the future libs/phosphor-tiles library without dragging cross-layer headers along.

Non-algorithm consumers (src/dbus/autotileadaptor, src/core/geometryutils, etc.) reach these symbols transparently via core/constants.h, which re-includes this header for backward source compatibility.