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
qwldatadevice_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 WLDATADEVICE_H
5#define WLDATADEVICE_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-wayland.h>
19#include <QtWaylandCompositor/private/qtwaylandcompositorglobal_p.h>
20#include <QtWaylandCompositor/QWaylandSeat>
21
22QT_REQUIRE_CONFIG(wayland_datadevice);
23
25
26namespace QtWayland {
27
28class Compositor;
29class DataSource;
30class Seat;
31class Surface;
32
33class DataDevice : public QtWaylandServer::wl_data_device
34{
35public:
37
38 void setFocus(QWaylandClient *client);
40
41#if QT_CONFIG(draganddrop)
42 void setDragFocus(QWaylandSurface *focus, const QPointF &localPosition);
43
44 QWaylandSurface *dragIcon() const;
45 QWaylandSurface *dragOrigin() const;
46
47 void dragMove(QWaylandSurface *target, const QPointF &pos);
48 void drop();
49 void cancelDrag();
50#endif
51
52protected:
53#if QT_CONFIG(draganddrop)
54 void data_device_start_drag(Resource *resource, struct ::wl_resource *source, struct ::wl_resource *origin, struct ::wl_resource *icon, uint32_t serial) override;
55#endif
56 void data_device_set_selection(Resource *resource, struct ::wl_resource *source, uint32_t serial) override;
57
58private:
59#if QT_CONFIG(draganddrop)
60 void setDragIcon(QWaylandSurface *icon);
61#endif
62
63 QWaylandCompositor *m_compositor = nullptr;
64 QWaylandSeat *m_seat = nullptr;
65
66 DataSource *m_selectionSource = nullptr;
67
68#if QT_CONFIG(draganddrop)
69 struct ::wl_client *m_dragClient = nullptr;
70 DataSource *m_dragDataSource = nullptr;
71
72 QWaylandSurface *m_dragFocus = nullptr;
73 Resource *m_dragFocusResource = nullptr;
74
75 QWaylandSurface *m_dragIcon = nullptr;
76 QWaylandSurface *m_dragOrigin = nullptr;
77#endif
78};
79
80}
81
83
84#endif // WLDATADEVICE_H
\inmodule QtCore\reentrant
Definition qpoint.h:217
\qmltype WaylandClient \instantiates QWaylandClient \inqmlmodule QtWayland.Compositor
\qmltype WaylandCompositor \instantiates QWaylandCompositor \inqmlmodule QtWayland....
\qmltype WaylandSeat \instantiates QWaylandSeat \inqmlmodule QtWayland.Compositor
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
void data_device_set_selection(Resource *resource, struct ::wl_resource *source, uint32_t serial) override
DataDevice(QWaylandSeat *seat)
void sourceDestroyed(DataSource *source)
void setFocus(QWaylandClient *client)
bool focus
[0]
Combined button and popup list for selecting options.
GLenum target
GLsizei GLsizei GLchar * source
QT_BEGIN_NAMESPACE typedef QQmlListCompositor Compositor
#define QT_REQUIRE_CONFIG(feature)