1/*
2 SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef WAYLANDCLIPBOARD_H
8#define WAYLANDCLIPBOARD_H
9
10#include "ksystemclipboard.h"
11
12#include <memory>
13
14class DataControlDevice;
15class DataControlDeviceManager;
16class KeyboardFocusWatcher;
17
18class WaylandClipboard : public KSystemClipboard
19{
20public:
21 WaylandClipboard(QObject *parent);
22 ~WaylandClipboard();
23 void setMimeData(QMimeData *mime, QClipboard::Mode mode) override;
24 void clear(QClipboard::Mode mode) override;
25 const QMimeData *mimeData(QClipboard::Mode mode) const override;
26
27 bool isValid();
28
29private:
30 void gainedFocus();
31 std::unique_ptr<KeyboardFocusWatcher> m_keyboardFocusWatcher;
32 std::unique_ptr<DataControlDeviceManager> m_manager;
33 std::unique_ptr<DataControlDevice> m_device;
34};
35
36#endif
37

source code of kguiaddons/src/systemclipboard/waylandclipboard_p.h