KWayland

fakeinput.h
1 /*
2  SPDX-FileCopyrightText: 2015 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_FAKEINPUT_H
7 #define KWAYLAND_FAKEINPUT_H
8 
9 #include <QObject>
10 
11 #include <KWayland/Client/kwaylandclient_export.h>
12 
13 struct org_kde_kwin_fake_input;
14 
15 namespace KWayland
16 {
17 namespace Client
18 {
19 
20 class EventQueue;
21 class FakeInputTimeout;
22 class Seat;
23 
50 class KWAYLANDCLIENT_EXPORT FakeInput : public QObject
51 {
52  Q_OBJECT
53 public:
60  explicit FakeInput(QObject *parent = nullptr);
61  virtual ~FakeInput();
62 
66  bool isValid() const;
72  void setup(org_kde_kwin_fake_input *manager);
78  void release();
93  void destroy();
94 
98  void setEventQueue(EventQueue *queue);
102  EventQueue *eventQueue();
103 
117  void authenticate(const QString &applicationName, const QString &reason);
121  void requestPointerMove(const QSizeF &delta);
127  void requestPointerMoveAbsolute(const QPointF &pos);
132  void requestPointerButtonPress(Qt::MouseButton button);
137  void requestPointerButtonPress(quint32 linuxButton);
142  void requestPointerButtonRelease(Qt::MouseButton button);
147  void requestPointerButtonRelease(quint32 linuxButton);
152  void requestPointerButtonClick(Qt::MouseButton button);
157  void requestPointerButtonClick(quint32 linuxButton);
161  void requestPointerAxis(Qt::Orientation axis, qreal delta);
172  void requestTouchDown(quint32 id, const QPointF &pos);
180  void requestTouchMotion(quint32 id, const QPointF &pos);
186  void requestTouchUp(quint32 id);
191  void requestTouchCancel();
197  void requestTouchFrame();
198 
205  void requestKeyboardKeyPress(quint32 linuxKey);
212  void requestKeyboardKeyRelease(quint32 linuxKey);
213 
214  operator org_kde_kwin_fake_input*();
215  operator org_kde_kwin_fake_input*() const;
216 
217 Q_SIGNALS:
226  void removed();
227 
228 private:
229  class Private;
231 };
232 
233 }
234 }
235 
236 #endif
Wrapper class for wl_event_queue interface.
Definition: event_queue.h:55
MouseButton
Wrapper for the org_kde_kwin_fake_input interface.
Definition: fakeinput.h:50
Orientation
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 22:50:51 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.