summaryrefslogtreecommitdiffstats
path: root/src/compositor/wayland_wrapper/qwldataoffer_p.h
diff options
context:
space:
mode:
authorJan Arne Petersen <jan.petersen@kdab.com>2013-11-01 12:46:22 +0100
committerJørgen Lind <jorgen.lind@digia.com>2013-11-22 15:46:38 +0100
commitd06c04238238c780b6d0019b305b4ae8c99de425 (patch)
treefa5fbf0a960e63b4525168d309ccfc78de4927fc /src/compositor/wayland_wrapper/qwldataoffer_p.h
parent19992cf8f509e178b0cb0e31df28ba30b8020057 (diff)
Add Drag&Drop support to compositor
Change-Id: Ic606ac4dfbb1c55ddb81ac8a912132102753455c Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/compositor/wayland_wrapper/qwldataoffer_p.h')
-rw-r--r--src/compositor/wayland_wrapper/qwldataoffer_p.h32
1 files changed, 12 insertions, 20 deletions
diff --git a/src/compositor/wayland_wrapper/qwldataoffer_p.h b/src/compositor/wayland_wrapper/qwldataoffer_p.h
index 579434450..d29658576 100644
--- a/src/compositor/wayland_wrapper/qwldataoffer_p.h
+++ b/src/compositor/wayland_wrapper/qwldataoffer_p.h
@@ -41,37 +41,29 @@
#ifndef WLDATAOFFER_H
#define WLDATAOFFER_H
-#include <private/qwldatasource_p.h>
-#include <QtCompositor/qwaylandresourcecollection.h>
+#include <qwayland-server-wayland.h>
QT_BEGIN_NAMESPACE
namespace QtWayland
{
-class DataOffer : public ResourceCollection
+class DataSource;
+
+class DataOffer : public QtWaylandServer::wl_data_offer
{
public:
- DataOffer(DataSource *data_source);
+ DataOffer(DataSource *data_source, QtWaylandServer::wl_data_device::Resource *target);
~DataOffer();
- struct wl_resource *addDataDeviceResource(struct wl_resource *client_resource);
-private:
- DataSource *m_data_source;
-
- static void accept(struct wl_client *client,
- struct wl_resource *resource,
- uint32_t time,
- const char *type);
- static void receive(struct wl_client *client,
- struct wl_resource *resource,
- const char *mime_type,
- int32_t fd);
- static void destroy(struct wl_client *client,
- struct wl_resource *resource);
-
- static const struct wl_data_offer_interface data_interface;
+protected:
+ void data_offer_accept(Resource *resource, uint32_t serial, const QString &mime_type) Q_DECL_OVERRIDE;
+ void data_offer_receive(Resource *resource, const QString &mime_type, int32_t fd) Q_DECL_OVERRIDE;
+ void data_offer_destroy(Resource *resource) Q_DECL_OVERRIDE;
+ void data_offer_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
+private:
+ DataSource *m_dataSource;
};
}