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 <phosphor-snap-engine/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.
 
 INavigationStateProvider (const INavigationStateProvider &)=delete
 
INavigationStateProvideroperator= (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.

◆ 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: