2020-05-12 11:26:57 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
|
|
*/
|
2021-03-10 16:08:30 +00:00
|
|
|
#pragma once
|
2020-05-12 11:26:57 +00:00
|
|
|
|
2022-04-22 09:27:33 +00:00
|
|
|
#include "kwin_export.h"
|
2020-05-12 11:26:57 +00:00
|
|
|
|
2022-04-22 09:27:33 +00:00
|
|
|
#include "abstract_data_source.h"
|
2023-09-13 05:52:59 +00:00
|
|
|
#include "datacontroldevicemanager_v1.h"
|
2020-05-12 11:26:57 +00:00
|
|
|
|
2023-09-13 17:59:29 +00:00
|
|
|
namespace KWin
|
2020-05-12 11:26:57 +00:00
|
|
|
{
|
2020-05-28 07:25:56 +00:00
|
|
|
class DataControlSourceV1InterfacePrivate;
|
2020-05-12 11:26:57 +00:00
|
|
|
|
|
|
|
/**
|
2020-05-28 07:44:46 +00:00
|
|
|
* The DataControlSourceV1Interface class represents the source side in a data transfer.
|
|
|
|
*
|
|
|
|
* DataControlSourceV1Interface corresponds to the wayland interface zwlr_data_control_source_v1.
|
|
|
|
*/
|
2022-04-22 09:27:33 +00:00
|
|
|
class KWIN_EXPORT DataControlSourceV1Interface : public AbstractDataSource
|
2020-05-12 11:26:57 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2020-05-28 07:21:32 +00:00
|
|
|
|
2020-05-12 11:26:57 +00:00
|
|
|
public:
|
2020-05-28 07:25:56 +00:00
|
|
|
~DataControlSourceV1Interface() override;
|
2020-05-12 11:26:57 +00:00
|
|
|
|
|
|
|
void requestData(const QString &mimeType, qint32 fd) override;
|
|
|
|
void cancel() override;
|
|
|
|
|
|
|
|
QStringList mimeTypes() const override;
|
2020-06-25 15:27:52 +00:00
|
|
|
wl_client *client() const override;
|
2020-05-12 11:26:57 +00:00
|
|
|
|
2020-05-28 07:25:56 +00:00
|
|
|
static DataControlSourceV1Interface *get(wl_resource *native);
|
2020-05-12 11:26:57 +00:00
|
|
|
|
|
|
|
private:
|
2020-05-28 07:25:56 +00:00
|
|
|
friend class DataControlDeviceManagerV1InterfacePrivate;
|
|
|
|
explicit DataControlSourceV1Interface(DataControlDeviceManagerV1Interface *parent, ::wl_resource *resource);
|
2020-05-12 11:26:57 +00:00
|
|
|
|
2022-08-01 21:29:02 +00:00
|
|
|
std::unique_ptr<DataControlSourceV1InterfacePrivate> d;
|
2020-05-12 11:26:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2023-09-13 17:59:29 +00:00
|
|
|
Q_DECLARE_METATYPE(KWin::DataControlSourceV1Interface *)
|