Changeset View
Changeset View
Standalone View
Standalone View
src/client/datadevicemanager.h
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | |||||
59 | * | 59 | * | ||
60 | * @see Registry | 60 | * @see Registry | ||
61 | **/ | 61 | **/ | ||
62 | class KWAYLANDCLIENT_EXPORT DataDeviceManager : public QObject | 62 | class KWAYLANDCLIENT_EXPORT DataDeviceManager : public QObject | ||
63 | { | 63 | { | ||
64 | Q_OBJECT | 64 | Q_OBJECT | ||
65 | public: | 65 | public: | ||
66 | /** | 66 | /** | ||
67 | * Drag and Drop actions supported by DataSource and DataOffer. | ||||
68 | * @since 5.42 | ||||
69 | **/ | ||||
70 | enum class DnDAction { | ||||
71 | None = 0, | ||||
72 | Copy = 1 << 0, | ||||
73 | Move = 1 << 1, | ||||
74 | Ask = 1 << 2 | ||||
broulik: Should `Ask` perhaps become a bigger number in case stuff gets added in the middle later like… | |||||
It would be incompatible. The values are the same as the flags from the wayland protocol graesslin: It would be incompatible. The values are the same as the flags from the wayland protocol | |||||
75 | }; | ||||
76 | Q_DECLARE_FLAGS(DnDActions, DnDAction) | ||||
77 | | ||||
78 | /** | ||||
67 | * Creates a new Compositor. | 79 | * Creates a new Compositor. | ||
68 | * Note: after constructing the Compositor it is not yet valid and one needs | 80 | * Note: after constructing the Compositor it is not yet valid and one needs | ||
69 | * to call setup. In order to get a ready to use Compositor prefer using | 81 | * to call setup. In order to get a ready to use Compositor prefer using | ||
70 | * Registry::createCompositor. | 82 | * Registry::createCompositor. | ||
71 | **/ | 83 | **/ | ||
72 | explicit DataDeviceManager(QObject *parent = nullptr); | 84 | explicit DataDeviceManager(QObject *parent = nullptr); | ||
73 | virtual ~DataDeviceManager(); | 85 | virtual ~DataDeviceManager(); | ||
74 | 86 | | |||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | |||||
134 | private: | 146 | private: | ||
135 | class Private; | 147 | class Private; | ||
136 | QScopedPointer<Private> d; | 148 | QScopedPointer<Private> d; | ||
137 | }; | 149 | }; | ||
138 | 150 | | |||
139 | } | 151 | } | ||
140 | } | 152 | } | ||
141 | 153 | | |||
154 | Q_DECLARE_OPERATORS_FOR_FLAGS(KWayland::Client::DataDeviceManager::DnDActions) | ||||
155 | | ||||
142 | #endif | 156 | #endif |
Should Ask perhaps become a bigger number in case stuff gets added in the middle later like Link or is that unlikely/incompatible?