KWayland

contrast_interface.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_SERVER_CONTRAST_INTERFACE_H
8 #define KWAYLAND_SERVER_CONTRAST_INTERFACE_H
9 
10 #include "global.h"
11 #include "resource.h"
12 
13 #include <QObject>
14 
15 #include <KWayland/Server/kwaylandserver_export.h>
16 
17 namespace KWayland
18 {
19 namespace Server
20 {
21 class Display;
22 
23 /**
24  * @brief Represents the Global for org_kde_kwin_contrast_manager interface.
25  *
26  * This class creates ContrastInterfaces and attaches them to SurfaceInterfaces.
27  *
28  * @see ContrastInterface
29  * @see SurfaceInterface
30  * @since 5.5
31  **/
32 class KWAYLANDSERVER_EXPORT ContrastManagerInterface : public Global
33 {
34  Q_OBJECT
35 public:
36  virtual ~ContrastManagerInterface();
37 
38 private:
39  explicit ContrastManagerInterface(Display *display, QObject *parent = nullptr);
40  friend class Display;
41  class Private;
42 };
43 
44 /**
45  * @brief Represents the Resource for the org_kde_kwin_contrast interface.
46  *
47  * Instances of this class are only generated by the ContrastManagerInterface.
48  * The ContrastInterface gets attached to a SurfaceInterface and can be assessed
49  * from there using @link SurfaceInterface::contrast() @endlink. Please note that
50  * the ContrastInterface is only available on the SurfaceInterface after it has been
51  * committed.
52  *
53  * @see ContrastManagerInterface
54  * @see SurfaceInterface
55  * @since 5.5
56  **/
57 class KWAYLANDSERVER_EXPORT ContrastInterface : public Resource
58 {
59  Q_OBJECT
60 public:
61  virtual ~ContrastInterface();
62 
63  QRegion region() const;
64  qreal contrast() const;
65  qreal intensity() const;
66  qreal saturation() const;
67 
68 private:
69  explicit ContrastInterface(ContrastManagerInterface *parent, wl_resource *parentResource);
70  friend class ContrastManagerInterface;
71 
72  class Private;
73  Private *d_func() const;
74 };
75 
76 }
77 }
78 
79 #endif
Class holding the Wayland server display loop.
Definition: display.h:88
Represents the Global for org_kde_kwin_contrast_manager interface.
Base class for all Globals.
Definition: global.h:46
Represents a bound Resource.
Definition: resource.h:31
Represents the Resource for the org_kde_kwin_contrast interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu May 13 2021 22:50:11 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.