Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorContext::IContextGateSource Class Referenceabstract

Disable / lock cascade adapter. More...

#include <PhosphorContext/IContextInputs.h>

Public Member Functions

virtual ~IContextGateSource ()=default
virtual bool isMonitorDisabled (PhosphorZones::AssignmentEntry::Mode mode, const QString &screenId) const =0
 Highest-priority "is this screen disabled regardless of (desktop, activity)?
virtual bool isDesktopDisabled (PhosphorZones::AssignmentEntry::Mode mode, const QString &screenId, int desktop) const =0
 Per-desktop disable predicate.
virtual bool isActivityDisabled (PhosphorZones::AssignmentEntry::Mode mode, const QString &screenId, const QString &activity) const =0
 Per-activity disable predicate.
virtual bool isContextLocked (PhosphorZones::AssignmentEntry::Mode mode, const QString &screenId, int desktop, const QString &activity) const =0
 Per-context lock predicate — equivalent to ISettings::isContextLocked after the Mode has been folded into the screen-key via Utils::contextLockKey.

Detailed Description

Disable / lock cascade adapter.

Exposes the four gate primitives the resolver composes into disabledReason(handle) / isLocked(handle). The daemon's IZoneVisualizationSettings already implements three of the four (isMonitorDisabled / isDesktopDisabled / isActivityDisabled); the fourth (isContextLocked) is owned by the broader ISettings and historically takes a pre-composed screenIdOrName lock-key string (Utils::contextLockKey(mode, screenId)). Adapter implementations are expected to do that composition internally so the resolver's public API stays purely typed in (Mode, screenId, desktop, activity).

The cascade is read-only. Toggling a disable list or a lock still goes through the original settings writer surface; the resolver does not republish a mutation API here.

Constructor & Destructor Documentation

◆ ~IContextGateSource()

virtual PhosphorContext::IContextGateSource::~IContextGateSource ( )
virtualdefault

Member Function Documentation

◆ isActivityDisabled()

virtual bool PhosphorContext::IContextGateSource::isActivityDisabled ( PhosphorZones::AssignmentEntry::Mode mode,
const QString & screenId,
const QString & activity ) const
pure virtual

Per-activity disable predicate.

Implementations route to IZoneVisualizationSettings::isActivityDisabled — an empty activity string means "no activity manager is wired" and must short-circuit to false rather than match an empty entry in the disable list (which would mis-fire on headless test runs).

◆ isContextLocked()

virtual bool PhosphorContext::IContextGateSource::isContextLocked ( PhosphorZones::AssignmentEntry::Mode mode,
const QString & screenId,
int desktop,
const QString & activity ) const
pure virtual

Per-context lock predicate — equivalent to ISettings::isContextLocked after the Mode has been folded into the screen-key via Utils::contextLockKey.

The adapter performs that composition; the resolver passes typed (mode, screenId, desktop, activity).

◆ isDesktopDisabled()

virtual bool PhosphorContext::IContextGateSource::isDesktopDisabled ( PhosphorZones::AssignmentEntry::Mode mode,
const QString & screenId,
int desktop ) const
pure virtual

Per-desktop disable predicate.

Implementations route to IZoneVisualizationSettings::isDesktopDisabled — desktop value 0 in this codebase means "pinned across all desktops" so a zero desktop must not match a per-desktop disable entry.

◆ isMonitorDisabled()

virtual bool PhosphorContext::IContextGateSource::isMonitorDisabled ( PhosphorZones::AssignmentEntry::Mode mode,
const QString & screenId ) const
pure virtual

Highest-priority "is this screen disabled regardless of (desktop, activity)?

" predicate. Implementations route to IZoneVisualizationSettings::isMonitorDisabled (Mode-scoped).


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