Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
DefaultScreenProvider.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
7#include <PhosphorLayer/phosphorlayer_export.h>
8
9#include <QObject>
10
11#include <memory>
12
13namespace PhosphorLayer {
14
28class PHOSPHORLAYER_EXPORT DefaultScreenProvider : public QObject, public IScreenProvider
29{
30 Q_OBJECT
31public:
32 explicit DefaultScreenProvider(QObject* parent = nullptr);
34
35 QList<QScreen*> screens() const override;
36 QScreen* primary() const override;
37 QScreen* focused() const override;
39
40private:
41 class Impl;
42 std::unique_ptr<Impl> m_impl;
43};
44
45} // namespace PhosphorLayer
IScreenProvider backed by QGuiApplication::screens().
Definition DefaultScreenProvider.h:29
DefaultScreenProvider(QObject *parent=nullptr)
QScreen * primary() const override
Canonical "primary" screen.
QScreen * focused() const override
Screen currently containing the focus / cursor.
ScreenProviderNotifier * notifier() const override
Notifier for signal-driven updates.
QList< QScreen * > screens() const override
Full list of screens the surfaces should be aware of.
Source-of-truth interface for the available QScreen set.
Definition IScreenProvider.h:62
QObject that emits signals for IScreenProvider state changes.
Definition IScreenProvider.h:27
Definition SurfaceAnimator.h:26