Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
IScreenProvider.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 <PhosphorLayer/phosphorlayer_export.h>
7
8#include <QList>
9#include <QObject>
10
11QT_BEGIN_NAMESPACE
12class QScreen;
13QT_END_NAMESPACE
14
15namespace PhosphorLayer {
16
26class PHOSPHORLAYER_EXPORT ScreenProviderNotifier : public QObject
27{
28 Q_OBJECT
29public:
30 explicit ScreenProviderNotifier(QObject* parent = nullptr);
32
33Q_SIGNALS:
37
41
52};
53
61class PHOSPHORLAYER_EXPORT IScreenProvider
62{
63public:
64 IScreenProvider() = default;
65 virtual ~IScreenProvider() = default;
66 Q_DISABLE_COPY_MOVE(IScreenProvider)
67
68
69 virtual QList<QScreen*> screens() const = 0;
70
74 virtual QScreen* primary() const = 0;
75
80 virtual QScreen* focused() const = 0;
81
108 virtual ScreenProviderNotifier* notifier() const = 0;
109};
110
111} // namespace PhosphorLayer
virtual QList< QScreen * > screens() const =0
Full list of screens the surfaces should be aware of.
virtual ScreenProviderNotifier * notifier() const =0
Notifier for signal-driven updates.
virtual QScreen * focused() const =0
Screen currently containing the focus / cursor.
virtual ~IScreenProvider()=default
virtual QScreen * primary() const =0
Canonical "primary" screen.
QObject that emits signals for IScreenProvider state changes.
Definition IScreenProvider.h:27
void focusChanged()
IScreenProvider::focused() would now return a different QScreen*.
ScreenProviderNotifier(QObject *parent=nullptr)
void primaryChanged()
IScreenProvider::primary() would now return a different QScreen*.
void screensChanged()
The screen list or geometry has changed.
Definition SurfaceAnimator.h:26