Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
Resolver.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include "phosphorscreens_export.h"
7
9
10#include <QString>
11
12class QPoint;
13
14namespace Phosphor::Screens {
15
32{
36 QString method = QStringLiteral("getEffectiveScreenAt");
37};
38
53class PHOSPHORSCREENS_EXPORT ScreenResolver
54{
55public:
57
82 static QString effectiveScreenAt(const QPoint& pos, const ResolverEndpoint& endpoint = ResolverEndpoint{},
84
86 static QString effectiveScreenAtCursor(const ResolverEndpoint& endpoint = ResolverEndpoint{},
88};
89
90} // namespace Phosphor::Screens
Resolve a global cursor position to the effective screen ID.
Definition Resolver.h:54
static QString effectiveScreenAtCursor(const ResolverEndpoint &endpoint=ResolverEndpoint{}, int timeoutMs=PhosphorProtocol::Service::SyncCallTimeoutMs)
Convenience wrapper: resolve at the current QCursor::pos().
static QString effectiveScreenAt(const QPoint &pos, const ResolverEndpoint &endpoint=ResolverEndpoint{}, int timeoutMs=PhosphorProtocol::Service::SyncCallTimeoutMs)
Resolve a screen coordinate to an effective screen ID.
constexpr QLatin1String Screen("org.plasmazones.Screen")
constexpr int SyncCallTimeoutMs
Definition ServiceConstants.h:99
constexpr QLatin1String Name("org.plasmazones")
D-Bus service constants shared by all compositor plugins.
constexpr QLatin1String ObjectPath("/PlasmaZones")
Definition IWindowTrackingService.h:26
D-Bus endpoint that ScreenResolver queries.
Definition Resolver.h:32
QString method
Definition Resolver.h:36
QString interfaceName
Definition Resolver.h:35
QString path
Definition Resolver.h:34
QString service
Definition Resolver.h:33