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
qwaylandseat_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDSEAT_P_H
5#define QWAYLANDSEAT_P_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 <stdint.h>
19
20#include <QtWaylandCompositor/private/qtwaylandcompositorglobal_p.h>
21#include <QtWaylandCompositor/qwaylandseat.h>
22
23#include <QtCore/QList>
24#include <QtCore/QPoint>
25#include <QtCore/QScopedPointer>
26#include <QtCore/private/qobject_p.h>
27
28#include <QtWaylandCompositor/private/qwayland-server-wayland.h>
29
31
32class QKeyEvent;
33class QTouchEvent;
34class QWaylandSeat;
35class QWaylandDrag;
36class QWaylandView;
37
38namespace QtWayland {
39
40class Compositor;
41class DataDevice;
42class Surface;
43class DataDeviceManager;
44class Pointer;
45class Keyboard;
46class Touch;
47class InputMethod;
48
49}
50
51class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandSeatPrivate : public QObjectPrivate, public QtWaylandServer::wl_seat
52{
53public:
54 Q_DECLARE_PUBLIC(QWaylandSeat)
55
57 ~QWaylandSeatPrivate() override;
58
59 void setCapabilities(QWaylandSeat::CapabilityFlags caps);
60
61 static QWaylandSeatPrivate *get(QWaylandSeat *device) { return device->d_func(); }
62
63#if QT_CONFIG(wayland_datadevice)
64 void clientRequestedDataDevice(QtWayland::DataDeviceManager *dndSelection, struct wl_client *client, uint32_t id);
65 QtWayland::DataDevice *dataDevice() const { return data_device.data(); }
66#endif
67
68protected:
69 void seat_bind_resource(wl_seat::Resource *resource) override;
70
71 void seat_get_pointer(wl_seat::Resource *resource,
72 uint32_t id) override;
73 void seat_get_keyboard(wl_seat::Resource *resource,
74 uint32_t id) override;
75 void seat_get_touch(wl_seat::Resource *resource,
76 uint32_t id) override;
77
78 void seat_destroy_resource(wl_seat::Resource *resource) override;
79
80private:
81 bool isInitialized = false;
83 QWaylandView *mouseFocus = nullptr;
84 QWaylandSurface *keyboardFocus = nullptr;
85 QWaylandSeat::CapabilityFlags capabilities;
86
87 QScopedPointer<QWaylandPointer> pointer;
88 QScopedPointer<QWaylandKeyboard> keyboard;
89 QScopedPointer<QWaylandTouch> touch;
90#if QT_CONFIG(wayland_datadevice)
91 QScopedPointer<QtWayland::DataDevice> data_device;
92# if QT_CONFIG(draganddrop)
93 QScopedPointer<QWaylandDrag> drag_handle;
94# endif
95#endif
96 QScopedPointer<QWaylandKeymap> keymap;
97
98};
99
101
102#endif // QWAYLANDSEAT_P_H
IOBluetoothDevice * device
The QKeyEvent class describes a key event.
Definition qevent.h:424
The QTouchEvent class contains parameters that describe a touch event.
Definition qevent.h:917
\qmltype WaylandCompositor \instantiates QWaylandCompositor \inqmlmodule QtWayland....
static QWaylandSeatPrivate * get(QWaylandSeat *device)
\qmltype WaylandSeat \instantiates QWaylandSeat \inqmlmodule QtWayland.Compositor
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
\qmltype WaylandView \instantiates QWaylandView \inqmlmodule QtWayland.Compositor
Combined button and popup list for selecting options.
@ Keyboard
static QOpenGLCompositor * compositor
GLsizei const void * pointer
Definition qopenglext.h:384
QT_BEGIN_NAMESPACE typedef QQmlListCompositor Compositor