Debian Codegraph @

wayland/qtwayland-dev/5.11.3/QtWaylandClient/private/qwaylanddatasource_p.h

raw symbols SCIP
1 // Copyright (C) 2016 The Qt Company Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5 #ifndef QWAYLANDDATASOURCE_H
6 #define QWAYLANDDATASOURCE_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 <QObject>
20
21 #include <QtWaylandClient/private/qwayland-wayland.h>
22 #include <QtWaylandClient/private/qtwaylandclientglobal_p.h>
23
24 QT_REQUIRE_CONFIG(wayland_datadevice);
25
26 QT_BEGIN_NAMESPACE
27
28 class QMimeData;
29
30 namespace QtWaylandClient {
31
32 class QWaylandDataDeviceManager;
33 class QWaylandDisplay;
34
35 class Q_WAYLAND_CLIENT_EXPORT QWaylandDataSource : public QObject, public QtWayland::wl_data_source
36 {
37 Q_OBJECT
38 public:
39 QWaylandDataSource(QWaylandDataDeviceManager *dataDeviceManager, QMimeData *mimeData);
40 ~QWaylandDataSource() override;
41
42 QMimeData *mimeData() const;
43
44 Q_SIGNALS:
45 void targetChanged(const QString &mime_type);
46 void cancelled();
47
48 protected:
49 void data_source_cancelled() override;
50 void data_source_send(const QString &mime_type, int32_t fd) override;
51 void data_source_target(const QString &mime_type) override;
52
53 private:
54 QWaylandDisplay *m_display = nullptr;
55 QMimeData *m_mime_data = nullptr;
56 };
57
58 }
59
60 QT_END_NAMESPACE
61
62 #endif // QWAYLANDDATASOURCE_H