KWaylandServer

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

KDE's Doxygen guidelines are available online.