KWayland

contrast.h
1 /*
2  SPDX-FileCopyrightText: 2015 Martin Gräßlin <[email protected]>
3  SPDX-FileCopyrightText: 2015 Marco Martin <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7 #ifndef KWAYLAND_CONTRAST_H
8 #define KWAYLAND_CONTRAST_H
9 
10 #include <QObject>
11 #include <QPoint>
12 #include <QSize>
13 
14 #include <KWayland/Client/kwaylandclient_export.h>
15 
16 struct org_kde_kwin_contrast;
17 struct org_kde_kwin_contrast_manager;
18 
19 namespace KWayland
20 {
21 namespace Client
22 {
23 
24 class EventQueue;
25 class Contrast;
26 class Surface;
27 class Region;
28 
32 class KWAYLANDCLIENT_EXPORT ContrastManager : public QObject
33 {
34  Q_OBJECT
35 public:
42  explicit ContrastManager(QObject *parent = nullptr);
43  virtual ~ContrastManager();
44 
48  bool isValid() const;
54  void setup(org_kde_kwin_contrast_manager *contrastManager);
60  void release();
77  void destroy();
78 
82  void setEventQueue(EventQueue *queue);
86  EventQueue *eventQueue();
87 
93  Contrast *createContrast(Surface *surface, QObject *parent = nullptr);
94  void removeContrast(Surface *surface);
95 
96  operator org_kde_kwin_contrast_manager*();
97  operator org_kde_kwin_contrast_manager*() const;
98 
99 Q_SIGNALS:
108  void removed();
109 
110 private:
111  class Private;
113 };
114 
128 class KWAYLANDCLIENT_EXPORT Contrast : public QObject
129 {
130  Q_OBJECT
131 public:
132  virtual ~Contrast();
133 
139  void setup(org_kde_kwin_contrast *contrast);
145  void release();
160  void destroy();
164  bool isValid() const;
165 
166  void commit();
167 
174  void setRegion(Region *region);
175  void setContrast(qreal contrast);
176  void setIntensity(qreal intensity);
177  void setSaturation(qreal saturation);
178 
179  operator org_kde_kwin_contrast*();
180  operator org_kde_kwin_contrast*() const;
181 
182 private:
183  friend class ContrastManager;
184  explicit Contrast(QObject *parent = nullptr);
185  class Private;
187 };
188 
189 }
190 }
191 
192 #endif
193 
Wrapper for the org_kde_kwin_contrast interface.
Definition: contrast.h:128
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
Wrapper for the wl_surface interface.
Definition: surface.h:44
Wrapper for the wl_region interface.
Definition: region.h:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 4 2020 22:50:27 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.