Changeset View
Changeset View
Standalone View
Standalone View
src/server/datadevicemanager_interface.h
Show All 19 Lines | |||||
20 | #ifndef WAYLAND_SERVER_DATA_DEVICE_MANAGER_INTERFACE_H | 20 | #ifndef WAYLAND_SERVER_DATA_DEVICE_MANAGER_INTERFACE_H | ||
21 | #define WAYLAND_SERVER_DATA_DEVICE_MANAGER_INTERFACE_H | 21 | #define WAYLAND_SERVER_DATA_DEVICE_MANAGER_INTERFACE_H | ||
22 | 22 | | |||
23 | #include <QObject> | 23 | #include <QObject> | ||
24 | 24 | | |||
25 | #include <KWayland/Server/kwaylandserver_export.h> | 25 | #include <KWayland/Server/kwaylandserver_export.h> | ||
26 | #include "global.h" | 26 | #include "global.h" | ||
27 | #include "datadevice_interface.h" | 27 | #include "datadevice_interface.h" | ||
28 | #include "datasource_interface.h" | | |||
29 | 28 | | |||
30 | namespace KWayland | 29 | namespace KWayland | ||
31 | { | 30 | { | ||
32 | namespace Server | 31 | namespace Server | ||
33 | { | 32 | { | ||
34 | 33 | | |||
35 | class Display; | 34 | class Display; | ||
35 | class DataSourceInterface; | ||||
36 | 36 | | |||
37 | /** | 37 | /** | ||
38 | * @brief Represents the Global for wl_data_device_manager interface. | 38 | * @brief Represents the Global for wl_data_device_manager interface. | ||
39 | * | 39 | * | ||
40 | **/ | 40 | **/ | ||
41 | class KWAYLANDSERVER_EXPORT DataDeviceManagerInterface : public Global | 41 | class KWAYLANDSERVER_EXPORT DataDeviceManagerInterface : public Global | ||
42 | { | 42 | { | ||
43 | Q_OBJECT | 43 | Q_OBJECT | ||
44 | public: | 44 | public: | ||
45 | virtual ~DataDeviceManagerInterface(); | 45 | virtual ~DataDeviceManagerInterface(); | ||
46 | 46 | | |||
47 | /** | ||||
48 | * Drag and Drop actions supported by the DataSourceInterface. | ||||
49 | * @since 5.XX | ||||
50 | **/ | ||||
51 | enum class DnDAction { | ||||
52 | None = 0, | ||||
53 | Copy = 1 << 0, | ||||
54 | Move = 1 << 1, | ||||
55 | Ask = 1 << 2 | ||||
56 | }; | ||||
57 | Q_DECLARE_FLAGS(DnDActions, DnDAction) | ||||
58 | | ||||
47 | Q_SIGNALS: | 59 | Q_SIGNALS: | ||
48 | void dataSourceCreated(KWayland::Server::DataSourceInterface*); | 60 | void dataSourceCreated(KWayland::Server::DataSourceInterface*); | ||
49 | void dataDeviceCreated(KWayland::Server::DataDeviceInterface*); | 61 | void dataDeviceCreated(KWayland::Server::DataDeviceInterface*); | ||
50 | 62 | | |||
51 | private: | 63 | private: | ||
52 | explicit DataDeviceManagerInterface(Display *display, QObject *parent = nullptr); | 64 | explicit DataDeviceManagerInterface(Display *display, QObject *parent = nullptr); | ||
53 | friend class Display; | 65 | friend class Display; | ||
54 | class Private; | 66 | class Private; | ||
55 | }; | 67 | }; | ||
56 | 68 | | |||
57 | } | 69 | } | ||
58 | } | 70 | } | ||
59 | 71 | | |||
72 | Q_DECLARE_OPERATORS_FOR_FLAGS(KWayland::Server::DataDeviceManagerInterface::DnDActions) | ||||
73 | | ||||
60 | #endif | 74 | #endif |