KWayland

relativepointer.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_CLIENT_RELATIVEPOINTER_H
7 #define KWAYLAND_CLIENT_RELATIVEPOINTER_H
8 
9 #include <QObject>
10 
11 #include <KWayland/Client/kwaylandclient_export.h>
12 
13 struct zwp_relative_pointer_manager_v1;
14 struct zwp_relative_pointer_v1;
15 
16 namespace KWayland
17 {
18 namespace Client
19 {
20 
21 class EventQueue;
22 class Pointer;
23 class RelativePointer;
24 
49 class KWAYLANDCLIENT_EXPORT RelativePointerManager : public QObject
50 {
51  Q_OBJECT
52 public:
59  explicit RelativePointerManager(QObject *parent = nullptr);
60  virtual ~RelativePointerManager();
61 
67  void setup(zwp_relative_pointer_manager_v1 *relativepointermanagerunstablev1);
71  bool isValid() const;
77  void release();
94  void destroy();
95 
99  void setEventQueue(EventQueue *queue);
103  EventQueue *eventQueue();
104 
108  RelativePointer *createRelativePointer(Pointer *pointer, QObject *parent = nullptr);
109 
110  operator zwp_relative_pointer_manager_v1*();
111  operator zwp_relative_pointer_manager_v1*() const;
112 
113 Q_SIGNALS:
120  void removed();
121 
122 private:
123  class Private;
125 };
126 
136 class KWAYLANDCLIENT_EXPORT RelativePointer : public QObject
137 {
138  Q_OBJECT
139 public:
140  virtual ~RelativePointer();
141 
147  void setup(zwp_relative_pointer_v1 *relativepointerunstablev1);
151  bool isValid() const;
157  void release();
172  void destroy();
173 
174  operator zwp_relative_pointer_v1*();
175  operator zwp_relative_pointer_v1*() const;
176 
177 Q_SIGNALS:
209  void relativeMotion(const QSizeF &delta, const QSizeF &deltaNonAccelerated, quint64 timestamp);
210 
211 private:
212  friend class RelativePointerManager;
213  explicit RelativePointer(QObject *parent = nullptr);
214  class Private;
216 };
217 
218 
219 }
220 }
221 
222 #endif
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
Wrapper for the zwp_relative_pointer_v1 interface.
Wrapper for the wl_pointer interface.
Definition: pointer.h:32
Wrapper for the zwp_relative_pointer_manager_v1 interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 7 2020 22:48:19 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.