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

D-Bus marshalling for the shared tiling-family value types (see AutotileTypes.h; the file names predate the autotile-to-tiling generalization and are load-bearing across the build, so only the docs moved with the split). More...

Namespaces

namespace  ClientHelpers
 Daemon-bound convenience wrappers around PhosphorDBus::Client.
namespace  Service

Classes

struct  TileRequestEntry
 D-Bus struct for the shared tiling-family tile requests (autotile + scrolling ride the same windowsTileRequested pipeline): (siiiissbbbbssiiibsb). More...
struct  AlgorithmInfoEntry
 D-Bus struct for algorithm metadata: (sssbbbbdibsbbb). More...
struct  PreTileGeometryEntry
 D-Bus struct for pre-tile geometry entries: (siiiiss) Replaces the JSON blob previously returned by getPreTileGeometriesJson. More...
struct  BridgeRegistrationResult
 D-Bus struct for bridge registration result: (sss). More...
struct  DragPolicy
 Drag policy — daemon-authoritative decision about how a drag should be handled. More...
struct  DragOutcome
 Drag outcome — daemon-authoritative decision about what to apply at drag end. More...
struct  SnapAllResultEntry
 D-Bus struct for snap-all result entries: (sssiiii) Carries targetZoneId so the plugin can confirm snaps without a second JSON parse. More...
struct  MoveTargetResult
 D-Bus struct for move/push/zone-number navigation result: (bssiiiiss). More...
struct  FocusTargetResult
 D-Bus struct for focus navigation result: (bsssss). More...
struct  CycleTargetResult
 D-Bus struct for cycle navigation result: (bssss). More...
struct  SwapTargetResult
 D-Bus struct for swap navigation result: (bssiiiissiiiisssss). More...
struct  RestoreTargetResult
 D-Bus struct for restore navigation result: (bbiiii). More...
struct  WindowGeometryEntry
 D-Bus struct for batch geometry entries: (siiiis). More...
struct  SnapConfirmationEntry
 D-Bus struct for batch snap confirmation: (sssb). More...
struct  WindowOpenedEntry
 D-Bus struct for batch window-opened notification: (ssii). More...
struct  WindowStateEntry
 D-Bus struct for window state: (sssbsasb). More...
struct  UnfloatRestoreResult
 D-Bus struct for unfloat restore result: (bassiiii). More...
struct  OutputSettleRow
 One window in the effect's output-settle report, sent when a screen change settles that added or removed an output or deferred a crossing: (ssssbiiiiiiiiiiibbbbssiiibiiii). More...
struct  OutputSettleVerdict
 The daemon's answer for one OutputSettleRow: (sis). More...
struct  ZoneGeometryRect
 D-Bus struct for zone geometry: (iiii). More...
struct  EmptyZoneEntry
 D-Bus struct for empty zone info: (siiiiiibsssdd). More...
struct  SnapAssistCandidate
 D-Bus struct for snap assist candidate: (ssss). More...
struct  NamedZoneGeometry
 D-Bus struct for named zone geometry: (siiii). More...

Typedefs

using TileRequestList = QList<TileRequestEntry>
using AlgorithmInfoList = QList<AlgorithmInfoEntry>
using PreTileGeometryList = QList<PreTileGeometryEntry>
using SnapAllResultList = QList<SnapAllResultEntry>
using WindowGeometryList = QList<WindowGeometryEntry>
using SnapConfirmationList = QList<SnapConfirmationEntry>
using WindowOpenedList = QList<WindowOpenedEntry>
using WindowStateList = QList<WindowStateEntry>
using OutputSettleRowList = QList<OutputSettleRow>
using OutputSettleVerdictList = QList<OutputSettleVerdict>
using ZoneGeometryList = QList<ZoneGeometryRect>
using EmptyZoneList = QList<EmptyZoneEntry>
using SnapAssistCandidateList = QList<SnapAssistCandidate>
using NamedZoneGeometryList = QList<NamedZoneGeometry>

Enumerations

enum class  DragBypassReason : int {
  None = 0 , EngineOwnedScreen = 1 , SnappingDisabled = 2 , ContextDisabled = 3 ,
  LayoutSuppressed = 4
}
 Why a drag was bypassed from the canonical snap pipeline. More...
enum class  ScrollAxis : int { Horizontal = 0 , Vertical = 1 }
 Which way a scrolling strip runs on one screen. More...
enum class  WindowType : int {
  Unknown = 0 , Normal = 1 , Dialog = 2 , Utility = 3 ,
  Toolbar = 4 , Splash = 5 , Menu = 6 , Tooltip = 7 ,
  Notification = 8 , Dock = 9 , Desktop = 10 , OnScreenDisplay = 11 ,
  Popup = 12 , AppletPopup = 13
}
 Window-type vocabulary shared by the compositor effect, the daemon's WindowRegistry, and (from the window-rule refactor onward) the window-rule match engine. More...
enum class  PlacementPurpose : int { UserVerb = 0 , Restatement = 1 }
 Why the daemon asks the compositor to place a window, carried by WindowTracking.applyGeometryRequested. More...
enum class  ScreenDesktopSwitchPurpose : int { UserSwitch = 0 , Correction = 1 }
 Why the daemon asks the compositor to switch one output's virtual desktop, carried by WindowTracking.setScreenDesktopRequested. More...

Functions

PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const TileRequestEntry &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, TileRequestEntry &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const AlgorithmInfoEntry &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, AlgorithmInfoEntry &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const PreTileGeometryEntry &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, PreTileGeometryEntry &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const BridgeRegistrationResult &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, BridgeRegistrationResult &e)
PHOSPHORPROTOCOL_EXPORT const QLoggingCategory & lcPhosphorProtocol ()
PhosphorDBus::Client daemonClient ()
 A PhosphorDBus::Client bound to the Phosphor daemon.
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const DragPolicy &p)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, DragPolicy &p)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const DragOutcome &o)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, DragOutcome &o)
PHOSPHORPROTOCOLTYPES_EXPORT QString toWireString (DragBypassReason r)
 Convert to the legacy wire-format string. Returns an empty QString for None.
PHOSPHORPROTOCOLTYPES_EXPORT DragBypassReason bypassReasonFromWireString (const QString &s)
 Parse from the legacy wire-format string. Unknown values map to None.
PHOSPHORPROTOCOLTYPES_EXPORT QDebug operator<< (QDebug debug, DragBypassReason r)
 QDebug streaming for logging.
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const SnapAllResultEntry &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, SnapAllResultEntry &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const MoveTargetResult &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, MoveTargetResult &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const FocusTargetResult &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, FocusTargetResult &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const CycleTargetResult &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, CycleTargetResult &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const SwapTargetResult &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, SwapTargetResult &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const RestoreTargetResult &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, RestoreTargetResult &e)
PHOSPHORPROTOCOL_EXPORT void registerWireTypes ()
 Register every PhosphorProtocol wire type with the Qt D-Bus metatype system.
constexpr bool isValidScrollAxis (int value)
 True if value is a valid ScrollAxis underlying value.
constexpr ScrollAxis scrollAxisFromInt (int value)
 Cast an int that crossed a process boundary to a ScrollAxis; out-of-range values (version skew, a malformed caller) fall back to Horizontal, which is the same answer an absent value gives.
constexpr ScrollAxis autoScrollAxisFor (int workAreaWidth, int workAreaHeight)
 The Auto rule, resolving a work area's dimensions to a strip axis: a work area taller than it is wide runs the strip vertically.
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const WindowGeometryEntry &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, WindowGeometryEntry &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const SnapConfirmationEntry &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, SnapConfirmationEntry &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const WindowOpenedEntry &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, WindowOpenedEntry &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const WindowStateEntry &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, WindowStateEntry &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const UnfloatRestoreResult &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, UnfloatRestoreResult &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const OutputSettleRow &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, OutputSettleRow &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const OutputSettleVerdict &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, OutputSettleVerdict &e)
constexpr bool isValidWindowType (int value)
 True if value is a valid WindowType underlying value.
constexpr WindowType windowTypeFromInt (int value)
 Cast an int that crossed D-Bus to a WindowType; out-of-range values (version skew, a malformed caller) fall back to WindowType::Unknown.
QString windowTypeToString (WindowType type)
 Canonical lowercase wire string for a WindowType.
std::optional< WindowType > windowTypeFromString (QStringView s)
 Strict parse: an unknown token returns nullopt so callers can drop the input rather than silently coercing typos / future values to a default.
PlacementPurpose clampPlacementPurposeFromWire (int wire)
 Clamp an integer wire value to a PlacementPurpose.
ScreenDesktopSwitchPurpose clampScreenDesktopSwitchPurposeFromWire (int wire)
 Clamp an integer wire value to a ScreenDesktopSwitchPurpose.
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const ZoneGeometryRect &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, ZoneGeometryRect &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const EmptyZoneEntry &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, EmptyZoneEntry &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const SnapAssistCandidate &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, SnapAssistCandidate &e)
PHOSPHORPROTOCOL_EXPORT QDBusArgument & operator<< (QDBusArgument &arg, const NamedZoneGeometry &e)
PHOSPHORPROTOCOL_EXPORT const QDBusArgument & operator>> (const QDBusArgument &arg, NamedZoneGeometry &e)

Variables

constexpr int DragBypassReasonCount = 5
 Number of DragBypassReason values.
constexpr int scrollAxisMinValue = static_cast<int>(ScrollAxis::Horizontal)
 Inclusive bounds of the valid ScrollAxis underlying values — used to range-check an int that crossed a process boundary before casting it back.
constexpr int scrollAxisMaxValue = static_cast<int>(ScrollAxis::Vertical)
constexpr int windowTypeMinValue = static_cast<int>(WindowType::Unknown)
 Inclusive bounds of the valid WindowType underlying values — used to range-check an int that crossed D-Bus before casting it back.
constexpr int windowTypeMaxValue = static_cast<int>(WindowType::AppletPopup)
constexpr int MaxWireExtent = 100000
 Magnitude ceilings shared by every geometry-bearing wire struct.
constexpr int MaxWireOrigin = 1000000

Detailed Description

D-Bus marshalling for the shared tiling-family value types (see AutotileTypes.h; the file names predate the autotile-to-tiling generalization and are load-bearing across the build, so only the docs moved with the split).

D-Bus marshalling for the zone / overlay value types (see ZoneTypes.h).

D-Bus marshalling for the window-tracking value types (see WindowTypes.h).

D-Bus marshalling for the snap-navigation value types (see NavigationTypes.h).

D-Bus marshalling for the window-drag value types (see DragTypes.h).

D-Bus marshalling for the compositor-bridge value types (see BridgeTypes.h).

Pulls in ZoneMarshalling.h because the DragOutcome marshaller streams a nested EmptyZoneList.

Typedef Documentation

◆ AlgorithmInfoList

◆ EmptyZoneList

◆ NamedZoneGeometryList

◆ OutputSettleRowList

◆ OutputSettleVerdictList

◆ PreTileGeometryList

◆ SnapAllResultList

◆ SnapAssistCandidateList

◆ SnapConfirmationList

◆ TileRequestList

◆ WindowGeometryList

◆ WindowOpenedList

◆ WindowStateList

◆ ZoneGeometryList

Enumeration Type Documentation

◆ DragBypassReason

enum class PhosphorProtocol::DragBypassReason : int
strong

Why a drag was bypassed from the canonical snap pipeline.

The daemon's computeDragPolicy picks exactly one of these based on the drag's context, and both sides route behavior off the value. Replaces the free-form QString bypassReason that carried "" / "autotile_screen" / "snapping_disabled" / "context_disabled" as magic strings.

Wire format: serialized as a legacy string via toWireString()/ fromWireString() inside the DragPolicy marshaller, so no ApiVersion bump is required. Unknown wire values parse to None. NOTE what that costs when a NEW enumerator is added (the effect .so is not reloaded until logout, so daemon-new/effect-old skew persists for a whole session after an upgrade): the old effect decodes the new reason as None with every behaviour bool false — a combination the canonical snap path never produced. That degrades safely today because the effect gates its work on the bools and on explicit AutotileScreen comparisons, never on "None means snap path" — preserve that property when touching the effect's policy handling.

Enumerator
None 

canonical snap path — drag flows through the snap pipeline

EngineOwnedScreen 

drag started/ended on a screen owned by a tiling-family engine (autotile or scrolling), which owns placement there.

The "autotile_screen" wire string predates the scrolling engine and is kept verbatim for wire stability, so the token names only one of the two engines this value covers.

SnappingDisabled 

snap mode off globally — dead drag

ContextDisabled 

monitor/desktop/activity excluded in settings — dead drag

LayoutSuppressed 

screen has no zone layout (default assignment suppressed) — dead drag

◆ PlacementPurpose

enum class PhosphorProtocol::PlacementPurpose : int
strong

Why the daemon asks the compositor to place a window, carried by WindowTracking.applyGeometryRequested.

A UserVerb places the window a user action is about (a snap key, a drop, Meta+F, a routed open): its maximize and fullscreen end. A Restatement re-states a placement the window already has (a zone re-applied, a swap partner, a minimize return, a remembered float spot): a maximized or fullscreen window keeps that state.

Enumerator
UserVerb 
Restatement 

◆ ScreenDesktopSwitchPurpose

Why the daemon asks the compositor to switch one output's virtual desktop, carried by WindowTracking.setScreenDesktopRequested.

A UserSwitch is a workspace focus verb the user pressed, so the compositor shows it like any switch the user makes. A Correction is a switch the daemon makes on its own (the owner-wins return of a screen to its own workspaces), which the compositor carries out without the desktop-switch transition.

Enumerator
UserSwitch 
Correction 

◆ ScrollAxis

enum class PhosphorProtocol::ScrollAxis : int
strong

Which way a scrolling strip runs on one screen.

MAIN axis = the strip: columns lie along it and the view scrolls along it. CROSS axis = the stack: the tiles of a column divide it. Horizontal is the historical layout, main = x and cross = y.

Wire/config encoding is the underlying int; append only. Horizontal MUST stay 0, and that is load-bearing in more than one place at once: a value-initialized wire struct, an absent JSON key read through toInt(0), and a screen absent from the effect's vertical-axis list all have to mean "as it behaved before vertical strips existed".

This is the RESOLVED vocabulary, deliberately two-valued. The SETTING is a separate three-valued config enum (Auto / Horizontal / Vertical) whose numbering does not match this one, so that Auto can be its zero. Never static_cast between the two — same trap, and same handling, as DefaultWidthKind vs ColumnWidth::Kind (PhosphorScrollEngine/ScrollTypes.h).

Deliberately free of QtDBus / Q_DECLARE_METATYPE, and of every Qt include, so the GPL KWin effect can include it on the paint path without pulling in marshalling machinery (same reasoning as WindowTypeEnum.h).

Enumerator
Horizontal 
Vertical 

◆ WindowType

enum class PhosphorProtocol::WindowType : int
strong

Window-type vocabulary shared by the compositor effect, the daemon's WindowRegistry, and (from the window-rule refactor onward) the window-rule match engine.

The compositor maps KWin's overlapping window-type predicates onto exactly one of these — most-specific-first — then the value crosses D-Bus as its underlying int and the daemon stores it.

Deliberately free of QtDBus / Q_DECLARE_METATYPE so the GPL KWin effect can include this header without pulling in marshalling machinery.

Enumerator
Unknown 

type could not be determined

Normal 

ordinary application toplevel

Dialog 
Utility 
Toolbar 
Splash 
Menu 

menu / popup menu / dropdown menu

Tooltip 
Notification 
Dock 

panels

Desktop 
OnScreenDisplay 
Popup 

generic override-redirect popup

AppletPopup 

A Plasma applet's popup: Kickoff, the system-tray flyouts, any widget's expanded view.

NET::AppletPopup, a Plasma-specific type that matches none of KWin's generic isMenu()/isPopupWindow()/isDialog() predicates — so before this value existed every one of those surfaces resolved as Unknown and could not be named by a rule at all.

APPENDED, never inserted: these underlying ints are the D-Bus wire representation. A peer built before this value range-checks 13 through windowTypeFromInt and gets Unknown, which is exactly what it resolved for these surfaces anyway — so the addition is backward-compatible in both directions. Keep that property: append new types, never renumber.

Function Documentation

◆ autoScrollAxisFor()

ScrollAxis PhosphorProtocol::autoScrollAxisFor ( int workAreaWidth,
int workAreaHeight )
inlineconstexpr

The Auto rule, resolving a work area's dimensions to a strip axis: a work area taller than it is wide runs the strip vertically.

Strictly greater on height, with no threshold knob. An aspect-ratio threshold is a setting nobody can reason about, where "taller than wide" is a rule you can state in one sentence. A square work area resolves HORIZONTAL, and so does a degenerate one, which is both the historical behaviour and the only safe answer when the geometry says nothing.

Lives here, on ints rather than a QRect, because more than one process has to answer the SAME question: the daemon's engine resolves it per layout pass, and the editor resolves it to draw a template preview for a screen it is not laying out. Two copies of a one-line rule is exactly how the two answers drift apart.

◆ bypassReasonFromWireString()

PHOSPHORPROTOCOLTYPES_EXPORT DragBypassReason PhosphorProtocol::bypassReasonFromWireString ( const QString & s)

Parse from the legacy wire-format string. Unknown values map to None.

◆ clampPlacementPurposeFromWire()

PlacementPurpose PhosphorProtocol::clampPlacementPurposeFromWire ( int wire)
inline

Clamp an integer wire value to a PlacementPurpose.

An unknown value is a UserVerb, the arm every placement took before the purpose existed.

◆ clampScreenDesktopSwitchPurposeFromWire()

ScreenDesktopSwitchPurpose PhosphorProtocol::clampScreenDesktopSwitchPurposeFromWire ( int wire)
inline

Clamp an integer wire value to a ScreenDesktopSwitchPurpose.

An unknown value is a UserSwitch, so a malformed request is never silently hidden.

◆ daemonClient()

PhosphorDBus::Client PhosphorProtocol::daemonClient ( )
inline

A PhosphorDBus::Client bound to the Phosphor daemon.

Returned by value — Client is a cheap handle, so this is not a singleton and holds no shared global state. It binds the canonical org.phosphor_works.Placement service / /org/phosphor_works/Placement object on the session bus, with call failures logged under lcPhosphorProtocol().

Generic, service-agnostic D-Bus plumbing lives in PhosphorDBus; this is the thin Phosphor-specific binding on top.

◆ isValidScrollAxis()

bool PhosphorProtocol::isValidScrollAxis ( int value)
inlineconstexpr

True if value is a valid ScrollAxis underlying value.

◆ isValidWindowType()

bool PhosphorProtocol::isValidWindowType ( int value)
inlineconstexpr

True if value is a valid WindowType underlying value.

◆ lcPhosphorProtocol()

PHOSPHORPROTOCOL_EXPORT const QLoggingCategory & PhosphorProtocol::lcPhosphorProtocol ( )

◆ operator<<() [1/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const AlgorithmInfoEntry & e )

◆ operator<<() [2/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const BridgeRegistrationResult & e )

◆ operator<<() [3/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const CycleTargetResult & e )

◆ operator<<() [4/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const DragOutcome & o )

◆ operator<<() [5/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const DragPolicy & p )

◆ operator<<() [6/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const EmptyZoneEntry & e )

◆ operator<<() [7/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const FocusTargetResult & e )

◆ operator<<() [8/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const MoveTargetResult & e )

◆ operator<<() [9/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const NamedZoneGeometry & e )

◆ operator<<() [10/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const OutputSettleRow & e )

◆ operator<<() [11/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const OutputSettleVerdict & e )

◆ operator<<() [12/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const PreTileGeometryEntry & e )

◆ operator<<() [13/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const RestoreTargetResult & e )

◆ operator<<() [14/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const SnapAllResultEntry & e )

◆ operator<<() [15/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const SnapAssistCandidate & e )

◆ operator<<() [16/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const SnapConfirmationEntry & e )

◆ operator<<() [17/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const SwapTargetResult & e )

◆ operator<<() [18/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const TileRequestEntry & e )

◆ operator<<() [19/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const UnfloatRestoreResult & e )

◆ operator<<() [20/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const WindowGeometryEntry & e )

◆ operator<<() [21/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const WindowOpenedEntry & e )

◆ operator<<() [22/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const WindowStateEntry & e )

◆ operator<<() [23/24]

PHOSPHORPROTOCOL_EXPORT QDBusArgument & PhosphorProtocol::operator<< ( QDBusArgument & arg,
const ZoneGeometryRect & e )

◆ operator<<() [24/24]

PHOSPHORPROTOCOLTYPES_EXPORT QDebug PhosphorProtocol::operator<< ( QDebug debug,
DragBypassReason r )

QDebug streaming for logging.

Prints the qualified enum name (e.g. "DragBypassReason::EngineOwnedScreen").

◆ operator>>() [1/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
AlgorithmInfoEntry & e )

◆ operator>>() [2/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
BridgeRegistrationResult & e )

◆ operator>>() [3/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
CycleTargetResult & e )

◆ operator>>() [4/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
DragOutcome & o )

◆ operator>>() [5/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
DragPolicy & p )

◆ operator>>() [6/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
EmptyZoneEntry & e )

◆ operator>>() [7/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
FocusTargetResult & e )

◆ operator>>() [8/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
MoveTargetResult & e )

◆ operator>>() [9/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
NamedZoneGeometry & e )

◆ operator>>() [10/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
OutputSettleRow & e )

◆ operator>>() [11/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
OutputSettleVerdict & e )

◆ operator>>() [12/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
PreTileGeometryEntry & e )

◆ operator>>() [13/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
RestoreTargetResult & e )

◆ operator>>() [14/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
SnapAllResultEntry & e )

◆ operator>>() [15/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
SnapAssistCandidate & e )

◆ operator>>() [16/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
SnapConfirmationEntry & e )

◆ operator>>() [17/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
SwapTargetResult & e )

◆ operator>>() [18/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
TileRequestEntry & e )

◆ operator>>() [19/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
UnfloatRestoreResult & e )

◆ operator>>() [20/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
WindowGeometryEntry & e )

◆ operator>>() [21/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
WindowOpenedEntry & e )

◆ operator>>() [22/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
WindowStateEntry & e )

◆ operator>>() [23/23]

PHOSPHORPROTOCOL_EXPORT const QDBusArgument & PhosphorProtocol::operator>> ( const QDBusArgument & arg,
ZoneGeometryRect & e )

◆ registerWireTypes()

PHOSPHORPROTOCOL_EXPORT void PhosphorProtocol::registerWireTypes ( )

Register every PhosphorProtocol wire type with the Qt D-Bus metatype system.

Call once at startup (daemon and compositor plugin) before any adaptor is registered on the bus.

◆ scrollAxisFromInt()

ScrollAxis PhosphorProtocol::scrollAxisFromInt ( int value)
inlineconstexpr

Cast an int that crossed a process boundary to a ScrollAxis; out-of-range values (version skew, a malformed caller) fall back to Horizontal, which is the same answer an absent value gives.

◆ toWireString()

PHOSPHORPROTOCOLTYPES_EXPORT QString PhosphorProtocol::toWireString ( DragBypassReason r)

Convert to the legacy wire-format string. Returns an empty QString for None.

◆ windowTypeFromInt()

WindowType PhosphorProtocol::windowTypeFromInt ( int value)
inlineconstexpr

Cast an int that crossed D-Bus to a WindowType; out-of-range values (version skew, a malformed caller) fall back to WindowType::Unknown.

◆ windowTypeFromString()

std::optional< WindowType > PhosphorProtocol::windowTypeFromString ( QStringView s)
inline

Strict parse: an unknown token returns nullopt so callers can drop the input rather than silently coercing typos / future values to a default.

◆ windowTypeToString()

QString PhosphorProtocol::windowTypeToString ( WindowType type)
inline

Canonical lowercase wire string for a WindowType.

Variable Documentation

◆ DragBypassReasonCount

int PhosphorProtocol::DragBypassReasonCount = 5
inlineconstexpr

Number of DragBypassReason values.

Bump alongside a new enumerator — the wire round-trip tests assert their coverage against this so a new value cannot ship untested (no trailing Count sentinel, which would pollute -Wswitch exhaustiveness in every switch over the enum).

◆ MaxWireExtent

int PhosphorProtocol::MaxWireExtent = 100000
inlineconstexpr

Magnitude ceilings shared by every geometry-bearing wire struct.

A consumer builds a QRect from these, and QRect's x/y/w/h constructor computes x + w - 1 — signed overflow, and undefined, BEFORE any isValid() or width <= 0 guard the consumer writes can run. Those guards are therefore not a defence, and the bound has to be applied here.

Deliberately generous, and deliberately NOT a screen-bounds check: the scrolling engine parks off-screen columns entirely outside their screen rect, so a legitimate park origin sits far outside every output. An over-strict validator here has already broken that once, dropping every vertical park at its own validationError. These limits are orders of magnitude past any real display and only catch garbling.

◆ MaxWireOrigin

int PhosphorProtocol::MaxWireOrigin = 1000000
inlineconstexpr

◆ scrollAxisMaxValue

int PhosphorProtocol::scrollAxisMaxValue = static_cast<int>(ScrollAxis::Vertical)
inlineconstexpr

◆ scrollAxisMinValue

int PhosphorProtocol::scrollAxisMinValue = static_cast<int>(ScrollAxis::Horizontal)
inlineconstexpr

Inclusive bounds of the valid ScrollAxis underlying values — used to range-check an int that crossed a process boundary before casting it back.

◆ windowTypeMaxValue

int PhosphorProtocol::windowTypeMaxValue = static_cast<int>(WindowType::AppletPopup)
inlineconstexpr

◆ windowTypeMinValue

int PhosphorProtocol::windowTypeMinValue = static_cast<int>(WindowType::Unknown)
inlineconstexpr

Inclusive bounds of the valid WindowType underlying values — used to range-check an int that crossed D-Bus before casting it back.

The max MUST track the last enumerator, or a freshly added type is rejected on arrival and silently degrades to Unknown.