| 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 | |
| 12 | struct wl_resource; |
| 13 | |
| 14 | QT_BEGIN_NAMESPACE |
| 15 | |
| 16 | class QWaylandTouch; |
| 17 | class QWaylandTouchPrivate; |
| 18 | class QWaylandSeat; |
| 19 | class QWaylandView; |
| 20 | class QWaylandClient; |
| 21 | class QWaylandSurface; |
| 22 | |
| 23 | class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandTouch : public QWaylandObject |
| 24 | { |
| 25 | Q_OBJECT |
| 26 | Q_DECLARE_PRIVATE(QWaylandTouch) |
| 27 | public: |
| 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 | |
| 41 | QT_END_NAMESPACE |
| 42 | |
| 43 | #endif /*QWAYLANDTOUCH_H*/ |
| 44 |
