6#include "phosphorscreens_export.h"
8#include <QDBusAbstractAdaptor>
45 Q_CLASSINFO(
"D-Bus Interface",
"org.phosphor_works.Placement.Screen")
165 void handleScreenGeometryChanged(QScreen* screen,
const QString& physId);
166 void handleScreenRemoved(QScreen* removedScreen, QScreen* targetScreen,
const QString& cachedId);
175 void handleScreenIdentifierChanged(
const QString& oldId,
const QString& newId);
176 bool emitForEffectiveScreens(
const QString& physId,
const std::function<
void(
const QString&)>& emitFn);
177 void invalidateScreenInfoCache();
179 void wireQGuiApplicationSignals();
184 void wirePerScreenSignals(QScreen* screen);
186 QString m_primaryScreenOverride;
193 QPointer<ScreenManager> m_screenManager;
194 QPointer<IConfigStore> m_configStore;
196 QStringList m_lastEmittedEffectiveIds;
197 QHash<QString, QStringList> m_cachedEffectiveIdsPerScreen;
198 QHash<QString, QString> m_cachedScreenInfoJson;
200 bool m_qGuiAppSignalsWired =
false;
QStringList getPhysicalScreens()
QString swapVirtualScreenInDirection(const QString ¤tVirtualScreenId, const QString &direction)
Swap the region of currentVirtualScreenId with the adjacent sibling VS in the given direction (left/r...
void screenGeometryChanged(const QString &screenId)
The screen's resolution, position or logical scale changed (the scale through ScreenManager::logicalS...
void availableGeometryChanged(const QString &screenId)
The screen's available geometry (the work area left by panels) moved while its full rect may not have...
QString getScreenId(const QString &connectorName)
QString rotateVirtualScreens(const QString &physicalScreenId, bool clockwise)
Rotate every VS region on physicalScreenId through a spatial clockwise ring order.
QString getVirtualScreenConfig(const QString &physicalScreenId)
~DBusScreenAdaptor() override
QString setVirtualScreenConfig(const QString &physicalScreenId, const QString &configJson)
Set the virtual screen subdivision configuration for a physical screen.
QRect getAvailableGeometry(const QString &screenId)
The geometry queries answer the primary screen for an EMPTY id only.
void virtualScreensChanged(const QString &physicalScreenId)
IConfigStore * configStore() const
QString getEffectiveScreenAt(int x, int y)
void setAvailableGeometryFromKWin(const QString &screenName, int x, int y, int width, int height)
Record the authoritative per-screen available geometry as reported by the compositor (the KWin effect...
void setCompositorReportGate(CompositorReportGate gate)
QString getScreenInfo(const QString &screenId)
JSON object describing screenId.
void setPrimaryScreenFromKWin(const QString &connectorName)
void screenAdded(const QString &screenId)
QString getPrimaryScreen()
void screenRemoved(const QString &screenId)
void setPixelSizeFromKWin(const QString &screenName, int width, int height)
Record an output's exact size in device pixels as reported by the compositor (the KWin effect reads t...
DBusScreenAdaptor(ScreenManager *manager, IConfigStore *store, QObject *parent=nullptr)
Primary constructor: wires the screen-topology service and the VS config store at construction time.
QRect getScreenGeometry(const QString &screenId)
std::function< bool(QLatin1StringView member)> CompositorReportGate
The admission check for the methods only the compositor may call (setPrimaryScreenFromKWin,...
Definition DBusScreenAdaptor.h:62
ScreenManager * screenManager() const
Pluggable persistence for virtual-screen configurations.
Definition IConfigStore.h:37
Centralized screen-topology service.
Definition Manager.h:86
Definition IWindowTrackingService.h:28