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
qwlqttouch_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef WLTOUCH_H
5#define WLTOUCH_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtWaylandCompositor/private/qwayland-server-touch-extension.h>
19#include <QtWaylandCompositor/QWaylandCompositor>
20#include <QtWaylandCompositor/QWaylandCompositorExtensionTemplate>
21#include <QtCore/private/qglobal_p.h>
22
23#include <wayland-util.h>
24
26
27class Surface;
28class QTouchEvent;
29class QWaylandView;
30
31namespace QtWayland {
32
33class TouchExtensionGlobal : public QWaylandCompositorExtensionTemplate<TouchExtensionGlobal>, public QtWaylandServer::qt_touch_extension
34{
37public:
38
40 None = 0x00,
41 MouseFromTouch = 0x01
42 };
43 Q_DECLARE_FLAGS(BehaviorFlags, BehaviorFlag)
44
46 ~TouchExtensionGlobal() override;
47
49
50 void setBehviorFlags(BehaviorFlags flags);
51 BehaviorFlags behaviorFlags() const { return m_flags; }
52
55
56protected:
57 void touch_extension_bind_resource(Resource *resource) override;
58 void touch_extension_destroy_resource(Resource *resource) override;
59
60private:
61 QWaylandCompositor *m_compositor = nullptr;
62 BehaviorFlags m_flags = BehaviorFlag::None;
63 QList<Resource *> m_resources;
64 QList<float> m_posData;
65};
66
67Q_DECLARE_OPERATORS_FOR_FLAGS(TouchExtensionGlobal::BehaviorFlags)
68
69}
70
72
73#endif // WLTOUCH_H
The QTouchEvent class contains parameters that describe a touch event.
Definition qevent.h:917
\qmltype WaylandCompositor \instantiates QWaylandCompositor \inqmlmodule QtWayland....
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
\qmltype WaylandView \instantiates QWaylandView \inqmlmodule QtWayland.Compositor
TouchExtensionGlobal(QWaylandCompositor *compositor)
void setBehviorFlags(BehaviorFlags flags)
void touch_extension_bind_resource(Resource *resource) override
void touch_extension_destroy_resource(Resource *resource) override
bool postTouchEvent(QTouchEvent *event, QWaylandSurface *surface)
BehaviorFlags behaviorFlags() const
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
static QOpenGLCompositor * compositor
GLbitfield flags
struct _cl_event * event
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS