KWin
Loading...
Searching...
No Matches
datasource_p.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
3 SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#pragma once
9
10#include <qwayland-server-wayland.h>
11
12#include "datadevicemanager.h"
13
14namespace KWin
15{
16class DataSourceInterface;
17class XdgToplevelDragV1Interface;
18
19class DataSourceInterfacePrivate : public QtWaylandServer::wl_data_source
20{
21public:
22 DataSourceInterfacePrivate(DataSourceInterface *_q, ::wl_resource *resource);
23
25
27 QStringList mimeTypes;
28 DataDeviceManagerInterface::DnDActions supportedDnDActions = DataDeviceManagerInterface::DnDAction::None;
29 DataDeviceManagerInterface::DnDAction selectedDndAction = DataDeviceManagerInterface::DnDAction::None;
30 bool isAccepted = false;
31 bool dropPerformed = false;
32 bool isCanceled = false;
34
35protected:
36 void data_source_destroy_resource(Resource *resource) override;
37 void data_source_offer(Resource *resource, const QString &mime_type) override;
38 void data_source_destroy(Resource *resource) override;
39 void data_source_set_actions(Resource *resource, uint32_t dnd_actions) override;
40
41private:
42 void offer(const QString &mimeType);
43};
44}
Represents the Resource for the wl_data_source interface.
Definition datasource.h:23
DataDeviceManagerInterface::DnDAction selectedDndAction
DataSourceInterfacePrivate(DataSourceInterface *_q, ::wl_resource *resource)
void data_source_offer(Resource *resource, const QString &mime_type) override
void data_source_destroy(Resource *resource) override
XdgToplevelDragV1Interface * xdgToplevelDrag
DataDeviceManagerInterface::DnDActions supportedDnDActions
void data_source_set_actions(Resource *resource, uint32_t dnd_actions) override
void data_source_destroy_resource(Resource *resource) override
static DataSourceInterfacePrivate * get(DataSourceInterface *dataSource)