1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDTOUCH_H
5#define QWAYLANDTOUCH_H
6
7#include <QtWaylandCompositor/QWaylandCompositorExtension>
8
9#include <QtCore/QObject>
10#include <QtGui/QTouchEvent>
11
12struct wl_resource;
13
14QT_BEGIN_NAMESPACE
15
16class QWaylandTouch;
17class QWaylandTouchPrivate;
18class QWaylandSeat;
19class QWaylandView;
20class QWaylandClient;
21class QWaylandSurface;
22
23class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandTouch : public QWaylandObject
24{
25 Q_OBJECT
26 Q_DECLARE_PRIVATE(QWaylandTouch)
27public:
28 QWaylandTouch(QWaylandSeat *seat, QObject *parent = nullptr);
29
30 QWaylandSeat *seat() const;
31 QWaylandCompositor *compositor() const;
32
33 virtual uint sendTouchPointEvent(QWaylandSurface *surface, int id, const QPointF &position, Qt::TouchPointState state);
34 virtual void sendFrameEvent(QWaylandClient *client);
35 virtual void sendCancelEvent(QWaylandClient *client);
36 virtual void sendFullTouchEvent(QWaylandSurface *surface, QTouchEvent *event);
37
38 virtual void addClient(QWaylandClient *client, uint32_t id, uint32_t version);
39};
40
41QT_END_NAMESPACE
42
43#endif /*QWAYLANDTOUCH_H*/
44

source code of qtwayland/src/compositor/compositor_api/qwaylandtouch.h