Frozen snapshot of "where am I right now?" for a single resolver query. More...
#include <PhosphorContext/ContextHandle.h>
Public Attributes | |
| QString | screenId |
| The screen this context targets. | |
| int | virtualDesktop = 0 |
| The virtual desktop the user is currently on (1-based; 0 means "all desktops" / pinned in the Phosphor taxonomy). | |
| QString | activity |
| The current activity uuid. | |
| PhosphorZones::AssignmentEntry::Mode | mode = PhosphorZones::AssignmentEntry::Snapping |
| The resolved mode for screenId at snapshot time. | |
Frozen snapshot of "where am I right now?" for a single resolver query.
Built once via IContextResolver::handleFor(screenId) (or one of its siblings) and passed by const-reference into every effective-value and gate query the caller needs. The snapshot pattern is deliberate:
The struct is a value type — copy-able, no QObject, no signals — safe to pass through Qt::QueuedConnection if a future caller wants to ferry a snapshot across threads. (The two QString fields are implicitly shared and copy-thread-safe; the struct itself is not a C POD because QString has a non-trivial copy ctor.) Construction is reserved for IContextResolver implementations; callers should not hand-build a handle (the resolver's mode field has to come from the bound IModeProvider, not a guess).
| QString PhosphorContext::ContextHandle::activity |
The current activity uuid.
Empty when no activity manager is wired (headless tests) or when no activity is currently active.
| PhosphorZones::AssignmentEntry::Mode PhosphorContext::ContextHandle::mode = PhosphorZones::AssignmentEntry::Snapping |
The resolved mode for screenId at snapshot time.
Drives every disable / lock check that takes a Mode parameter, so the consumer does not re-look it up.
| QString PhosphorContext::ContextHandle::screenId |
The screen this context targets.
Either a physical screen id, a virtual-screen id, or the empty string when the resolver was asked for an "active window" handle and no screen could be determined.
| int PhosphorContext::ContextHandle::virtualDesktop = 0 |
The virtual desktop the user is currently on (1-based; 0 means "all desktops" / pinned in the Phosphor taxonomy).