summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylandclipboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandclipboard.h')
-rw-r--r--src/plugins/platforms/wayland/qwaylandclipboard.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandclipboard.h b/src/plugins/platforms/wayland/qwaylandclipboard.h
index dc51854..f45fb8d 100644
--- a/src/plugins/platforms/wayland/qwaylandclipboard.h
+++ b/src/plugins/platforms/wayland/qwaylandclipboard.h
@@ -44,18 +44,27 @@
#include <QtGui/QPlatformClipboard>
#include <QtCore/QStringList>
+#include <QtCore/QVariant>
class QWaylandDisplay;
class QWaylandSelection;
+class QWaylandMimeData;
struct wl_selection_offer;
+class QWaylandClipboardSignalEmitter : public QObject
+{
+ Q_OBJECT
+public slots:
+ void emitChanged();
+};
+
class QWaylandClipboard : public QPlatformClipboard
{
public:
QWaylandClipboard(QWaylandDisplay *display);
~QWaylandClipboard();
- const QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) const;
+ QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard);
void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard);
bool supportsMode(QClipboard::Mode mode) const;
@@ -63,6 +72,8 @@ public:
void createSelectionOffer(uint32_t id);
+ QVariant retrieveData(const QString &mimeType, QVariant::Type type) const;
+
private:
static void offer(void *data,
struct wl_selection_offer *selection_offer,
@@ -76,11 +87,11 @@ private:
static void forceRoundtrip(struct wl_display *display);
QWaylandDisplay *mDisplay;
- QWaylandSelection *mSelection;
- mutable QMimeData *mMimeDataIn;
+ QWaylandMimeData *mMimeDataIn;
QList<QWaylandSelection *> mSelections;
QStringList mOfferedMimeTypes;
struct wl_selection_offer *mOffer;
+ QWaylandClipboardSignalEmitter mEmitter;
};
#endif // QWAYLANDCLIPBOARD_H