KWin
Loading...
Searching...
No Matches
src
wayland
datasource.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
#pragma once
8
9
#include "kwin_export.h"
10
11
#include "
abstract_data_source.h
"
12
#include "
datadevicemanager.h
"
13
14
namespace
KWin
15
{
16
class
DataSourceInterfacePrivate;
17
class
XdgToplevelDragV1Interface;
18
22
class
KWIN_EXPORT
DataSourceInterface
:
public
AbstractDataSource
23
{
24
Q_OBJECT
25
public
:
26
virtual
~DataSourceInterface
();
27
28
void
accept(
const
QString &mimeType)
override
;
29
void
requestData(
const
QString &mimeType, qint32 fd)
override
;
30
void
cancel()
override
;
31
32
QStringList mimeTypes()
const override
;
33
34
static
DataSourceInterface
*get(wl_resource *native);
35
39
DataDeviceManagerInterface::DnDActions supportedDragAndDropActions()
const override
;
40
DataDeviceManagerInterface::DnDAction
selectedDndAction()
const override
;
41
void
dropPerformed()
override
;
42
void
dndFinished()
override
;
43
void
dndAction(
DataDeviceManagerInterface::DnDAction
action)
override
;
44
void
dndCancelled()
override
;
45
46
bool
isDndCancelled()
const
;
47
bool
isDropPerformed()
const
;
48
49
wl_resource *resource()
const
;
50
51
wl_client *client()
const override
;
52
53
bool
isAccepted()
const override
;
54
void
setAccepted(
bool
accepted);
55
56
XdgToplevelDragV1Interface
*xdgToplevelDrag()
const
;
57
58
private
:
59
friend
class
DataDeviceManagerInterfacePrivate
;
60
friend
class
DataSourceInterfacePrivate
;
61
explicit
DataSourceInterface
(wl_resource *resource);
62
63
std::unique_ptr<DataSourceInterfacePrivate> d;
64
};
65
66
}
67
68
Q_DECLARE_METATYPE
(
KWin::DataSourceInterface
*)
abstract_data_source.h
KWin::AbstractDataSource
The AbstractDataSource class abstracts the data that can be transferred to another client.
Definition
abstract_data_source.h:29
KWin::DataDeviceManagerInterface::DnDAction
DnDAction
Definition
datadevicemanager.h:37
KWin::DataDeviceManagerInterfacePrivate
Definition
datadevicemanager.cpp:19
KWin::DataSourceInterface
Represents the Resource for the wl_data_source interface.
Definition
datasource.h:23
KWin::DataSourceInterface::~DataSourceInterface
virtual ~DataSourceInterface()
KWin::DataSourceInterfacePrivate
Definition
datasource_p.h:20
KWin::XdgToplevelDragV1Interface
Definition
xdgtopleveldrag_v1.h:28
datadevicemanager.h
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(KWin::SwitchEvent::State)
KWin
Definition
activation_test.cpp:20
Generated on Sat Feb 17 2024 01:42:10 for KWin by
1.10.0