KWin
Loading...
Searching...
No Matches
dataoffer.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
3 SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7#pragma once
8
9#include "kwin_export.h"
10
11#include <QObject>
12
13#include "datadevicemanager.h"
14
15#include <optional>
16
17namespace KWin
18{
19class DataDeviceInterface;
20class AbstractDataSource;
21class DataOfferInterfacePrivate;
22
27class KWIN_EXPORT DataOfferInterface : public QObject
28{
29 Q_OBJECT
30public:
32
33 void sendAllOffers();
34 void sendSourceActions();
35 wl_resource *resource() const;
36
40 std::optional<DataDeviceManagerInterface::DnDActions> supportedDragAndDropActions() const;
41
45 std::optional<DataDeviceManagerInterface::DnDAction> preferredDragAndDropAction() const;
46
51 void dndAction(DataDeviceManagerInterface::DnDAction action);
52
53Q_SIGNALS:
58
59private:
61 explicit DataOfferInterface(AbstractDataSource *source, wl_resource *resource);
62
63 std::unique_ptr<DataOfferInterfacePrivate> d;
64};
65
66}
67
The AbstractDataSource class abstracts the data that can be transferred to another client.
Represents the Resource for the wl_data_offer interface.
Definition dataoffer.h:28
Q_DECLARE_METATYPE(KWin::SwitchEvent::State)