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;
43
44private:
45 class Impl;
46 std::unique_ptr<Impl> m_impl;
47};
48
49} // namespace PhosphorLayer
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
Never null: the notifier is constructed with this provider and owned for its whole lifetime.
QList< QScreen * > screens() const override
Full list of screens the surfaces should be aware of.
QObject that emits signals for IScreenProvider state changes.
Definition IScreenProvider.h:27
Definition SurfaceAnimator.h:26