Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
SnapEngine.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include <phosphorsnapengine_export.h>
15#include <QObject>
16#include <QPointer>
17#include <QRect>
18#include <QString>
19#include <QStringList>
20#include <functional>
21#include <memory>
22
23namespace PhosphorZones {
24class IZoneDetector;
25class LayoutRegistry;
26}
27
28namespace PhosphorSnapEngine {
29
30class INavigationStateProvider;
31class IZoneAdjacencyResolver;
32class SnapNavigationTargetResolver;
33class SnapState;
34
49class PHOSPHORSNAPENGINE_EXPORT SnapEngine : public PhosphorEngine::PlacementEngineBase
50{
51 Q_OBJECT
52
53public:
57 QObject* parent = nullptr);
58 ~SnapEngine() override;
59
66 QString currentActivity() const;
67
68 // ═══════════════════════════════════════════════════════════════════════════
69 // IPlacementEngine — lifecycle
70 // ═══════════════════════════════════════════════════════════════════════════
71
72 bool isActiveOnScreen(const QString& screenId) const override;
78 bool isEnabled() const noexcept override;
79 using IPlacementEngine::windowOpened;
80 void windowOpened(const QString& windowId, const QString& screenId, int minWidth, int minHeight) override;
81
107 using ShouldRestorePredicate = std::function<bool(const QString& screenId)>;
108
116 void setShouldRestorePredicate(ShouldRestorePredicate predicate)
117 {
118 m_shouldRestorePredicate = std::move(predicate);
119 }
120
121 void windowClosed(const QString& windowId) override;
122 void windowFocused(const QString& windowId, const QString& screenId) override;
123 void toggleWindowFloat(const QString& windowId, const QString& screenId) override;
124 void setWindowFloat(const QString& windowId, bool shouldFloat) override;
125 void saveState() override;
126 void loadState() override;
127
128 // Cross-engine handoff
129 QString engineId() const override
130 {
131 return QStringLiteral("snap");
132 }
133 void handoffReceive(const HandoffContext& ctx) override;
134 void handoffRelease(const QString& windowId) override;
135 QString screenForTrackedWindow(const QString& windowId) const override;
140 bool isWindowTracked(const QString& windowId) const override;
141
149
154 void resnapCurrentAssignments(const QString& screenFilter = QString());
155
162 void resnapFromAutotileOrder(const QStringList& autotileWindowOrder, const QString& screenId);
163
175 QVector<PhosphorEngine::ZoneAssignmentEntry>
176 calculateResnapEntriesFromAutotileOrder(const QStringList& autotileWindowOrder, const QString& screenId);
177
184 PhosphorProtocol::SnapAllResultList calculateSnapAllWindows(const QStringList& windowIds, const QString& screenId);
185
195 void emitBatchedResnap(const QVector<PhosphorEngine::ZoneAssignmentEntry>& entries);
196
201 void snapAllWindows(const QString& screenId);
202
203 // ═══════════════════════════════════════════════════════════════════════════
204 // Window restore (auto-snap on window open)
205 // ═══════════════════════════════════════════════════════════════════════════
206
230 resolveWindowRestore(const QString& windowId, const QString& screenId, bool sticky,
232
233 // ═══════════════════════════════════════════════════════════════════════════
234 // Autotile engine reference (for isActiveOnScreen routing)
235 // ═══════════════════════════════════════════════════════════════════════════
236
246
248 {
249 return m_snapState;
250 }
251
252 // ═══════════════════════════════════════════════════════════════════════════
253 // Zone adjacency resolver (for daemon-driven navigation)
254 // ═══════════════════════════════════════════════════════════════════════════
255
266
267 // ═══════════════════════════════════════════════════════════════════════════
268 // Navigation state provider
269 // ═══════════════════════════════════════════════════════════════════════════
270
283
284 // ═══════════════════════════════════════════════════════════════════════════
285 // Navigation (moved out of WindowTrackingAdaptor)
286 //
287 // Every method takes a PhosphorEngine::NavigationContext populated by the daemon's
288 // shortcut handler. The engine uses ctx.windowId directly rather than
289 // re-reading it from the WTA shadow, which is a step toward retiring
290 // the SnapEngine -> WTA back-reference entirely. When ctx.windowId is
291 // empty, the engine may consult m_navState->lastActiveWindowId() as a
292 // best-effort fallback -- but in the normal path the daemon always
293 // provides a resolved target.
294 // ═══════════════════════════════════════════════════════════════════════════
295
296 // ═══════════════════════════════════════════════════════════════════════════
297 // IPlacementEngine — navigation overrides
298 // ═══════════════════════════════════════════════════════════════════════════
299
302 void focusInDirection(const QString& direction, const PhosphorEngine::NavigationContext& ctx) override;
303
306 void moveFocusedInDirection(const QString& direction, const PhosphorEngine::NavigationContext& ctx) override;
307
310 void swapFocusedInDirection(const QString& direction, const PhosphorEngine::NavigationContext& ctx) override;
311
314 void moveFocusedToPosition(int zoneNumber, const PhosphorEngine::NavigationContext& ctx) override;
315
318 void rotateWindows(bool clockwise, const PhosphorEngine::NavigationContext& ctx) override;
319
323
328
331
334
337
341 void cycleFocus(bool forward, const PhosphorEngine::NavigationContext& ctx) override;
342
343 // ═══════════════════════════════════════════════════════════════════════════
344 // Snap commit orchestration
345 //
346 // Full snap lifecycle: clear floating, assign to zone, update tracking,
347 // emit state-changed signals. Owns the orchestration that was previously
348 // on WindowTrackingService.
349 // ═══════════════════════════════════════════════════════════════════════════
350
351 void commitSnap(const QString& windowId, const QString& zoneId, const QString& screenId,
353
354 void commitMultiZoneSnap(const QString& windowId, const QStringList& zoneIds, const QString& screenId,
356
357 void uncommitSnap(const QString& windowId);
358
359 PhosphorEngine::UnfloatResult resolveUnfloatGeometry(const QString& windowId, const QString& fallbackScreen) const;
360
362 applyBatchAssignments(const QVector<PhosphorEngine::ZoneAssignmentEntry>& entries,
364 std::function<QString()> fallbackScreenResolver = {});
365
366 // ═══════════════════════════════════════════════════════════════════════════
367 // Auto-snap calculations (moved from WTS)
368 // ═══════════════════════════════════════════════════════════════════════════
369
370 PhosphorEngine::SnapResult calculateSnapToAppRule(const QString& windowId, const QString& windowScreenName,
371 bool isSticky) const;
372 PhosphorEngine::SnapResult calculateSnapToLastZone(const QString& windowId, const QString& windowScreenId,
373 bool isSticky) const;
374 PhosphorEngine::SnapResult calculateSnapToEmptyZone(const QString& windowId, const QString& windowScreenId,
375 bool isSticky) const;
377 calculateRestoreFromSession(const QString& windowId, const QString& screenId, bool isSticky,
379
380 // ═══════════════════════════════════════════════════════════════════════════
381 // Resnap / rotation calculations (moved from WTS)
382 // ═══════════════════════════════════════════════════════════════════════════
383
384 QVector<PhosphorEngine::ZoneAssignmentEntry> calculateResnapFromPreviousLayout();
385 QVector<PhosphorEngine::ZoneAssignmentEntry>
386 calculateResnapFromCurrentAssignments(const QString& screenFilter = QString()) const;
387 QVector<PhosphorEngine::ZoneAssignmentEntry>
388 calculateResnapFromAutotileOrder(const QStringList& autotileWindowOrder, const QString& screenId) const;
389 QVector<PhosphorEngine::ZoneAssignmentEntry> calculateSnapAllWindowEntries(const QStringList& windowIds,
390 const QString& screenId) const;
391 QVector<PhosphorEngine::ZoneAssignmentEntry> calculateRotation(bool clockwise,
392 const QString& screenFilter = QString()) const;
393
394 // ═══════════════════════════════════════════════════════════════════════════
395 // Saved snap-floating windows (mode-transition bookkeeping)
396 // ═══════════════════════════════════════════════════════════════════════════
397
398 void saveSnapFloating(const QString& windowId);
399 bool restoreSnapFloating(const QString& windowId);
401
402 // IPlacementEngine — generic mode-float overrides
403 bool restoreSavedModeFloat(const QString& windowId) override
404 {
405 return restoreSnapFloating(windowId);
406 }
407 void clearSavedFloatingForWindows(const QStringList& windowIds) override
408 {
409 for (const QString& windowId : windowIds) {
410 m_savedSnapFloatingWindows.remove(windowId);
411 }
412 }
413 void saveModeFloat(const QString& windowId) override
414 {
415 saveSnapFloating(windowId);
416 }
418 {
419 clearSavedSnapFloating();
420 }
421
422 // ═══════════════════════════════════════════════════════════════════════════
423 // Effect-reported windows (runtime flag — not persisted)
424 // ═══════════════════════════════════════════════════════════════════════════
425
426 void markWindowReported(const QString& windowId);
427 const QSet<QString>& effectReportedWindows() const
428 {
429 return m_effectReportedWindows;
430 }
431
432 int pruneStaleWindows(const QSet<QString>& aliveWindowIds) override;
433
434 // ═══════════════════════════════════════════════════════════════════════════
435 // IPlacementEngine — state access
436 //
437 // Returns the single SnapState wired by Daemon::init(). Currently a
438 // global state (not per-screen); a future PR will introduce per-screen
439 // ownership. Returns nullptr in headless unit tests that don't wire a
440 // SnapState.
441 // ═══════════════════════════════════════════════════════════════════════════
442
443 PhosphorEngine::IPlacementState* stateForScreen(const QString& screenId) override;
444 const PhosphorEngine::IPlacementState* stateForScreen(const QString& screenId) const override;
445
446 // ═══════════════════════════════════════════════════════════════════════════
447 // Internal navigation helpers (concrete SnapEngine methods that the
448 // IPlacementEngine overrides delegate to)
449 // ═══════════════════════════════════════════════════════════════════════════
450
454
456 void rotateWindowsInLayout(bool clockwise, const QString& screenId);
457
458 // ═══════════════════════════════════════════════════════════════════════════
459 // Persistence delegate
460 // ═══════════════════════════════════════════════════════════════════════════
461
472 void setPersistenceDelegate(std::function<void()> saveFn, std::function<void()> loadFn)
473 {
474 m_saveFn = std::move(saveFn);
475 m_loadFn = std::move(loadFn);
476 }
477
482 QString lastActiveScreenId() const
483 {
484 return m_lastActiveScreenId;
485 }
486
487Q_SIGNALS:
488 // ═══════════════════════════════════════════════════════════════════════════
489 // Signals (relayed via SnapAdaptor -> WTA -> D-Bus -> effect)
490 // ═══════════════════════════════════════════════════════════════════════════
491
493 void windowSnapStateChanged(const QString& windowId, const PhosphorProtocol::WindowStateEntry& entry);
494
496 void windowFloatingClearedForSnap(const QString& windowId, const QString& screenId);
497
499 void applyGeometryRequested(const QString& windowId, int x, int y, int width, int height, const QString& zoneId,
500 const QString& screenId, bool sizeOnly);
501
503 void resnapToNewLayoutRequested(const QString& resnapData);
504
506 void snapAllWindowsRequested(const QString& screenId);
507
512 void applyGeometriesBatch(const PhosphorProtocol::WindowGeometryList& geometries, const QString& action);
513
514protected:
515 void onWindowClaimed(const QString& windowId) override;
516 void onWindowReleased(const QString& windowId) override;
517 void onWindowFloated(const QString& windowId) override;
518 void onWindowUnfloated(const QString& windowId) override;
519
520private:
521 PhosphorEngine::ISnapSettings* snapSettings() const;
522
523 struct GapParams
524 {
525 int zonePadding;
527 };
528 GapParams resolveGapParams() const;
529
530 void commitSnapImpl(const QString& windowId, const QStringList& zoneIds, const QString& screenId,
532
533 PhosphorZones::LayoutRegistry* m_layoutManager = nullptr;
534 PhosphorEngine::IWindowTrackingService* m_windowTracker = nullptr;
535 SnapState* m_snapState = nullptr;
536 PhosphorZones::IZoneDetector* m_zoneDetector = nullptr;
537 PhosphorEngine::IVirtualDesktopManager* m_virtualDesktopManager = nullptr;
538 QPointer<QObject> m_autotileEngineObj;
539 PhosphorEngine::IPlacementEngine* m_autotileEngineTyped = nullptr;
540 IZoneAdjacencyResolver* m_zoneAdjacencyResolver = nullptr;
541 // Typed navigation-state provider — replaces the opaque QObject* m_wta
542 // back-reference. Provides read-only access to compositor-layer shadows
543 // (last-active window, last-active screen, last-cursor screen, frame
544 // geometry). Not owned; must outlive SnapEngine.
545 INavigationStateProvider* m_navState = nullptr;
546 // Snap-mode navigation target resolver. Owned by SnapEngine — moved
547 // here in Phase 5E from WindowTrackingAdaptor. Constructed lazily on
548 // first navigation call (so the construction order isn't constrained
549 // by the fact that SnapEngine has to exist before a resolver that
550 // takes WTS + PhosphorZones::LayoutRegistry can be built).
551 std::unique_ptr<SnapNavigationTargetResolver> m_targetResolver;
552 QSet<QString> m_savedSnapFloatingWindows;
553 QSet<QString> m_effectReportedWindows;
554
555 // ═══════════════════════════════════════════════════════════════════════════
556 // Float helpers (snapengine/float.cpp)
557 //
558 // The historical clearFloatingStateForSnap / assignToZones pair was
559 // removed — all snap commits now route through commitSnapImpl.
560 // ═══════════════════════════════════════════════════════════════════════════
561
562 bool unfloatToZone(const QString& windowId, const QString& screenId);
563 bool applyGeometryForFloat(const QString& windowId, const QString& screenId);
564
574 SnapNavigationTargetResolver* ensureTargetResolver(const QString& action = QString());
575
580 bool isWindowExcludedForAction(const QString& windowId, const QString& action, const QString& screenId);
581
582 // Persistence delegates (KConfig stays in adaptor layer)
583 std::function<void()> m_saveFn;
584 std::function<void()> m_loadFn;
585
586 // Last-focused screen (updated by windowFocused)
587 QString m_lastActiveScreenId;
588
589 // Auto-snap entry gate. Empty until the daemon wires it; while empty
590 // the engine treats every (screen, desktop) as active — preserving the
591 // historical default that unit tests rely on. See ShouldRestorePredicate
592 // doc above and discussion #461 item 7.
593 ShouldRestorePredicate m_shouldRestorePredicate{};
594};
595
596} // namespace PhosphorSnapEngine
Unified placement engine interface.
Definition IPlacementEngine.h:57
Per-screen placement state contract.
Definition IPlacementState.h:26
Definition ISnapSettings.h:13
Definition IVirtualDesktopManager.h:11
Definition IWindowTrackingService.h:33
Abstract base class for placement engines.
Definition PlacementEngineBase.h:37
Narrow read-only interface for compositor-layer state queries.
Definition INavigationStateProvider.h:32
Narrow interface for zone-adjacency queries used by snap navigation.
Definition IZoneAdjacencyResolver.h:28
Engine for manual zone-based window snapping.
Definition SnapEngine.h:50
void windowSnapStateChanged(const QString &windowId, const PhosphorProtocol::WindowStateEntry &entry)
Snap state changed (commit / uncommit). WTA relays to D-Bus windowStateChanged.
void snapAllWindowsRequested(const QString &screenId)
Request KWin effect to collect unsnapped windows and snap them all.
void focusInDirection(const QString &direction, const PhosphorEngine::NavigationContext &ctx) override
Walk to the adjacent window in direction and transfer keyboard focus.
void markWindowReported(const QString &windowId)
void setPersistenceDelegate(std::function< void()> saveFn, std::function< void()> loadFn)
Set persistence callbacks for save/load.
Definition SnapEngine.h:472
QVector< PhosphorEngine::ZoneAssignmentEntry > calculateRotation(bool clockwise, const QString &screenFilter=QString()) const
void emitBatchedResnap(const QVector< PhosphorEngine::ZoneAssignmentEntry > &entries)
Emit a single batched resnapToNewLayoutRequested signal.
void setWindowFloat(const QString &windowId, bool shouldFloat) override
Set floating state explicitly (directional, not toggle).
void saveSnapFloating(const QString &windowId)
const QSet< QString > & effectReportedWindows() const
Definition SnapEngine.h:427
PhosphorEngine::SnapResult calculateRestoreFromSession(const QString &windowId, const QString &screenId, bool isSticky, PhosphorEngine::WindowKind kind=PhosphorEngine::WindowKind::Unknown) const
PhosphorEngine::SnapResult calculateSnapToLastZone(const QString &windowId, const QString &windowScreenId, bool isSticky) const
int pruneStaleWindows(const QSet< QString > &aliveWindowIds) override
void rotateWindowsInLayout(bool clockwise, const QString &screenId)
Rotate snapped windows through the layout's zone order on screenId.
void toggleFocusedFloat(const PhosphorEngine::NavigationContext &ctx) override
Toggle the focused window between snapped and floating.
PhosphorEngine::SnapResult calculateSnapToAppRule(const QString &windowId, const QString &windowScreenName, bool isSticky) const
SnapState * snapState() const
Definition SnapEngine.h:247
void saveModeFloat(const QString &windowId) override
Definition SnapEngine.h:413
void onWindowFloated(const QString &windowId) override
PhosphorEngine::SnapResult calculateSnapToEmptyZone(const QString &windowId, const QString &windowScreenId, bool isSticky) const
QString screenForTrackedWindow(const QString &windowId) const override
Return the screen this engine considers the window to be on, or empty if the window isn't tracked by ...
void reapplyLayout(const PhosphorEngine::NavigationContext &ctx) override
Re-apply the current layout to all managed windows.
bool isActiveOnScreen(const QString &screenId) const override
Whether this engine is active on the given screen.
void pushToEmptyZone(const PhosphorEngine::NavigationContext &ctx) override
Move the focused window to the first empty zone on ctx.screenId.
void restoreFocusedWindow(const PhosphorEngine::NavigationContext &ctx) override
Restore the focused window to its captured pre-snap size and unsnap.
std::function< bool(const QString &screenId)> ShouldRestorePredicate
Predicate consulted on the auto-snap entry path to suppress zone restores onto a context the user dis...
Definition SnapEngine.h:107
void onWindowUnfloated(const QString &windowId) override
void windowFloatingClearedForSnap(const QString &windowId, const QString &screenId)
Floating state cleared as part of a commit. WTA relays as windowFloatingChanged(id,...
void resnapFromAutotileOrder(const QStringList &autotileWindowOrder, const QString &screenId)
Resnap windows using autotile window order as assignment source.
PhosphorEngine::IPlacementState * stateForScreen(const QString &screenId) override
Per-screen state object for the given screen.
void handoffReceive(const HandoffContext &ctx) override
Receive ownership of a window from another engine.
void snapAllWindows(const QString &screenId)
Request the KWin effect to collect and snap all unsnapped windows.
void moveFocusedToPosition(int zoneNumber, const PhosphorEngine::NavigationContext &ctx) override
Move the focused window to the layout zone with zoneNumber (1-based) on ctx.screenId.
QVector< PhosphorEngine::ZoneAssignmentEntry > calculateResnapFromPreviousLayout()
void clearSavedFloatingForWindows(const QStringList &windowIds) override
Remove saved floating state for the given windows (per-window, not bulk clear).
Definition SnapEngine.h:407
void handoffRelease(const QString &windowId) override
Release ownership of a window WITHOUT modifying its geometry.
void moveFocusedInDirection(const QString &direction, const PhosphorEngine::NavigationContext &ctx) override
Move the focused window into the adjacent zone in direction (displacing or filling the target).
int currentVirtualDesktop() const
Current virtual desktop (1-based; 0 when no virtual-desktop manager is wired) and activity,...
bool isEnabled() const noexcept override
True when snapping is globally enabled.
QString engineId() const override
Stable engine identity for HandoffContext.fromEngineId.
Definition SnapEngine.h:129
QVector< PhosphorEngine::ZoneAssignmentEntry > calculateResnapFromAutotileOrder(const QStringList &autotileWindowOrder, const QString &screenId) const
PhosphorEngine::UnfloatResult resolveUnfloatGeometry(const QString &windowId, const QString &fallbackScreen) const
void applyGeometriesBatch(const PhosphorProtocol::WindowGeometryList &geometries, const QString &action)
Batch of window-geometry updates, applied by the KWin effect in a single operation (rotate,...
void resnapToNewLayoutRequested(const QString &resnapData)
Batched resnap data (routed through WTA::handleBatchedResnap for bookkeeping)
void pushFocusedToEmptyZone(const PhosphorEngine::NavigationContext &ctx)
Move the focused window to the first empty zone on ctx.screenId.
void commitMultiZoneSnap(const QString &windowId, const QStringList &zoneIds, const QString &screenId, PhosphorEngine::SnapIntent intent=PhosphorEngine::SnapIntent::UserInitiated)
void onWindowClaimed(const QString &windowId) override
QVector< PhosphorEngine::ZoneAssignmentEntry > calculateSnapAllWindowEntries(const QStringList &windowIds, const QString &screenId) const
void windowClosed(const QString &windowId) override
A window was closed.
void onWindowReleased(const QString &windowId) override
void snapAllWindows(const PhosphorEngine::NavigationContext &ctx) override
Snap every unmanaged window on the screen.
QVector< PhosphorEngine::ZoneAssignmentEntry > calculateResnapEntriesFromAutotileOrder(const QStringList &autotileWindowOrder, const QString &screenId)
Calculate resnap entries from autotile order WITHOUT emitting signal.
void rotateWindows(bool clockwise, const PhosphorEngine::NavigationContext &ctx) override
Rotate snapped windows through the layout's zone order, dispatched via IPlacementEngine.
QVector< PhosphorEngine::ZoneAssignmentEntry > calculateResnapFromCurrentAssignments(const QString &screenFilter=QString()) const
bool restoreSavedModeFloat(const QString &windowId) override
Definition SnapEngine.h:403
const PhosphorEngine::IPlacementState * stateForScreen(const QString &screenId) const override
void applyGeometryRequested(const QString &windowId, int x, int y, int width, int height, const QString &zoneId, const QString &screenId, bool sizeOnly)
Daemon-driven geometry application (used by autotile float restore)
QString lastActiveScreenId() const
Last screen the engine saw via windowFocused.
Definition SnapEngine.h:482
void resnapToNewLayout()
Resnap windows from previous layout to current layout after layout switch.
bool isWindowTracked(const QString &windowId) const override
Whether this engine considers the window owned (snapped, snap-floated, or otherwise carried in SnapSt...
void windowFocused(const QString &windowId, const QString &screenId) override
A window gained focus (called when the compositor reports activation).
PhosphorProtocol::SnapAllResultList calculateSnapAllWindows(const QStringList &windowIds, const QString &screenId)
Calculate snap-all-windows assignments without applying them.
void cycleFocus(bool forward, const PhosphorEngine::NavigationContext &ctx) override
Cycle keyboard focus forward/backward through managed windows in the active zone (or the layout cycle...
void uncommitSnap(const QString &windowId)
PhosphorEngine::SnapResult resolveWindowRestore(const QString &windowId, const QString &screenId, bool sticky, PhosphorEngine::WindowKind kind=PhosphorEngine::WindowKind::Unknown)
Resolve auto-snap for a newly opened window.
void toggleWindowFloat(const QString &windowId, const QString &screenId) override
Toggle between managed and floating.
void setAutotileEngine(PhosphorEngine::IPlacementEngine *engine)
Set the autotile engine for screen ownership checks.
PhosphorProtocol::WindowGeometryList applyBatchAssignments(const QVector< PhosphorEngine::ZoneAssignmentEntry > &entries, PhosphorEngine::SnapIntent intent=PhosphorEngine::SnapIntent::UserInitiated, std::function< QString()> fallbackScreenResolver={})
void setNavigationStateProvider(INavigationStateProvider *provider)
Wire the typed navigation-state provider.
void setZoneAdjacencyResolver(IZoneAdjacencyResolver *resolver)
Set typed zone-adjacency resolver for directional navigation.
void clearSavedModeFloating() override
Definition SnapEngine.h:417
void swapFocusedInDirection(const QString &direction, const PhosphorEngine::NavigationContext &ctx) override
Swap the focused window with whatever's in the adjacent zone in direction.
void resnapCurrentAssignments(const QString &screenFilter=QString())
Resnap windows to their current zone assignments (re-apply geometries)
bool restoreSnapFloating(const QString &windowId)
void commitSnap(const QString &windowId, const QString &zoneId, const QString &screenId, PhosphorEngine::SnapIntent intent=PhosphorEngine::SnapIntent::UserInitiated)
SnapEngine(PhosphorZones::LayoutRegistry *layoutManager, PhosphorEngine::IWindowTrackingService *windowTracker, PhosphorZones::IZoneDetector *zoneDetector, PhosphorEngine::IVirtualDesktopManager *vdm, QObject *parent=nullptr)
Pure snap-mode navigation target resolver.
Definition snapnavigationtargets.h:54
Per-screen snap placement state.
Definition SnapState.h:32
Abstract interface for zone detection + highlight lifecycle.
Definition IZoneDetector.h:84
Manual zone-layout registry + per-context assignment store.
Definition LayoutRegistry.h:48
SnapIntent
Definition EngineTypes.h:32
WindowKind
Coarse structural classification for the snap-restore consume gate.
Definition EngineTypes.h:39
constexpr QLatin1String LayoutRegistry("org.plasmazones.LayoutRegistry")
QList< SnapAllResultEntry > SnapAllResultList
Definition NavigationTypes.h:38
QList< WindowGeometryEntry > WindowGeometryList
Definition WindowTypes.h:51
Definition WindowTrackingService.h:37
Definition IWindowTrackingService.h:22
Context for a cross-engine window handoff.
Definition IPlacementEngine.h:310
Target window + screen for a navigation or lifecycle operation.
Definition NavigationContext.h:18
Definition EngineTypes.h:66
Definition EngineTypes.h:85
Per-side edge gap values (resolved, non-negative pixel values)
Definition EdgeGaps.h:27
D-Bus struct for window state: (sssbsasb)
Definition WindowTypes.h:77