kwin/src/wayland/datasource_interface.h
Vlad Zahorodnii bdb138bdcd Remove @since version tags
Currently, we have a mix of Frameworks versions and Plasma versions in
@since tags, which leads to some confusion. Since this is an unstable
library, one cannot rely on since version tags, we are free to add,
change, and remove apis to serve best to kwin requirements. Thus, we can
simply remove all since version tags to fix mixing up different product
versions.
2021-03-16 10:08:21 +02:00

62 lines
1.6 KiB
C++

/*
SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
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
*/
#pragma once
#include "abstract_data_source.h"
#include <KWaylandServer/kwaylandserver_export.h>
#include "datadevicemanager_interface.h"
namespace KWaylandServer
{
class DataSourceInterfacePrivate;
/**
* @brief Represents the Resource for the wl_data_source interface.
**/
class KWAYLANDSERVER_EXPORT DataSourceInterface : public AbstractDataSource
{
Q_OBJECT
public:
virtual ~DataSourceInterface();
void accept(const QString &mimeType) override;
void requestData(const QString &mimeType, qint32 fd) override;
void cancel() override;
QStringList mimeTypes() const override;
static DataSourceInterface *get(wl_resource *native);
/**
* @returns The Drag and Drop actions supported by this DataSourceInterface.
**/
DataDeviceManagerInterface::DnDActions supportedDragAndDropActions() const override;
void dropPerformed() override;
void dndFinished() override;
void dndAction(DataDeviceManagerInterface::DnDAction action) override;
wl_resource *resource() const;
wl_client *client() const override;
bool isAccepted() const;
void setAccepted(bool accepted);
private:
friend class DataDeviceManagerInterfacePrivate;
explicit DataSourceInterface(DataDeviceManagerInterface *parent, wl_resource *parentResource);
QScopedPointer<DataSourceInterfacePrivate> d;
};
}
Q_DECLARE_METATYPE(KWaylandServer::DataSourceInterface*)