Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorZones Namespace Reference

Namespaces

namespace  GeometryUtils
 
namespace  LayoutUtils
 Zone/layout primitive utilities — pure Layout / Zone operations.
 
namespace  ZoneDefaults
 Library-owned default values for zone presentation.
 
namespace  ZoneJsonKeys
 JSON wire-format keys for zone & layout serialisation.
 

Classes

struct  AppRule
 App-to-zone auto-snap rule. More...
 
struct  AppRuleMatch
 Result of matching a window class against app rules. More...
 
struct  AssignmentEntry
 Explicit per-context assignment entry storing both mode fields. More...
 
struct  ComputedZoneGeometry
 
class  IZoneDetection
 Pure-query subset of zone detection — read-only geometry lookup. More...
 
class  IZoneDetector
 Abstract interface for zone detection + highlight lifecycle. More...
 
class  IZoneLayoutRegistry
 Enumeration + mutation surface for the in-memory zone-layout catalog. More...
 
class  Layout
 Represents a collection of zones that form a layout. More...
 
struct  LayoutAssignmentKey
 Key for layout assignment (screen + desktop + activity) More...
 
struct  LayoutComputeResult
 
class  LayoutComputeService
 
class  LayoutFactory
 
class  LayoutRegistry
 Manual zone-layout registry + per-context assignment store. More...
 
struct  LayoutSnapshot
 
class  LayoutWorker
 
class  Zone
 Represents a single zone within a layout. More...
 
struct  ZoneDetectionResult
 Result of zone detection. More...
 
class  ZoneDetector
 Efficient zone detection for window snapping. More...
 
class  ZoneHighlighter
 Manages zone highlighting state. More...
 
class  ZonesLayoutSource
 ILayoutSource adapter wrapping an IZoneLayoutRegistry. More...
 
class  ZonesLayoutSourceFactory
 Factory for ZonesLayoutSource. More...
 
struct  ZoneSnapshot
 

Enumerations

enum class  LayoutCategory { Manual = 0 , Autotile = 1 }
 Category for layout type. More...
 
enum class  ZoneField {
  None = 0 , Name = 1 << 0 , Appearance = 1 << 1 , Minimal = None ,
  Full = Name | Appearance
}
 Flags controlling which zone fields to include in conversion (OCP-compliant) More...
 
enum class  ZoneGeometryMode { Relative = 0 , Fixed = 1 }
 Geometry mode for individual zones. More...
 

Functions

size_t qHash (const LayoutAssignmentKey &key, size_t seed=0)
 
PHOSPHORZONES_EXPORT PhosphorLayout::LayoutPreview previewFromLayout (PhosphorZones::Layout *layout, const QSize &canvas={})
 Convert a single Layout into a renderer-ready LayoutPreview.
 
PHOSPHORZONES_EXPORT void ensureZonesLayoutSourceProviderLinked ()
 Anchor symbol that forces the translation unit owning the static LayoutSourceProviderRegistrar for this provider to be linked in.
 

Enumeration Type Documentation

◆ LayoutCategory

enum class PhosphorZones::LayoutCategory
strong

Category for layout type.

QML Note: Passed as int to QML. Values: 0 = Manual, 1 = Autotile

Enumerator
Manual 

Traditional zone-based layout.

Autotile 

Dynamic auto-tiling algorithm.

◆ ZoneField

enum class PhosphorZones::ZoneField
strong

Flags controlling which zone fields to include in conversion (OCP-compliant)

These flags allow callers to request minimal or full zone data without duplicating conversion logic. Use Minimal for preview thumbnails, Full for overlay rendering.

Enumerator
None 
Name 

Include zone name.

Appearance 

Include colors, opacities, border properties.

Minimal 

Id, ZoneNumber, RelativeGeometry only (for previews)

Full 

All fields (for overlay rendering)

◆ ZoneGeometryMode

Geometry mode for individual zones.

Relative: 0.0–1.0 normalized coordinates (default, resolution-independent). Fixed: Absolute pixel coordinates relative to reference screen origin.

Owned by phosphor-zones because it's a per-zone shape; the former PlasmaZones-side using-alias in src/core/ was removed when the decoupling sweep landed — all callers now reference PhosphorZones::ZoneGeometryMode directly.

Enumerator
Relative 
Fixed 

Function Documentation

◆ ensureZonesLayoutSourceProviderLinked()

PHOSPHORZONES_EXPORT void PhosphorZones::ensureZonesLayoutSourceProviderLinked ( )

Anchor symbol that forces the translation unit owning the static LayoutSourceProviderRegistrar for this provider to be linked in.

Under SHARED builds (today's default) every TU of the loaded library has its static initialisers run, so this anchor is a no-op. The function exists so that STATIC builds + linker GC (--gc-sections, --as-needed) can't drop zoneslayoutsourcefactory.cpp silently — at which point the static registrar never runs and the bundle ships without the zones provider. Composition-root glue (buildStandardLayoutSourceBundle) calls this once during bundle wiring. The body is an empty no-op; only the symbol reference matters. See the @todo(plugin-compositor) note in PhosphorLayoutApi/LayoutSourceProviderRegistry.h.

◆ previewFromLayout()

PHOSPHORZONES_EXPORT PhosphorLayout::LayoutPreview PhosphorZones::previewFromLayout ( PhosphorZones::Layout layout,
const QSize &  canvas = {} 
)

Convert a single Layout into a renderer-ready LayoutPreview.

Pure projection — no Qt object lifecycle, no signals. Manual layouts have a fixed shape, so the windowCount param from ILayoutSource is ignored here. Provided as a free function so consumers that already hold a Layout* can build a preview without going through ILayoutSource.

canvas (optional) — reference geometry used when projecting zones that were authored in fixed-pixel mode. When empty (the default), the projection falls back to Layout::lastRecalcGeometry(), which holds whichever screen most recently triggered a recalc — fine for caller topologies with a single monitor, but stale if two different screens share a Layout* and query their previews in alternation. Passing the caller's own canvas makes the projection deterministic per-call.

◆ qHash()

size_t PhosphorZones::qHash ( const LayoutAssignmentKey key,
size_t  seed = 0 
)
inline