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  AlgorithmInfoEntry
 D-Bus struct for algorithm metadata: (sssbbbbdibsbbb) More...
 
struct  BridgeRegistrationResult
 D-Bus struct for bridge registration result: (sss) More...
 
struct  CycleTargetResult
 D-Bus struct for cycle navigation result: (bssss) More...
 
struct  DragOutcome
 Drag outcome — daemon-authoritative decision about what to apply at drag end. More...
 
struct  DragPolicy
 Drag policy — daemon-authoritative decision about how a drag should be handled. More...
 
struct  EmptyZoneEntry
 D-Bus struct for empty zone info: (siiiiiibsssdd) More...
 
struct  FocusTargetResult
 D-Bus struct for focus navigation result: (bsssss) More...
 
struct  MoveTargetResult
 D-Bus struct for move/push/zone-number navigation result: (bssiiiiss) More...
 
struct  NamedZoneGeometry
 D-Bus struct for named zone geometry: (siiii) More...
 
struct  PreTileGeometryEntry
 D-Bus struct for pre-tile geometry entries: (siiiis) Replaces the JSON blob previously returned by getPreTileGeometriesJson. More...
 
struct  RestoreTargetResult
 D-Bus struct for restore navigation result: (bbiiii) 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  SnapAssistCandidate
 D-Bus struct for snap assist candidate: (ssss) More...
 
struct  SnapConfirmationEntry
 D-Bus struct for batch snap confirmation: (sssb) More...
 
struct  SwapTargetResult
 D-Bus struct for swap navigation result: (bssiiiissiiiisssss) More...
 
struct  TileRequestEntry
 D-Bus struct for the shared tiling-family tile requests (autotile + scrolling ride the same windowsTileRequested pipeline): (siiiissbbbssiiibsb) More...
 
struct  UnfloatRestoreResult
 D-Bus struct for unfloat restore result: (bassiiii). More...
 
struct  WindowGeometryEntry
 D-Bus struct for batch geometry entries: (siiiis) More...
 
struct  WindowOpenedEntry
 D-Bus struct for batch window-opened notification: (ssii) More...
 
struct  WindowStateEntry
 D-Bus struct for window state: (sssbsasb) More...
 
struct  ZoneGeometryRect
 D-Bus struct for zone geometry: (iiii) 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 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...
 

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)
 
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< WindowTypewindowTypeFromString (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.
 
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)
 

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

◆ 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

◆ 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()

constexpr 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.

◆ 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.plasmazones service / /PlasmaZones 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()

constexpr bool PhosphorProtocol::isValidScrollAxis ( int  value)
inlineconstexpr

True if value is a valid ScrollAxis underlying value.

◆ isValidWindowType()

constexpr bool PhosphorProtocol::isValidWindowType ( int  value)
inlineconstexpr

True if value is a valid WindowType underlying value.

◆ lcPhosphorProtocol()

PHOSPHORPROTOCOL_EXPORT const QLoggingCategory & PhosphorProtocol::lcPhosphorProtocol ( )

◆ operator<<() [1/22]

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

◆ operator<<() [2/22]

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

◆ operator<<() [3/22]

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

◆ operator<<() [4/22]

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

◆ operator<<() [5/22]

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

◆ operator<<() [6/22]

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

◆ operator<<() [7/22]

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

◆ operator<<() [8/22]

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

◆ operator<<() [9/22]

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

◆ operator<<() [10/22]

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

◆ operator<<() [11/22]

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

◆ operator<<() [12/22]

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

◆ operator<<() [13/22]

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

◆ operator<<() [14/22]

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

◆ operator<<() [15/22]

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

◆ operator<<() [16/22]

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

◆ operator<<() [17/22]

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

◆ operator<<() [18/22]

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

◆ operator<<() [19/22]

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

◆ operator<<() [20/22]

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

◆ operator<<() [21/22]

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

◆ operator<<() [22/22]

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

QDebug streaming for logging.

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

◆ operator>>() [1/21]

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

◆ operator>>() [2/21]

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

◆ operator>>() [3/21]

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

◆ operator>>() [4/21]

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

◆ operator>>() [5/21]

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

◆ operator>>() [6/21]

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

◆ operator>>() [7/21]

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

◆ operator>>() [8/21]

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

◆ operator>>() [9/21]

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

◆ operator>>() [10/21]

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

◆ operator>>() [11/21]

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

◆ operator>>() [12/21]

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

◆ operator>>() [13/21]

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

◆ operator>>() [14/21]

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

◆ operator>>() [15/21]

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

◆ operator>>() [16/21]

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

◆ operator>>() [17/21]

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

◆ operator>>() [18/21]

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

◆ operator>>() [19/21]

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

◆ operator>>() [20/21]

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

◆ operator>>() [21/21]

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()

constexpr 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()

constexpr 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

constexpr 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).

◆ scrollAxisMaxValue

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

◆ scrollAxisMinValue

constexpr 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

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

◆ windowTypeMinValue

constexpr 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.