KWayland

pointerconstraints_interface.h
1 /*
2  SPDX-FileCopyrightText: 2016 Martin Gräßlin <[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_SERVER_POINTERCONSTRAINTS_INTERFACE_H
7 #define KWAYLAND_SERVER_POINTERCONSTRAINTS_INTERFACE_H
8 
9 #include "global.h"
10 #include "resource.h"
11 
12 #include <KWayland/Server/kwaylandserver_export.h>
13 
14 #include <QRegion>
15 
16 namespace KWayland
17 {
18 namespace Server
19 {
20 
21 class Display;
22 class SurfaceInterface;
23 
34 };
35 
46 class KWAYLANDSERVER_EXPORT PointerConstraintsInterface : public Global
47 {
48  Q_OBJECT
49 public:
50  virtual ~PointerConstraintsInterface();
51 
55  PointerConstraintsInterfaceVersion interfaceVersion() const;
56 
57 protected:
58  class Private;
59  explicit PointerConstraintsInterface(Private *d, QObject *parent = nullptr);
60 
61 private:
62  Private *d_func() const;
63 };
64 
81 class KWAYLANDSERVER_EXPORT LockedPointerInterface : public Resource
82 {
83  Q_OBJECT
84 public:
85 
86  virtual ~LockedPointerInterface();
87 
91  PointerConstraintsInterfaceVersion interfaceVersion() const;
92 
93  enum class LifeTime {
94  OneShot,
95  Persistent
96  };
97 
98  LifeTime lifeTime() const;
99 
111  QRegion region() const;
112 
129  QPointF cursorPositionHint() const;
130 
136  bool isLocked() const;
137 
151  void setLocked(bool locked);
152 
153 Q_SIGNALS:
159  void regionChanged();
160 
167  void cursorPositionHintChanged();
168 
174  void lockedChanged();
175 
176 protected:
177  class Private;
178  explicit LockedPointerInterface(Private *p, QObject *parent = nullptr);
179 
180 private:
181  Private *d_func() const;
182  friend class SurfaceInterface;
183 };
184 
203 class KWAYLANDSERVER_EXPORT ConfinedPointerInterface : public Resource
204 {
205  Q_OBJECT
206 public:
207 
208  virtual ~ConfinedPointerInterface();
209 
213  PointerConstraintsInterfaceVersion interfaceVersion() const;
214 
215  enum class LifeTime {
216  OneShot,
217  Persistent
218  };
219 
220  LifeTime lifeTime() const;
221 
233  QRegion region() const;
234 
240  bool isConfined() const;
241 
253  void setConfined(bool confined);
254 
255 Q_SIGNALS:
261  void regionChanged();
262 
268  void confinedChanged();
269 
270 protected:
271  class Private;
272  explicit ConfinedPointerInterface(Private *p, QObject *parent = nullptr);
273 
274 private:
275  Private *d_func() const;
276  friend class SurfaceInterface;
277 };
278 
279 }
280 }
281 
282 #endif
PointerConstraintsInterfaceVersion
Enum describing the interface versions the PointerConstraintsInterface can support.
The LockedPointerInterface lets the client request to disable movements of the virtual pointer (i...
Resource representing a wl_surface.
Base class for all Globals.
Definition: global.h:46
Represents a bound Resource.
Definition: resource.h:32
The ConfinedPointerInterface gets installed on a SurfaceInterface.
Manager object to create pointer constraints.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed May 27 2020 23:04:39 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.