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

Namespaces

namespace  Interface
namespace  Error
 D-Bus error names returned via QDBusMessage::createErrorReply.
namespace  SettingProperty
 Property names exposed by the Settings interface's runtime D-Bus surface (distinct from the persisted-config keys served by ConfigDefaults — these names live on the wire only).
namespace  WindowMetadataKey
 Keys for the extended-window-property QVariantMap (the trailing a{sv} argument of setWindowMetadata).
namespace  ScrollTabKey
 Keys of the scrolling tab-indicator maps that cross the daemon → KWin effect boundary on org.phosphor_works.Placement.Tiling: the per-screen context-rule PAINT override map (scrollTabPaintOverridesChanged / scrollTabPaintOverrides, every key below) and the per-window rule COLOUR map (scrollTabColors / scrollTabColorsChanged, the colour keys only).
namespace  ScrollBehaviourKey
 Keys of the scrolling BEHAVIOUR map that crosses the daemon → KWin effect boundary on org.phosphor_works.Placement.Scrolling (scrollEffectBehaviour / scrollEffectBehaviourChanged): already-resolved screen-id lists, one per key below.
namespace  StripPreviewKey
 Tab keys on the STRIP PREVIEW payload — the per-tile description of the tab indicator its column draws, so a preview of the strip shows a tabbed column as tabbed instead of as a plain window.
namespace  StripModelKey
 Keys of the STRIP MODEL payload, org.phosphor_works.Placement.Scrolling.stripModelJson: the whole strip of one screen as the Phosphor shell's placement map draws it, columns on and off screen alike, in pixels along the strip's own axis.
namespace  DropProxyKey
 Keys of the drop-proxy JSON a shell registers on org.phosphor_works.Placement.WindowDrag (registerDropProxy).
namespace  Apps
 Single-instance app identities.

Functions

constexpr QLatin1String Name ("org.phosphor_works.Placement")
 The placement service's D-Bus identity.
constexpr QLatin1String ObjectPath ("/org/phosphor_works/Placement")
constexpr QLatin1String HostApi ("placement")
 Not a D-Bus name.
int snapAssistThumbnailBoxPx (int zoneMinAxisLogicalPx, int candidateCount, double outputScale)
bool envSwitchEnabled (const char *name)
bool envSwitchEnabledByDefault (const char *name)
bool snapAssistDmabufThumbnailsEnabled ()
bool snapAssistThumbnailTraceEnabled ()

Variables

constexpr int QuickLayoutSlotCount = 9
 Quick-layout slots are numbered 1..QuickLayoutSlotCount.
constexpr int MaxRunningWindowsPayloadBytes = 1 << 20
 The largest running-windows payload (Settings.provideRunningWindows) the daemon relays, in UTF-8 bytes.
constexpr int ApiVersion = 11
constexpr int MinPeerApiVersion = 11
constexpr int CommittedSizeTolerancePx = 1
constexpr int SyncCallTimeoutMs = 500
constexpr int DaemonReadyProbeTimeoutMs = 3000
constexpr int SnapAssistThumbnailPostTimeoutMs = 2000
constexpr int SnapAssistThumbnailCacheCapacity = 24
constexpr int SnapAssistThumbnailMaxDimension = 1024
constexpr double SnapAssistCardScaleBase = 0.35
constexpr double SnapAssistIconSizeRatio = 0.6
constexpr int SnapAssistMinIconLogicalPx = 16
constexpr double SnapAssistThumbnailHeadroom = 1.25

Function Documentation

◆ envSwitchEnabled()

bool PhosphorProtocol::Service::envSwitchEnabled ( const char * name)
inline

◆ envSwitchEnabledByDefault()

bool PhosphorProtocol::Service::envSwitchEnabledByDefault ( const char * name)
inline

◆ HostApi()

QLatin1String PhosphorProtocol::Service::HostApi ( "placement" )
inlineconstexpr

Not a D-Bus name.

The API name host descriptors and the host record are filed under (PhosphorConfig::HostDirectory): <datadir>/phosphor-works/placement-hosts/ and $XDG_STATE_HOME/phosphor-works/placement-host.json. These spell the derived names by hand, since none of them can read this header, and have to be changed in step with it: the install rule for the PlasmaZones descriptor in plasmazones/CMakeLists.txt and the uninstall backstop in cmake/uninstall.cmake.in (the placement-hosts directory), and packaging/local-install/uninstall.sh and the message in packaging/arch/plasmazones.install (the placement-host.json state record).

◆ Name()

QLatin1String PhosphorProtocol::Service::Name ( "org.phosphor_works.Placement" )
inlineconstexpr

The placement service's D-Bus identity.

The bus name and object path, centralized so no caller spells them as a magic string. Shared by the daemon and every client of it: the KWin effect, the settings app, the editor, the Phosphor shell and any future compositor integration. The interface names are in the Interface namespace below.

◆ ObjectPath()

QLatin1String PhosphorProtocol::Service::ObjectPath ( "/org/phosphor_works/Placement" )
inlineconstexpr

◆ snapAssistDmabufThumbnailsEnabled()

bool PhosphorProtocol::Service::snapAssistDmabufThumbnailsEnabled ( )
inline

◆ snapAssistThumbnailBoxPx()

int PhosphorProtocol::Service::snapAssistThumbnailBoxPx ( int zoneMinAxisLogicalPx,
int candidateCount,
double outputScale )
inline

◆ snapAssistThumbnailTraceEnabled()

bool PhosphorProtocol::Service::snapAssistThumbnailTraceEnabled ( )
inline

Variable Documentation

◆ ApiVersion

int PhosphorProtocol::Service::ApiVersion = 11
inlineconstexpr

◆ CommittedSizeTolerancePx

int PhosphorProtocol::Service::CommittedSizeTolerancePx = 1
inlineconstexpr

◆ DaemonReadyProbeTimeoutMs

int PhosphorProtocol::Service::DaemonReadyProbeTimeoutMs = 3000
inlineconstexpr

◆ MaxRunningWindowsPayloadBytes

int PhosphorProtocol::Service::MaxRunningWindowsPayloadBytes = 1 << 20
inlineconstexpr

The largest running-windows payload (Settings.provideRunningWindows) the daemon relays, in UTF-8 bytes.

Protocol-level because the daemon refuses a larger one at the D-Bus boundary while the KWin effect builds it, so the effect can leave out rows rather than build a payload the daemon drops whole. Generous next to a real window list: it bounds one call, it is not a working limit.

◆ MinPeerApiVersion

int PhosphorProtocol::Service::MinPeerApiVersion = 11
inlineconstexpr

◆ QuickLayoutSlotCount

int PhosphorProtocol::Service::QuickLayoutSlotCount = 9
inlineconstexpr

Quick-layout slots are numbered 1..QuickLayoutSlotCount.

Protocol-level because the daemon validates the bound on the D-Bus boundary while the settings app walks it in its Quick Shortcuts reset loop, and the two live in different trees. Kept here so those two cannot drift.

It bounds more than the quick-layout slots. The snap-to-zone and scroll-focus-tab shortcut families size their settings schemas and key guards by it, and their own slot counts static_assert equal to it (SnapToZoneSlotCount and ScrollFocusTabSlotCount), so raising it moves those families too.

Mirrors repeat the value where this header cannot be the source. The daemon's shortcut table registers the indexed slot families from kIndexedSlotCount (shortcutmanager_ids.h), static_asserted equal to it in shortcutmanager.cpp. The same file also asserts kIndexedSlotCount equal to ConfigDefaults::WorkspaceSlotCount, so raising this count means raising the workspace slot bound with it. phosphor-zones' LayoutRegistry::QuickSlotCount does not depend on phosphor-protocol; the daemon's LayoutAdaptor, which links both, static_asserts the two equal. The settings app's QuickLayoutSlotsCard.qml (plasmazones/src/settings/qml/pages/layouts/) spells the count as the literal model of its slot Repeater, because QML cannot read this header, and that one has to be changed in step by hand.

◆ SnapAssistCardScaleBase

double PhosphorProtocol::Service::SnapAssistCardScaleBase = 0.35
inlineconstexpr

◆ SnapAssistIconSizeRatio

double PhosphorProtocol::Service::SnapAssistIconSizeRatio = 0.6
inlineconstexpr

◆ SnapAssistMinIconLogicalPx

int PhosphorProtocol::Service::SnapAssistMinIconLogicalPx = 16
inlineconstexpr

◆ SnapAssistThumbnailCacheCapacity

int PhosphorProtocol::Service::SnapAssistThumbnailCacheCapacity = 24
inlineconstexpr

◆ SnapAssistThumbnailHeadroom

double PhosphorProtocol::Service::SnapAssistThumbnailHeadroom = 1.25
inlineconstexpr

◆ SnapAssistThumbnailMaxDimension

int PhosphorProtocol::Service::SnapAssistThumbnailMaxDimension = 1024
inlineconstexpr

◆ SnapAssistThumbnailPostTimeoutMs

int PhosphorProtocol::Service::SnapAssistThumbnailPostTimeoutMs = 2000
inlineconstexpr

◆ SyncCallTimeoutMs

int PhosphorProtocol::Service::SyncCallTimeoutMs = 500
inlineconstexpr