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

Narrow interface for zone-adjacency queries used by snap navigation. More...

#include <phosphor-snap-engine/include/PhosphorSnapEngine/IZoneAdjacencyResolver.h>

Public Member Functions

 IZoneAdjacencyResolver ()=default
 
virtual ~IZoneAdjacencyResolver ()
 
virtual QString getAdjacentZone (const QString &currentZoneId, const QString &direction, const QString &screenId) const =0
 Find the zone adjacent to currentZoneId in direction.
 
virtual QString getFirstZoneInDirection (const QString &direction, const QString &screenId) const =0
 Find the edge zone in direction when no current zone exists.
 
 IZoneAdjacencyResolver (const IZoneAdjacencyResolver &)=delete
 
IZoneAdjacencyResolveroperator= (const IZoneAdjacencyResolver &)=delete
 

Detailed Description

Narrow interface for zone-adjacency queries used by snap navigation.

SnapNavigationTargetResolver needs two directional zone lookups that live on the daemon's ZoneDetectionAdaptor:

  • getAdjacentZone (find the zone next to a given zone in a direction)
  • getFirstZoneInDirection (find the edge zone when no current zone exists)

Rather than holding an opaque QObject* and dispatching through QMetaObject::invokeMethod, the resolver now depends on this typed interface. The daemon's ZoneDetectionAdaptor must implement (or wrap) IZoneAdjacencyResolver so that the engine receives a typed pointer.

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

Constructor & Destructor Documentation

◆ IZoneAdjacencyResolver() [1/2]

PhosphorSnapEngine::IZoneAdjacencyResolver::IZoneAdjacencyResolver ( )
default

◆ ~IZoneAdjacencyResolver()

virtual PhosphorSnapEngine::IZoneAdjacencyResolver::~IZoneAdjacencyResolver ( )
virtual

◆ IZoneAdjacencyResolver() [2/2]

PhosphorSnapEngine::IZoneAdjacencyResolver::IZoneAdjacencyResolver ( const IZoneAdjacencyResolver )
delete

Member Function Documentation

◆ getAdjacentZone()

virtual QString PhosphorSnapEngine::IZoneAdjacencyResolver::getAdjacentZone ( const QString &  currentZoneId,
const QString &  direction,
const QString &  screenId 
) const
pure virtual

Find the zone adjacent to currentZoneId in direction.

Parameters
currentZoneIdZone the window is currently snapped to
direction"left", "right", "up", or "down"
screenIdScreen context for multi-monitor layouts
Returns
Zone ID of the adjacent zone, or empty string if none exists

◆ getFirstZoneInDirection()

virtual QString PhosphorSnapEngine::IZoneAdjacencyResolver::getFirstZoneInDirection ( const QString &  direction,
const QString &  screenId 
) const
pure virtual

Find the edge zone in direction when no current zone exists.

Used when a window is not yet snapped and the user presses a navigation key. Returns the zone at the layout edge in the given direction (e.g. leftmost zone for "left").

Parameters
direction"left", "right", "up", or "down"
screenIdScreen context for multi-monitor layouts
Returns
Zone ID of the edge zone, or empty string if none exists

◆ operator=()

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

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