KWayland

outputchangeset.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 
7 #ifndef WAYLAND_SERVER_OUTPUT_CHANGESET_H
8 #define WAYLAND_SERVER_OUTPUT_CHANGESET_H
9 
10 #include <QObject>
11 
12 #include "outputdevice_interface.h"
13 #include <KWayland/Server/kwaylandserver_export.h>
14 
15 namespace KWayland
16 {
17 namespace Server
18 {
19 /**
20  * @brief Holds a set of changes to an OutputInterface or OutputDeviceInterface.
21  *
22  * This class implements a set of changes that the compositor can apply to an
23  * OutputInterface after OutputConfiguration::apply has been called on the client
24  * side. The changes are per-configuration.
25  *
26  * @see OutputConfiguration
27  * @since 5.5
28  **/
29 class KWAYLANDSERVER_EXPORT OutputChangeSet : public QObject
30 {
31  Q_OBJECT
32 public:
33  ~OutputChangeSet() override;
34 
35  /** Whether the enabled() property of the outputdevice changed.
36  * @returns @c true if the enabled property of the outputdevice has changed.
37  */
38  bool enabledChanged() const;
39  /** Whether the currentModeId() property of the outputdevice changed.
40  * @returns @c true if the enabled property of the outputdevice has changed.
41  * bool modeChanged() const;
42  */
43  /** Whether the transform() property of the outputdevice changed. */
44  bool transformChanged() const;
45  /** Whether the currentModeId() property of the outputdevice changed.
46  * @returns @c true if the currentModeId() property of the outputdevice has changed.
47  */
48  bool modeChanged() const;
49  /** Whether the globalPosition() property of the outputdevice changed.
50  * @returns @c true if the globalPosition() property of the outputdevice has changed.
51  */
52  bool positionChanged() const;
53  /** Whether the scale() property of the outputdevice changed.
54  * @returns @c true if the scale() property of the outputdevice has changed.
55  */
56  bool scaleChanged() const;
57  /** Whether the colorCurves() property of the outputdevice changed.
58  * @returns @c true if the colorCurves() property of the outputdevice has changed.
59  */
60  bool colorCurvesChanged() const;
61 
62  /** The new value for enabled. */
63  OutputDeviceInterface::Enablement enabled() const;
64  /** The new mode id.*/
65  int mode() const;
66  /** The new value for transform. */
67  OutputDeviceInterface::Transform transform() const;
68  /** The new value for globalPosition. */
69  QPoint position() const;
70 #if KWAYLANDSERVER_ENABLE_DEPRECATED_SINCE(5, 50)
71  /** The new value for scale.
72  @deprecated Since 5.50, use scaleF
73  */
74  KWAYLANDSERVER_DEPRECATED_VERSION(5, 50, "Use OutputChangeSet::scaleF()")
75  int scale() const;
76 #endif
77  /** The new value for scale.
78  * @since 5.50
79  */
80  qreal scaleF() const;
81  /** The new value for colorCurves.
82  * @since 5.XX
83  */
84  OutputDeviceInterface::ColorCurves colorCurves() const;
85 
86 private:
87  friend class OutputConfigurationInterface;
88  explicit OutputChangeSet(OutputDeviceInterface *outputdevice, QObject *parent = nullptr);
89 
90  class Private;
92  Private *d_func() const;
93 };
94 
95 }
96 }
97 
98 #endif
Holds a set of changes to an OutputInterface or OutputDeviceInterface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Jan 30 2023 03:56:24 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.