Unified placement-engine surface a daemon dispatches through, plus the shared interfaces (window registry, window tracking, virtual desktops, geometry settings) every engine consumes.
Both the manual snap engine (`phosphor-snap-engine`) and the automatic autotile engine (`phosphor-tile-engine`) do the same kinds of things when a user hits a shortcut or a window opens or closes: move focus, swap windows, assign to a zone, react to a window opening or closing. Without a shared interface, a daemon has to branch on the current mode for every such event. phosphor-engine names each of those operations as a user intent and lets each engine fulfil the intent in its own terms, so the daemon's hot path is a single polymorphic call.
The library also owns the shared service contracts every engine reads from (the canonical window-tracking facade, the window-id canonicaliser, the virtual-desktop poll, and per-screen geometry settings), so engines don't carry their own copies and the daemon wires them up once.
| Type | Purpose |
|---|---|
| PhosphorEngine::IPlacementEngine | Intent dispatcher where every snap / move / focus / swap / assign call goes. |
| PhosphorEngine::IPlacementState | Read-only per-screen state contract. Persistence + D-Bus consume it without caring which engine produced it. |
| PhosphorEngine::PlacementEngineBase | Base class providing shared engine plumbing (settings injection, stale-window pruning, common signals). Per-window placement state lives in the engines and the unified WindowPlacementStore. Each engine adds only its mode-specific logic. |
| PhosphorEngine::NavigationContext | (windowId, screenId) target for an intent. May be empty on early-startup shortcuts. |
| PhosphorEngine::IWindowRegistry | Window-id canonicaliser + appId-from-instance lookup. |
| PhosphorEngine::IWindowTrackingService | Cross-engine shared store for zone assignments, pre-tile geometries, floating state. |
| PhosphorEngine::IVirtualDesktopManager | "Which virtual desktop is current?" A minimal interface with one method. |
| PhosphorEngine::IGeometrySettings | Per-screen padding / outer-gap / per-side gap settings. |
| PhosphorEngine::TilingStateKey | (screenId, desktop, activity) composite key for per-context state. |
| PhosphorEngine::PerScreenKeys | JSON key constants for per-screen overrides on disk. |
| PhosphorEngine::JsonKeys | JSON key constants for state-serialisation roundtrip. |