Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
5#ifndef QTWAYLAND_QWLTOUCH_P_H
6#define QTWAYLAND_QWLTOUCH_P_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 <QtWaylandCompositor/qtwaylandcompositorglobal.h>
20#include <QtWaylandCompositor/QWaylandDestroyListener>
21#include <QtWaylandCompositor/QWaylandTouch>
22#include <QtWaylandCompositor/QWaylandSeat>
23#include <QtWaylandCompositor/QWaylandView>
24#include <QtWaylandCompositor/QWaylandCompositor>
25
26#include <QtCore/QPoint>
27#include <QtCore/qvarlengtharray.h>
28#include <QtCore/private/qobject_p.h>
29
30#include <QtWaylandCompositor/private/qwayland-server-wayland.h>
31
33
34class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandTouchPrivate : public QObjectPrivate, public QtWaylandServer::wl_touch
35{
36 Q_DECLARE_PUBLIC(QWaylandTouch)
37public:
38 explicit QWaylandTouchPrivate(QWaylandTouch *touch, QWaylandSeat *seat);
39
40 QWaylandCompositor *compositor() const { return seat->compositor(); }
41
42 uint sendDown(QWaylandSurface *surface, uint32_t time, int touch_id, const QPointF &position);
43 void sendMotion(QWaylandClient *client, uint32_t time, int touch_id, const QPointF &position);
44 uint sendUp(QWaylandClient *client, uint32_t time, int touch_id);
45
46private:
47 void touch_release(Resource *resource) override;
48 int toSequentialWaylandId(int touchId);
49
50 QWaylandSeat *seat = nullptr;
51 QVarLengthArray<int, 10> ids;
52};
53
55
56#endif // QTWAYLAND_QWLTOUCH_P_H
\inmodule QtCore\reentrant
Definition qpoint.h:217
\qmltype WaylandClient \instantiates QWaylandClient \inqmlmodule QtWayland.Compositor
\qmltype WaylandCompositor \instantiates QWaylandCompositor \inqmlmodule QtWayland....
\qmltype WaylandSeat \instantiates QWaylandSeat \inqmlmodule QtWayland.Compositor
QWaylandCompositor * compositor() const
Returns the compositor for this QWaylandSeat.
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
QWaylandCompositor * compositor() const
\inmodule QtWaylandCompositor
Combined button and popup list for selecting options.
GLenum GLenum GLsizei const GLuint * ids
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
unsigned int uint
Definition qtypes.h:34