f037a69f1c
This change introduces basic colord integration in wayland session. It is implemented as a binary plugin. If an output is connected, the plugin will create the corresponding colord device using the D-Bus API and start monitoring the device for changes. When a colord devices changes, the plugin will read the VCGT tag of the current ICC color profile and apply it.
38 lines
714 B
C++
38 lines
714 B
C++
/*
|
|
SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "colorddeviceinterface.h"
|
|
|
|
#include <QDBusObjectPath>
|
|
#include <QObject>
|
|
#include <QPointer>
|
|
|
|
namespace KWin
|
|
{
|
|
|
|
class AbstractOutput;
|
|
|
|
class ColordDevice : public QObject
|
|
{
|
|
public:
|
|
explicit ColordDevice(AbstractOutput *output, QObject *parent = nullptr);
|
|
|
|
void initialize(const QDBusObjectPath &devicePath);
|
|
|
|
AbstractOutput *output() const;
|
|
QDBusObjectPath objectPath() const;
|
|
|
|
private Q_SLOTS:
|
|
void updateProfile();
|
|
|
|
private:
|
|
CdDeviceInterface *m_colordInterface = nullptr;
|
|
QPointer<AbstractOutput> m_output;
|
|
};
|
|
|
|
} // namespace KWin
|