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...
struct  SpanTargetResult
 Result of a span (grow/shrink) target computation. More...
class  SnapNavigationTargetResolver
 Pure snap-mode navigation target resolver. More...
class  SnapState
 Per-screen snap placement state. More...

Functions

PHOSPHORSNAPENGINE_EXPORT bool isStoredScreenValid (PhosphorScreens::ScreenManager *mgr, const QString &storedScreen)
 True when storedScreen still resolves on the live screen set, judged by mgr: a physical id must be a screen it tracks, and a virtual id must be in its effective screen list (which also drops a stale id 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, judged by mgr: a physical id must be a screen it tracks, and a virtual id must be in its effective screen list (which also drops a stale id after a config removal).

With no manager wired, a physical id is checked against Qt's screen list and a virtual id is never valid. 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.