Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
GammaBackend.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 <PhosphorServiceNightLight/phosphorservicenightlight_export.h>
8
9#include <QObject>
10
12
23class PHOSPHORSERVICENIGHTLIGHT_EXPORT GammaBackend : public QObject
24{
25 Q_OBJECT
26
27public:
28 explicit GammaBackend(QObject* parent = nullptr);
29 ~GammaBackend() override;
30
36 [[nodiscard]] virtual bool isAvailable() const = 0;
37
41 virtual void setActive(bool active) = 0;
42
45 virtual void setWhitePoint(const WhitePoint& white) = 0;
46
49 virtual void retry() = 0;
50
51Q_SIGNALS:
53};
54
55} // namespace PhosphorServiceNightLight
GammaBackend(QObject *parent=nullptr)
virtual bool isAvailable() const =0
Whether the backend can tint at least one output.
virtual void retry()=0
Try again on outputs whose control failed (for example after another program that held their gamma ha...
virtual void setActive(bool active)=0
Take (true) or release (false) the outputs' gamma.
virtual void setWhitePoint(const WhitePoint &white)=0
The colour to tint every controlled output with.
Definition ColorTemperature.h:11
The colour of white at a temperature, as per-channel factors.
Definition ColorTemperature.h:40