KWin
Loading...
Searching...
No Matches
outputdevice_v2.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
3 SPDX-FileCopyrightText: 2021 Méven Car <meven.car@enioka.com>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7#pragma once
8
9#include "kwin_export.h"
10
11#include <QList>
12#include <QObject>
13#include <QPoint>
14#include <QSize>
15#include <QUuid>
16#include <memory>
17
18struct wl_resource;
19
20namespace KWin
21{
22
23class Output;
24class OutputMode;
25class Display;
26class OutputDeviceV2InterfacePrivate;
27class OutputDeviceModeV2Interface;
28class OutputDeviceModeV2InterfacePrivate;
29
37class KWIN_EXPORT OutputDeviceV2Interface : public QObject
38{
39 Q_OBJECT
40
41public:
42 explicit OutputDeviceV2Interface(Display *display, Output *handle, QObject *parent = nullptr);
43 ~OutputDeviceV2Interface() override;
44
45 void remove();
46
47 Output *handle() const;
48
49 static OutputDeviceV2Interface *get(wl_resource *native);
50
51private:
52 void updatePhysicalSize();
53 void updateGlobalPosition();
54 void updateManufacturer();
55 void updateModel();
56 void updateSerialNumber();
57 void updateEisaId();
58 void updateName();
59 void updateScale();
60 void updateSubPixel();
61 void updateTransform();
62 void updateModes();
63 void updateCurrentMode();
64 void updateEdid();
65 void updateEnabled();
66 void updateUuid();
67 void updateCapabilities();
68 void updateOverscan();
69 void updateVrrPolicy();
70 void updateRgbRange();
71 void updateGeometry();
72 void updateHighDynamicRange();
73 void updateSdrBrightness();
74 void updateWideColorGamut();
75 void updateAutoRotate();
76 void updateIccProfilePath();
77 void updateBrightnessMetadata();
78 void updateBrightnessOverrides();
79 void updateSdrGamutWideness();
80
81 std::unique_ptr<OutputDeviceV2InterfacePrivate> d;
82};
83
91class KWIN_EXPORT OutputDeviceModeV2Interface : public QObject
92{
93 Q_OBJECT
94
95public:
96 OutputDeviceModeV2Interface(std::shared_ptr<OutputMode> handle, QObject *parent = nullptr);
98
99 std::weak_ptr<OutputMode> handle() const;
100
101 static OutputDeviceModeV2Interface *get(wl_resource *native);
102
103private:
105 std::unique_ptr<OutputDeviceModeV2InterfacePrivate> d;
106};
107
108}
Class holding the Wayland server display loop.
Definition display.h:34
struct _XDisplay Display