Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorSnapEngine Namespace Reference

Classes

class  INavigationStateProvider
 Narrow read-only interface for compositor-layer state queries. More...
 
class  IZoneAdjacencyResolver
 Narrow interface for zone-adjacency queries used by snap navigation. More...
 
struct  PlacementDirective
 What a matched open-placement rule directs for an opening window. More...
 
class  SnapEngine
 Engine for manual zone-based window snapping. More...
 
class  SnapNavigationTargetResolver
 Pure snap-mode navigation target resolver. More...
 
class  SnapState
 Per-screen snap placement state. More...
 
struct  SpanTargetResult
 Result of a span (grow/shrink) target computation. More...
 

Functions

PHOSPHORSNAPENGINE_EXPORT bool isStoredScreenValid (PhosphorScreens::ScreenManager *mgr, const QString &storedScreen)
 True when storedScreen still resolves on the live screen set: a physical id must be connected; a virtual id additionally needs its backing physical output present AND continued membership in mgr's effective screen list (guards against stale ids after a config removal).
 
QString oppositeCrossingDirection (const QString &direction)
 The edge a neighbour surface is entered from when crossing in direction: crossing "right" lands on the neighbour's LEFT edge, "down" on its TOP, etc.
 

Function Documentation

◆ isStoredScreenValid()

PHOSPHORSNAPENGINE_EXPORT bool PhosphorSnapEngine::isStoredScreenValid ( PhosphorScreens::ScreenManager mgr,
const QString &  storedScreen 
)

True when storedScreen still resolves on the live screen set: a physical id must be connected; a virtual id additionally needs its backing physical output present AND continued membership in mgr's effective screen list (guards against stale ids after a config removal).

Shared by the resolver's stored-screen preference and SnapEngine's resolveNavScreen so the validation rule lives in one place.

◆ oppositeCrossingDirection()

QString PhosphorSnapEngine::oppositeCrossingDirection ( const QString &  direction)
inline

The edge a neighbour surface is entered from when crossing in direction: crossing "right" lands on the neighbour's LEFT edge, "down" on its TOP, etc.

Empty for an unknown token. Shared by the resolver's cross-output entry/swap targets and SnapEngine::entryZoneForCrossing so the mapping lives in one place.