Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
BackgroundEffect.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 "phosphorwayland_export.h"
7
8#include <QObject>
9#include <QRegion>
10
11QT_BEGIN_NAMESPACE
12class QWindow;
13QT_END_NAMESPACE
14
15namespace PhosphorWayland {
16
37class PHOSPHORWAYLAND_EXPORT BackgroundEffect : public QObject
38{
39 Q_OBJECT
40 Q_PROPERTY(bool blurSupported READ isBlurSupported NOTIFY blurSupportedChanged FINAL)
41
42public:
47 static BackgroundEffect* instance();
48
52 [[nodiscard]] bool isBlurSupported() const;
53
58 void setBlurRegion(QWindow* window, const QRegion& region);
59
61 [[nodiscard]] QRegion blurRegion(const QWindow* window) const;
62
63Q_SIGNALS:
64 void blurSupportedChanged(bool supported);
65
66private:
67 explicit BackgroundEffect(QObject* parent);
68};
69
70} // namespace PhosphorWayland
static BackgroundEffect * instance()
The process's instance, created on first use as a child of the application object.
bool isBlurSupported() const
Whether the compositor applies blur requested through this class right now: the protocol is advertise...
void setBlurRegion(QWindow *window, const QRegion &region)
Blur the backdrop behind region of window, in window-local logical coordinates (the coordinates a QQu...
void blurSupportedChanged(bool supported)
QRegion blurRegion(const QWindow *window) const
The region last set for window, whether or not it is applied.
Definition BackgroundEffect.h:15