4#ifndef WLDATADEVICEMANAGER_H
5#define WLDATADEVICEMANAGER_H
18#include <QtCore/QList>
20#include <QtGui/QClipboard>
21#include <QtCore/QMimeData>
23#include <QtWaylandCompositor/QWaylandCompositor>
25#include <QtWaylandCompositor/private/qwayland-server-wayland.h>
26#include <QtWaylandCompositor/private/qtwaylandcompositorglobal_p.h>
49 struct wl_display *
display()
const;
58 void data_device_manager_create_data_source(Resource *resource, uint32_t id)
override;
66 void finishReadFromClient(
bool exhausted =
false);
68 QWaylandCompositor *m_compositor =
nullptr;
69 QList<DataDevice *> m_data_device_list;
71 DataSource *m_current_selection_source =
nullptr;
73 QMimeData m_retainedData;
74 QSocketNotifier *m_retainedReadNotifier =
nullptr;
75 QList<QSocketNotifier *> m_obsoleteRetainedReadNotifiers;
76 int m_retainedReadIndex = 0;
77 QByteArray m_retainedReadBuf;
79 bool m_compositorOwnsSelection =
false;
83 struct wl_resource *resource,
86 static void comp_receive(
struct wl_client *client,
87 struct wl_resource *resource,
88 const char *mime_type,
90 static void comp_destroy(
struct wl_client *client,
91 struct wl_resource *resource);
93 static const struct wl_data_offer_interface compositor_offer_interface;
bool offerFromCompositorToClient(wl_resource *clientDataDeviceResource)
struct wl_display * display() const
void overrideSelection(const QMimeData &mimeData)
void sourceDestroyed(DataSource *source)
void offerRetainedSelection(wl_resource *clientDataDeviceResource)
DataSource * currentSelectionSource()
void setCurrentSelectionSource(DataSource *source)
DataDevice(QWaylandSeat *seat)
void sourceDestroyed(DataSource *source)
void setFocus(QWaylandClient *client)
void data_offer_receive(Resource *resource, const QString &mime_type, int32_t fd) override
DataOffer(DataSource *data_source, QtWaylandServer::wl_data_device::Resource *target)
void data_offer_destroy_resource(Resource *resource) override
void data_offer_accept(Resource *resource, uint32_t serial, const QString &mime_type) override
void data_offer_destroy(Resource *resource) override
void send(const QString &mimeType, int fd)
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
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG(wayland_datadevice)