Debian Codegraph @

wayland/qtwayland-dev/5.11.3/QtWaylandClient/private/qwaylandtouch_p.h

raw symbols SCIP
1 // Copyright (C) 2020 The Qt Company Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5 #ifndef QWAYLANDTOUCH_H
6 #define QWAYLANDTOUCH_H
7
8 //
9 // W A R N I N G
10 // -------------
11 //
12 // This file is not part of the Qt API. It exists purely as an
13 // implementation detail. This header file may change from version to
14 // version without notice, or even be removed.
15 //
16 // We mean it.
17 //
18
19 #include <qpa/qwindowsysteminterface.h>
20
21 #include <QtWaylandClient/private/qwayland-touch-extension.h>
22 #include <QtWaylandClient/qtwaylandclientglobal.h>
23
24 QT_BEGIN_NAMESPACE
25
26 namespace QtWaylandClient {
27
28 class QWaylandDisplay;
29 class QWaylandInputDevice;
30
31 class Q_WAYLAND_CLIENT_EXPORT QWaylandTouchExtension : public QtWayland::qt_touch_extension
32 {
33 public:
34 QWaylandTouchExtension(QWaylandDisplay *display, uint32_t id);
35
36 void touchCanceled();
37
38 private:
39 void registerDevice(int caps);
40
41 QWaylandDisplay *mDisplay = nullptr;
42
43 void touch_extension_touch(uint32_t time,
44 uint32_t id,
45 uint32_t state,
46 int32_t x,
47 int32_t y,
48 int32_t normalized_x,
49 int32_t normalized_y,
50 int32_t width,
51 int32_t height,
52 uint32_t pressure,
53 int32_t velocity_x,
54 int32_t velocity_y,
55 uint32_t flags,
56 struct wl_array *rawdata) override;
57 void touch_extension_configure(uint32_t flags) override;
58
59 void sendTouchEvent();
60
61 QList<QWindowSystemInterface::TouchPoint> mTouchPoints;
62 QList<QWindowSystemInterface::TouchPoint> mPrevTouchPoints;
63 QTouchDevice *mTouchDevice = nullptr;
64 uint32_t mTimestamp;
65 int mPointsLeft;
66 uint32_t mFlags;
67 int mMouseSourceId;
68 QPointF mLastMouseLocal;
69 QPointF mLastMouseGlobal;
70 QWindow *mTargetWindow = nullptr;
71 QWaylandInputDevice *mInputDevice = nullptr;
72 };
73
74 }
75
76 QT_END_NAMESPACE
77
78 #endif // QWAYLANDTOUCH_H