KWayland

fakeinput_interface.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_SERVER_FAKEINPUT_INTERFACE_H
7 #define KWAYLAND_SERVER_FAKEINPUT_INTERFACE_H
8 
9 #include <KWayland/Server/kwaylandserver_export.h>
10 #include "global.h"
11 
12 struct wl_resource;
13 
14 namespace KWayland
15 {
16 namespace Server
17 {
18 
19 class Display;
20 class FakeInputDevice;
21 
39 class KWAYLANDSERVER_EXPORT FakeInputInterface : public Global
40 {
41  Q_OBJECT
42 public:
43  virtual ~FakeInputInterface();
44 
45 Q_SIGNALS:
50  void deviceCreated(KWayland::Server::FakeInputDevice *device);
51 
52 private:
53  explicit FakeInputInterface(Display *display, QObject *parent = nullptr);
54  friend class Display;
55  class Private;
56 };
57 
64 class KWAYLANDSERVER_EXPORT FakeInputDevice : public QObject
65 {
66  Q_OBJECT
67 public:
68  virtual ~FakeInputDevice();
72  wl_resource *resource();
73 
80  void setAuthentication(bool authenticated);
84  bool isAuthenticated() const;
85 
86 Q_SIGNALS:
97  void authenticationRequested(const QString &application, const QString &reason);
101  void pointerMotionRequested(const QSizeF &delta);
107  void pointerMotionAbsoluteRequested(const QPointF &pos);
111  void pointerButtonPressRequested(quint32 button);
115  void pointerButtonReleaseRequested(quint32 button);
119  void pointerAxisRequested(Qt::Orientation orientation, qreal delta);
125  void touchDownRequested(quint32 id, const QPointF &pos);
131  void touchMotionRequested(quint32 id, const QPointF &pos);
137  void touchUpRequested(quint32 id);
143  void touchCancelRequested();
149  void touchFrameRequested();
155  void keyboardKeyPressRequested(quint32 key);
161  void keyboardKeyReleaseRequested(quint32 key);
162 
163 private:
164  friend class FakeInputInterface;
165  FakeInputDevice(wl_resource *resource, FakeInputInterface *parent);
166  class Private;
168 };
169 
170 }
171 }
172 
173 Q_DECLARE_METATYPE(KWayland::Server::FakeInputDevice*)
174 
175 #endif
Represents the Resource for a org_kde_kwin_fake_input interface.
Class holding the Wayland server display loop.
Definition: display.h:89
Base class for all Globals.
Definition: global.h:46
Orientation
Represents the Global for org_kde_kwin_fake_input interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 7 2020 22:48:17 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.