Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandtouch_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// Copyright (C) 2017 Klarälvdalens Datakonsult AB (KDAB).
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4// Qt-Security score:critical reason:network-protocol
5
6#ifndef QTWAYLAND_QWLTOUCH_P_H
7#define QTWAYLAND_QWLTOUCH_P_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
21#include <QtWaylandCompositor/QWaylandDestroyListener>
22#include <QtWaylandCompositor/QWaylandTouch>
23#include <QtWaylandCompositor/QWaylandSeat>
24#include <QtWaylandCompositor/QWaylandView>
25#include <QtWaylandCompositor/QWaylandCompositor>
26
27#include <QtCore/QPoint>
28#include <QtCore/qvarlengtharray.h>
29#include <QtCore/private/qobject_p.h>
30
31#include <QtWaylandCompositor/private/qwayland-server-wayland.h>
32
34
35class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandTouchPrivate : public QObjectPrivate, public QtWaylandServer::wl_touch
36{
37 Q_DECLARE_PUBLIC(QWaylandTouch)
38public:
39 explicit QWaylandTouchPrivate(QWaylandTouch *touch, QWaylandSeat *seat);
40
41 QWaylandCompositor *compositor() const { return seat->compositor(); }
42
43 uint sendDown(QWaylandSurface *surface, uint32_t time, int touch_id, const QPointF &position);
44 void sendMotion(QWaylandClient *client, uint32_t time, int touch_id, const QPointF &position);
45 uint sendUp(QWaylandClient *client, uint32_t time, int touch_id);
46
47private:
48 void touch_release(Resource *resource) override;
49 int toSequentialWaylandId(int touchId);
50
51 QWaylandSeat *seat = nullptr;
52 QVarLengthArray<int, 10> ids;
53};
54
55QT_END_NAMESPACE
56
57#endif // QTWAYLAND_QWLTOUCH_P_H
\inmodule QtWaylandCompositor
Combined button and popup list for selecting options.