File indexing completed on 2024-05-12 05:32:23
0001 /* 0002 SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org> 0003 SPDX-FileCopyrightText: 2021 Méven Car <meven.car@enioka.com> 0004 0005 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 #pragma once 0008 0009 #include "kwin_export.h" 0010 0011 #include <QList> 0012 #include <QObject> 0013 #include <QPoint> 0014 #include <QSize> 0015 #include <QUuid> 0016 #include <memory> 0017 0018 struct wl_resource; 0019 0020 namespace KWin 0021 { 0022 0023 class Output; 0024 class OutputMode; 0025 class Display; 0026 class OutputDeviceV2InterfacePrivate; 0027 class OutputDeviceModeV2Interface; 0028 class OutputDeviceModeV2InterfacePrivate; 0029 0030 /** @class OutputDeviceV2Interface 0031 * 0032 * Represents an output device, the difference to Output is that this output can be disabled, 0033 * so not currently used to display content. 0034 * 0035 * @see OutputManagementV2Interface 0036 */ 0037 class KWIN_EXPORT OutputDeviceV2Interface : public QObject 0038 { 0039 Q_OBJECT 0040 0041 public: 0042 explicit OutputDeviceV2Interface(Display *display, Output *handle, QObject *parent = nullptr); 0043 ~OutputDeviceV2Interface() override; 0044 0045 void remove(); 0046 0047 Output *handle() const; 0048 0049 static OutputDeviceV2Interface *get(wl_resource *native); 0050 0051 private: 0052 void updatePhysicalSize(); 0053 void updateGlobalPosition(); 0054 void updateManufacturer(); 0055 void updateModel(); 0056 void updateSerialNumber(); 0057 void updateEisaId(); 0058 void updateName(); 0059 void updateScale(); 0060 void updateSubPixel(); 0061 void updateTransform(); 0062 void updateModes(); 0063 void updateCurrentMode(); 0064 void updateEdid(); 0065 void updateEnabled(); 0066 void updateUuid(); 0067 void updateCapabilities(); 0068 void updateOverscan(); 0069 void updateVrrPolicy(); 0070 void updateRgbRange(); 0071 void updateGeometry(); 0072 void updateHighDynamicRange(); 0073 void updateSdrBrightness(); 0074 void updateWideColorGamut(); 0075 void updateAutoRotate(); 0076 void updateIccProfilePath(); 0077 void updateBrightnessMetadata(); 0078 void updateBrightnessOverrides(); 0079 void updateSdrGamutWideness(); 0080 0081 std::unique_ptr<OutputDeviceV2InterfacePrivate> d; 0082 }; 0083 0084 /** 0085 * @class OutputDeviceModeV2Interface 0086 * 0087 * Represents an output device mode. 0088 * 0089 * @see OutputDeviceV2Interface 0090 */ 0091 class KWIN_EXPORT OutputDeviceModeV2Interface : public QObject 0092 { 0093 Q_OBJECT 0094 0095 public: 0096 OutputDeviceModeV2Interface(std::shared_ptr<OutputMode> handle, QObject *parent = nullptr); 0097 ~OutputDeviceModeV2Interface() override; 0098 0099 std::weak_ptr<OutputMode> handle() const; 0100 0101 static OutputDeviceModeV2Interface *get(wl_resource *native); 0102 0103 private: 0104 friend class OutputDeviceModeV2InterfacePrivate; 0105 std::unique_ptr<OutputDeviceModeV2InterfacePrivate> d; 0106 }; 0107 0108 }