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
qwaylandpointer_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 QWAYLANDPOINTER_P_H
6#define QWAYLANDPOINTER_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/QWaylandPointer>
22
23#include <QtCore/QList>
24#include <QtCore/QPoint>
25#include <QtCore/QObject>
26#include <QtCore/private/qobject_p.h>
27
28#include <QtWaylandCompositor/private/qwayland-server-wayland.h>
29#include <QtWaylandCompositor/QWaylandView>
30#include <QtWaylandCompositor/QWaylandSurface>
31#include <QtWaylandCompositor/QWaylandSeat>
32
33#include <QtCore/qpointer.h>
34
35#include <stdint.h>
36
38
39class QWaylandView;
40
41class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandPointerPrivate : public QObjectPrivate
42 , public QtWaylandServer::wl_pointer
43{
44 Q_DECLARE_PUBLIC(QWaylandPointer)
45public:
47
48 QWaylandCompositor *compositor() const { return seat->compositor(); }
49
50protected:
51 void pointer_set_cursor(Resource *resource, uint32_t serial, wl_resource *surface, int32_t hotspot_x, int32_t hotspot_y) override;
52 void pointer_release(Resource *resource) override;
53
54private:
55 uint sendButton(Qt::MouseButton button, uint32_t state);
56 void sendMotion();
57 void sendEnter(QWaylandSurface *surface);
58 void sendLeave();
59 void ensureEntered(QWaylandSurface *surface);
60
61 QWaylandSeat *seat = nullptr;
62 QWaylandOutput *output = nullptr;
63 QPointer<QWaylandSurface> enteredSurface;
64
65 QPointF localPosition;
66 QPointF spacePosition;
67
68 uint enterSerial = 0;
69
70 int buttonCount = 0;
71
72 QWaylandDestroyListener enteredSurfaceDestroyListener;
73
74 static QWaylandSurfaceRole s_role;
75};
76
78
79#endif // QWAYLANDPOINTER_P_H
\inmodule QtCore\reentrant
Definition qpoint.h:217
\qmltype WaylandCompositor \instantiates QWaylandCompositor \inqmlmodule QtWayland....
\qmltype WaylandOutput \instantiates QWaylandOutput \inqmlmodule QtWayland.Compositor
QWaylandCompositor * compositor() const
\inmodule QtWaylandCompositor
\qmltype WaylandSeat \instantiates QWaylandSeat \inqmlmodule QtWayland.Compositor
QWaylandCompositor * compositor() const
Returns the compositor for this QWaylandSeat.
\inmodule QtWaylandCompositor
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
\qmltype WaylandView \instantiates QWaylandView \inqmlmodule QtWayland.Compositor
QPushButton * button
[2]
else opt state
[0]
Combined button and popup list for selecting options.
MouseButton
Definition qnamespace.h:56
GLsizei const void * pointer
Definition qopenglext.h:384
unsigned int uint
Definition qtypes.h:34
QT_BEGIN_NAMESPACE typedef uchar * output