Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwldatasource_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// Qt-Security score:critical reason:network-protocol
4
5#ifndef WLDATASOURCE_H
6#define WLDATASOURCE_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/private/qwayland-server-wayland.h>
20#include <QtWaylandCompositor/private/qtwaylandcompositorglobal_p.h>
21#include <QObject>
22#include <QtCore/QList>
23
25
26QT_BEGIN_NAMESPACE
27
28namespace QtWayland {
29
30class DataOffer;
31class DataDevice;
33
35{
36public:
37 DataSource(struct wl_client *client, uint32_t id, uint32_t time);
39 uint32_t time() const;
40 QList<QString> mimeTypes() const;
41
42 void accept(const QString &mimeType);
43 void send(const QString &mimeType,int fd);
44 void cancel();
45
47 void setDevice(DataDevice *device);
48
49 static DataSource *fromResource(struct ::wl_resource *resource);
50
51protected:
52 void data_source_offer(Resource *resource, const QString &mime_type) override;
53 void data_source_destroy(Resource *resource) override;
54 void data_source_destroy_resource(Resource *resource) override;
55
56private:
57 uint32_t m_time;
58 QList<QString> m_mimeTypes;
59
60 DataDevice *m_device = nullptr;
61 DataDeviceManager *m_manager = nullptr;
62};
63
64}
65
66QT_END_NAMESPACE
67
68#endif // WLDATASOURCE_H
DataDevice(QWaylandSeat *seat)
void sourceDestroyed(DataSource *source)
void setFocus(QWaylandClient *client)
void send(const QString &mimeType, int fd)
uint32_t time() const
void setManager(DataDeviceManager *mgr)
void data_source_destroy_resource(Resource *resource) override
void data_source_offer(Resource *resource, const QString &mime_type) override
void setDevice(DataDevice *device)
void accept(const QString &mimeType)
void data_source_destroy(Resource *resource) override
QList< QString > mimeTypes() const
Combined button and popup list for selecting options.
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG(wayland_datadevice)