5#ifndef WLDATADEVICEMANAGER_H
6#define WLDATADEVICEMANAGER_H
19#include <QtCore/QList>
21#include <QtGui/QClipboard>
22#include <QtCore/QMimeData>
24#include <QtWaylandCompositor/QWaylandCompositor>
26#include <QtWaylandCompositor/private/qwayland-server-wayland.h>
27#include <QtWaylandCompositor/private/qtwaylandcompositorglobal_p.h>
50 struct wl_display *
display()
const;
59 void data_device_manager_create_data_source(Resource *resource, uint32_t id)
override;
67 void finishReadFromClient(
bool exhausted =
false);
69 QWaylandCompositor *m_compositor =
nullptr;
70 QList<DataDevice *> m_data_device_list;
72 DataSource *m_current_selection_source =
nullptr;
74 QMimeData m_retainedData;
75 QSocketNotifier *m_retainedReadNotifier =
nullptr;
76 QList<QSocketNotifier *> m_obsoleteRetainedReadNotifiers;
77 int m_retainedReadIndex = 0;
78 QByteArray m_retainedReadBuf;
80 bool m_compositorOwnsSelection =
false;
84 struct wl_resource *resource,
87 static void comp_receive(
struct wl_client *client,
88 struct wl_resource *resource,
89 const char *mime_type,
91 static void comp_destroy(
struct wl_client *client,
92 struct wl_resource *resource);
94 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
Combined button and popup list for selecting options.
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG(wayland_datadevice)