kwin/src/wayland/datadevicemanager_interface.h

55 lines
1.3 KiB
C
Raw Normal View History

/*
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
*/
2021-03-10 16:08:30 +00:00
#pragma once
#include <QObject>
2020-04-29 14:56:38 +00:00
#include <KWaylandServer/kwaylandserver_export.h>
#include "datadevice_interface.h"
2020-04-29 14:56:38 +00:00
namespace KWaylandServer
{
class Display;
class DataSourceInterface;
class DataDeviceManagerInterfacePrivate;
2015-09-10 11:36:42 +00:00
/**
* @brief Represents the Global for wl_data_device_manager interface.
*
*/
class KWAYLANDSERVER_EXPORT DataDeviceManagerInterface : public QObject
{
Q_OBJECT
public:
explicit DataDeviceManagerInterface(Display *display, QObject *parent = nullptr);
~DataDeviceManagerInterface() override;
/**
* Drag and Drop actions supported by the DataSourceInterface.
*/
enum class DnDAction {
None = 0,
Copy = 1 << 0,
Move = 1 << 1,
2021-04-29 09:45:00 +00:00
Ask = 1 << 2,
};
Q_DECLARE_FLAGS(DnDActions, DnDAction)
Q_SIGNALS:
2020-04-29 14:56:38 +00:00
void dataSourceCreated(KWaylandServer::DataSourceInterface*);
void dataDeviceCreated(KWaylandServer::DataDeviceInterface*);
private:
QScopedPointer<DataDeviceManagerInterfacePrivate> d;
};
}
2020-04-29 14:56:38 +00:00
Q_DECLARE_OPERATORS_FOR_FLAGS(KWaylandServer::DataDeviceManagerInterface::DnDActions)