KWayland

outputconfiguration.h
1 /*
2  SPDX-FileCopyrightText: 2015 Sebastian Kügler <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #ifndef KWAYLAND_CLIENT_OUTPUTCONFIGURATION_H
7 #define KWAYLAND_CLIENT_OUTPUTCONFIGURATION_H
8 
9 #include <QObject>
10 #include <QPoint>
11 #include <QVector>
12 
13 #include "outputdevice.h"
14 #include <KWayland/Client/kwaylandclient_export.h>
15 
16 struct org_kde_kwin_outputmanagement;
17 struct org_kde_kwin_outputconfiguration;
18 
19 namespace KWayland
20 {
21 namespace Client
22 {
23 
24 class EventQueue;
25 
83 class KWAYLANDCLIENT_EXPORT OutputConfiguration : public QObject
84 {
85  Q_OBJECT
86 public:
87  virtual ~OutputConfiguration();
88 
95  void setup(org_kde_kwin_outputconfiguration *outputconfiguration);
99  bool isValid() const;
105  void release();
121  void destroy();
125  void setEventQueue(EventQueue *queue);
129  EventQueue *eventQueue();
130 
142  void setEnabled(OutputDevice *outputdevice, OutputDevice::Enablement enable);
143 
152  void setMode(OutputDevice *outputdevice, const int modeId);
161  void setTransform(OutputDevice *outputdevice, KWayland::Client::OutputDevice::Transform transform);
162 
175  void setPosition(OutputDevice *outputdevice, const QPoint &pos);
176 
177 #if KWAYLANDCLIENT_ENABLE_DEPRECATED_SINCE(5, 50)
178 
187  KWAYLANDCLIENT_DEPRECATED_VERSION(5, 50, "Use OutputConfiguration::setScaleF(OutputDevice *, qreal)")
188  void setScale(OutputDevice *outputdevice, qint32 scale);
189 #endif
190 
200  void setScaleF(OutputDevice *outputdevice, qreal scale);
201 
202  /* Set color curves for this output. The respective color curve vector
203  * lengths must equal the current ones in the OutputDevice. The codomain
204  * of the curves is always the full uint16 value range, such that any vector
205  * is accepted as long as it has the right size.
206  * The changes done in this call will be recorded in the
207  * OutputDevice and only applied after apply() has been called.
208  *
209  * @param red color curve of red channel.
210  * @param green color curve of green channel.
211  * @param blue color curve of blue channel.
212  * @param outputdevice the OutputDevice this change applies to.
213  * @since 5.50
214  */
215  void setColorCurves(OutputDevice *outputdevice, QVector<quint16> red, QVector<quint16> green, QVector<quint16> blue);
216 
229  void apply();
230 
231  operator org_kde_kwin_outputconfiguration*();
232  operator org_kde_kwin_outputconfiguration*() const;
233 
234 Q_SIGNALS:
240  void applied();
246  void failed();
247 
248 private:
249  friend class OutputManagement;
250  explicit OutputConfiguration(QObject *parent = nullptr);
251  class Private;
253 };
254 
255 
256 }
257 }
258 
259 Q_DECLARE_METATYPE(KWayland::Client::OutputConfiguration*)
260 
261 
262 #endif
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
OutputConfiguration provides access to changing OutputDevices.
Wrapper for the org_kde_kwin_outputmanagement interface.
Wrapper for the org_kde_kwin_outputdevice interface.
Definition: outputdevice.h:58
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Nov 26 2020 22:48:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.