Enumeration + mutation surface for the in-memory zone-layout catalog. More...
#include <phosphor-zones/include/PhosphorZones/IZoneLayoutRegistry.h>
Signals | |
| void | layoutAdded (Layout *layout) |
| void | layoutRemoved (Layout *layout) |
| void | activeLayoutChanged (Layout *layout) |
| void | layoutAssigned (const QString &screenId, int virtualDesktop, Layout *layout) |
Signals inherited from PhosphorLayout::ILayoutSourceRegistry | |
| void | contentsChanged () |
| Emitted when the set of layouts this registry produces changes in any way that invalidates cached previews — entries added, removed, renamed, or re-parameterised. | |
Public Member Functions | |
| IZoneLayoutRegistry (QObject *parent=nullptr) | |
| ~IZoneLayoutRegistry () override | |
| virtual QVector< Layout * > | layouts () const =0 |
| Enumerate every known layout. | |
| virtual int | layoutCount () const =0 |
| virtual Layout * | layout (int index) const =0 |
| virtual Layout * | layoutByName (const QString &name) const =0 |
| virtual Layout * | layoutById (const QUuid &id) const =0 |
| Resolve a layout by its stable UUID. | |
| virtual void | addLayout (Layout *layout)=0 |
| virtual void | removeLayout (Layout *layout)=0 |
| virtual void | removeLayoutById (const QUuid &id)=0 |
| virtual Layout * | duplicateLayout (Layout *source)=0 |
| virtual Layout * | activeLayout () const =0 |
| virtual void | setActiveLayout (Layout *layout)=0 |
| virtual void | setActiveLayoutById (const QUuid &id)=0 |
| virtual Layout * | layoutForScreen (const QString &screenId, int virtualDesktop=0, const QString &activity=QString()) const =0 |
Cascade-resolve the manual layout for screenId. | |
| virtual Layout * | resolveLayoutForScreen (const QString &screenId) const =0 |
| Convenience: resolve a layout using the registry's current (desktop, activity) context. | |
| virtual QString | assignmentIdForScreen (const QString &screenId, int virtualDesktop=0, const QString &activity=QString()) const =0 |
Raw assignment id (manual-layout UUID or "autotile:<algorithmId>") for screenId, with cascade + level-1 provider fallback. | |
| virtual Layout * | defaultLayout () const =0 |
| Effective global default layout (snap-only fallback). | |
| virtual int | currentVirtualDesktop () const =0 |
| virtual int | currentVirtualDesktopForScreen (const QString &screenId) const |
| This screen's current virtual desktop (Plasma 6.7 per-output virtual desktops, #648). | |
| virtual QString | currentActivity () const =0 |
| virtual QJsonObject | loadAutotileOverrides (const QString &algorithmId) const |
| Per-algorithm autotile settings (gaps, shader, hiddenFromSelector, …) stored in the unified layout-settings.json sidecar, keyed by raw algorithm id. | |
| virtual QString | tilingAlgorithmForScreen (const QString &screenId, int virtualDesktop=0, const QString &activity=QString()) const |
Raw id of the tiling algorithm active for the (screenId, virtualDesktop, activity) context, or empty when none resolves. | |
| virtual ContextGapOverride | resolveContextGaps (const QString &screenId, int virtualDesktop, const QString &activity) const |
Resolve the per-context gap override (zone padding + outer gaps) that window rules pin for the (screenId, virtualDesktop, activity) context — the same resolution the daemon's geometry resolver uses on the snap-commit path. | |
| virtual bool | resolveContextLocked (const QString &screenId, int virtualDesktop, const QString &activity) const |
Resolve whether window rules lock the active layout for the (screenId, virtualDesktop, activity) context — the rule-driven counterpart to the manual ToggleLayoutLock shortcut. | |
| virtual bool | isContextActiveLayoutSuppressed (const QString &screenId, int virtualDesktop, const QString &activity) const |
True iff the (screenId, virtualDesktop, activity) context has no active layout specifically because the default assignment is suppressed — globally or by a per-context DefaultLayoutAssignment rule. | |
| virtual ContextOverlayOverride | resolveContextOverlay (const QString &screenId, int virtualDesktop, const QString &activity) const |
Resolve the per-context overlay-property override for the (screenId, virtualDesktop, activity) context — a per-slot read across all matching context rules (mirrors resolveContextGaps), so independent shader / style rules compose. | |
Public Member Functions inherited from PhosphorLayout::ILayoutSourceRegistry | |
| ILayoutSourceRegistry (QObject *parent=nullptr) | |
| ~ILayoutSourceRegistry () override | |
Enumeration + mutation surface for the in-memory zone-layout catalog.
Fixture tests can stub this contract without implementing persistence / assignments / quick-slots.
|
explicit |
|
override |
|
pure virtual |
Implemented in PhosphorZones::LayoutRegistry.
|
signal |
|
pure virtual |
| layout | Ownership transferred - the registry adopts layout and is responsible for its lifetime from this call on. |
Implemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
Raw assignment id (manual-layout UUID or "autotile:<algorithmId>") for screenId, with cascade + level-1 provider fallback.
Implemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
Implemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
Implemented in PhosphorZones::LayoutRegistry.
|
inlinevirtual |
This screen's current virtual desktop (Plasma 6.7 per-output virtual desktops, #648).
Default ignores the screen and returns the global currentVirtualDesktop(), so non-per-output implementers are unaffected.
Reimplemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
Effective global default layout (snap-only fallback).
Implemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
| source | Borrowed - caller retains ownership. |
addLayout semantics). Returns nullptr if source is unknown. Implemented in PhosphorZones::LayoutRegistry.
|
inlinevirtual |
True iff the (screenId, virtualDesktop, activity) context has no active layout specifically because the default assignment is suppressed — globally or by a per-context DefaultLayoutAssignment rule.
Daemon overlay / display paths that otherwise fall back to defaultLayout on a missing assignment use this to treat a suppressed context as "no layout, engine inactive" without regressing other empty-assignment states. The default returns false (a stub registry never suppresses).
Reimplemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
Implemented in PhosphorZones::LayoutRegistry.
|
signal |
|
signal |
|
pure virtual |
Resolve a layout by its stable UUID.
Returns nullptr when no layout with that id is known to the registry.
Implemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
Implemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
Implemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
Cascade-resolve the manual layout for screenId.
Returns defaultLayout() when no explicit assignment matches.
Implemented in PhosphorZones::LayoutRegistry.
|
signal |
|
pure virtual |
Enumerate every known layout.
Borrowed pointers - owned by the concrete registry (typically LayoutManager). Order is the registry's natural iteration order.
Implemented in PhosphorZones::LayoutRegistry.
|
inlinevirtual |
Per-algorithm autotile settings (gaps, shader, hiddenFromSelector, …) stored in the unified layout-settings.json sidecar, keyed by raw algorithm id.
Default returns empty so non-persisting implementers and the unified-list builder degrade to "no overrides". Concrete registries (LayoutRegistry) read the sidecar.
Reimplemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
| layout | Borrowed - caller hands the pointer in; the registry un-registers it and schedules deletion via deleteLater (matching how the registry adopted it in addLayout). Callers must drop any other references before this call returns. |
Implemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
Implemented in PhosphorZones::LayoutRegistry.
|
inlinevirtual |
Resolve the per-context gap override (zone padding + outer gaps) that window rules pin for the (screenId, virtualDesktop, activity) context — the same resolution the daemon's geometry resolver uses on the snap-commit path.
Context-aware geometry consumers (drag preview, empty- zone overlay, zone-detection query) call this through the interface so their geometry matches the committed result. The default returns an empty override (no rule gaps); a registry that does not model context rules — e.g. a fixture stub — keeps the legacy per-screen/layout/global cascade.
Reimplemented in PhosphorZones::LayoutRegistry.
|
inlinevirtual |
Resolve whether window rules lock the active layout for the (screenId, virtualDesktop, activity) context — the rule-driven counterpart to the manual ToggleLayoutLock shortcut.
A context rule carrying an ActionType::LockContext action whose value is true locks the context; the daemon ORs this into its context-lock check (across both engine modes) so a locked context refuses layout switches. Mode- agnostic and never persisted. The default returns false (no rule lock); a registry that does not model context rules — e.g. a fixture stub — keeps only the persisted manual-lock behaviour.
Reimplemented in PhosphorZones::LayoutRegistry.
|
inlinevirtual |
Resolve the per-context overlay-property override for the (screenId, virtualDesktop, activity) context — a per-slot read across all matching context rules (mirrors resolveContextGaps), so independent shader / style rules compose.
The overlay service applies a populated field over the active layout's own value. The default returns an empty override (no rule overlay overrides); a registry that does not model context rules — e.g. a fixture stub — keeps the layout's own overlay properties.
Reimplemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
Convenience: resolve a layout using the registry's current (desktop, activity) context.
Implemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
Implemented in PhosphorZones::LayoutRegistry.
|
pure virtual |
Implemented in PhosphorZones::LayoutRegistry.
|
inlinevirtual |
Raw id of the tiling algorithm active for the (screenId, virtualDesktop, activity) context, or empty when none resolves.
Used by the unified-list builder to keep the active algorithm visible in the picker even when it's been hidden (mirrors the active-layout exemption for manual layouts). Default empty for non-resolving implementers.
Reimplemented in PhosphorZones::LayoutRegistry.