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

Narrow read-only interface for compositor-layer state queries. More...

#include <PhosphorSnapEngine/INavigationStateProvider.h>

Public Member Functions

 INavigationStateProvider ()=default
virtual ~INavigationStateProvider ()
virtual QString lastCursorScreenName () const =0
 Screen that most recently contained the mouse cursor.
virtual QString lastActiveScreenName () const =0
 Screen that most recently held the active (focused) window.
virtual QString lastActiveWindowId () const =0
 Window ID that most recently received keyboard focus.
virtual QRect frameGeometry (const QString &windowId) const =0
 Live frame geometry for windowId as reported by the compositor.
virtual bool isSettledManagedFrame (const QString &windowId, const QRect &frame) const
 Whether frame is where management last left windowId: the frame it settled at while a zone or a tile held it in view, which a size-increment or size-constrained client leaves short of the rect it was given, and not one the user moved it to.
 INavigationStateProvider (const INavigationStateProvider &)=delete
INavigationStateProvider & operator= (const INavigationStateProvider &)=delete

Detailed Description

Narrow read-only interface for compositor-layer state queries.

SnapEngine's navigation entry points need three string shadows (last-active window, last-active screen, last-cursor screen) and one frame-geometry accessor that live on the daemon's WindowTrackingAdaptor. Rather than holding an opaque QObject* and calling methods by string via QMetaObject::invokeMethod, the engine now depends on this typed interface.

The daemon's WindowTrackingAdaptor must implement (or wrap) INavigationStateProvider so that setNavigationStateProvider() can accept a typed pointer. The interface is intentionally minimal — if a future navigation method needs additional adaptor state, add a virtual here rather than reaching back into a QObject*.

Not a QObject — pure data queries with no lifecycle signals.

Constructor & Destructor Documentation

◆ INavigationStateProvider() [1/2]

PhosphorSnapEngine::INavigationStateProvider::INavigationStateProvider ( )
default

◆ ~INavigationStateProvider()

virtual PhosphorSnapEngine::INavigationStateProvider::~INavigationStateProvider ( )
virtual

◆ INavigationStateProvider() [2/2]

PhosphorSnapEngine::INavigationStateProvider::INavigationStateProvider ( const INavigationStateProvider & )
delete

Member Function Documentation

◆ frameGeometry()

virtual QRect PhosphorSnapEngine::INavigationStateProvider::frameGeometry ( const QString & windowId) const
pure virtual

Live frame geometry for windowId as reported by the compositor.

Returns an invalid QRect when the window is unknown.

◆ isSettledManagedFrame()

virtual bool PhosphorSnapEngine::INavigationStateProvider::isSettledManagedFrame ( const QString & windowId,
const QRect & frame ) const
inlinevirtual

Whether frame is where management last left windowId: the frame it settled at while a zone or a tile held it in view, which a size-increment or size-constrained client leaves short of the rect it was given, and not one the user moved it to.

Appended last (installed interface). The default answers false, which leaves the membership pass's exact zone-rect compare as the only test.

◆ lastActiveScreenName()

virtual QString PhosphorSnapEngine::INavigationStateProvider::lastActiveScreenName ( ) const
pure virtual

Screen that most recently held the active (focused) window.

◆ lastActiveWindowId()

virtual QString PhosphorSnapEngine::INavigationStateProvider::lastActiveWindowId ( ) const
pure virtual

Window ID that most recently received keyboard focus.

◆ lastCursorScreenName()

virtual QString PhosphorSnapEngine::INavigationStateProvider::lastCursorScreenName ( ) const
pure virtual

Screen that most recently contained the mouse cursor.

◆ operator=()

INavigationStateProvider & PhosphorSnapEngine::INavigationStateProvider::operator= ( const INavigationStateProvider & )
delete

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