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
4#ifndef WLDATASOURCE_H
5#define WLDATASOURCE_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 <QObject>
21#include <QtCore/QList>
22
24
25QT_BEGIN_NAMESPACE
26
27namespace QtWayland {
28
29class DataOffer;
30class DataDevice;
32
34{
35public:
36 DataSource(struct wl_client *client, uint32_t id, uint32_t time);
38 uint32_t time() const;
39 QList<QString> mimeTypes() const;
40
41 void accept(const QString &mimeType);
42 void send(const QString &mimeType,int fd);
43 void cancel();
44
46 void setDevice(DataDevice *device);
47
48 static DataSource *fromResource(struct ::wl_resource *resource);
49
50protected:
51 void data_source_offer(Resource *resource, const QString &mime_type) override;
52 void data_source_destroy(Resource *resource) override;
53 void data_source_destroy_resource(Resource *resource) override;
54
55private:
56 uint32_t m_time;
57 QList<QString> m_mimeTypes;
58
59 DataDevice *m_device = nullptr;
60 DataDeviceManager *m_manager = nullptr;
61};
62
63}
64
65QT_END_NAMESPACE
66
67#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)