Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qwldatadevicemanager_p.h
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:critical reason:network-protocol
4
5
#
ifndef
WLDATADEVICEMANAGER_H
6
#
define
WLDATADEVICEMANAGER_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtCore
/
QList
>
20
#
include
<
QtCore
/
QMap
>
21
#
include
<
QtGui
/
QClipboard
>
22
#
include
<
QtCore
/
QMimeData
>
23
24
#
include
<
QtWaylandCompositor
/
QWaylandCompositor
>
25
26
#
include
<
QtWaylandCompositor
/
private
/
qwayland
-
server
-
wayland
.
h
>
27
#
include
<
QtWaylandCompositor
/
private
/
qtwaylandcompositorglobal_p
.
h
>
28
29
QT_REQUIRE_CONFIG
(
wayland_datadevice
);
30
31
QT_BEGIN_NAMESPACE
32
33
class
QSocketNotifier;
34
35
namespace
QtWayland
{
36
37
class
DataDevice
;
38
class
DataSource
;
39
40
class
DataDeviceManager
:
public
QObject
,
public
QtWaylandServer
::
wl_data_device_manager
41
{
42
Q_OBJECT
43
44
public
:
45
DataDeviceManager
(
QWaylandCompositor
*
compositor
);
46
47
void
setCurrentSelectionSource
(
DataSource
*source);
48
DataSource
*
currentSelectionSource
();
49
50
struct
wl_display *
display
()
const
;
51
52
void
sourceDestroyed
(
DataSource
*source);
53
54
void
overrideSelection
(
const
QMimeData &mimeData);
55
bool
offerFromCompositorToClient
(wl_resource *clientDataDeviceResource);
56
void
offerRetainedSelection
(wl_resource *clientDataDeviceResource);
57
58
protected
:
59
void
data_device_manager_create_data_source(Resource *resource, uint32_t id)
override
;
60
void
data_device_manager_get_data_device
(
Resource
*
resource
,
uint32_t
id
,
struct
::wl_resource *seat)
override
;
61
62
private
Q_SLOTS
:
63
void
readFromClient
(
int
fd
);
64
65
private
:
66
void
retain();
67
void
finishReadFromClient(
bool
exhausted =
false
);
68
69
QWaylandCompositor *m_compositor =
nullptr
;
70
QList<DataDevice *> m_data_device_list;
71
72
DataSource
*m_current_selection_source =
nullptr
;
73
74
QMimeData m_retainedData;
75
QSocketNotifier *m_retainedReadNotifier =
nullptr
;
76
QList<QSocketNotifier *> m_obsoleteRetainedReadNotifiers;
77
int
m_retainedReadIndex = 0;
78
QByteArray m_retainedReadBuf;
79
80
bool
m_compositorOwnsSelection =
false
;
81
82
83
static
void
comp_accept
(
struct
wl_client
*
client
,
84
struct
wl_resource *resource,
85
uint32_t time,
86
const
char
*type);
87
static
void
comp_receive(
struct
wl_client *client,
88
struct
wl_resource *resource,
89
const
char
*mime_type,
90
int32_t fd);
91
static
void
comp_destroy(
struct
wl_client *client,
92
struct
wl_resource *resource);
93
94
static
const
struct
wl_data_offer_interface compositor_offer_interface;
95
};
96
97
}
98
99
QT_END_NAMESPACE
100
101
#
endif
// WLDATADEVICEMANAGER_H
QtWayland::DataDeviceManager
Definition
qwldatadevicemanager_p.h:41
QtWayland::DataDeviceManager::offerFromCompositorToClient
bool offerFromCompositorToClient(wl_resource *clientDataDeviceResource)
Definition
qwldatadevicemanager.cpp:184
QtWayland::DataDeviceManager::display
struct wl_display * display() const
Definition
qwldatadevicemanager.cpp:149
QtWayland::DataDeviceManager::overrideSelection
void overrideSelection(const QMimeData &mimeData)
Definition
qwldatadevicemanager.cpp:154
QtWayland::DataDeviceManager::sourceDestroyed
void sourceDestroyed(DataSource *source)
Definition
qwldatadevicemanager.cpp:61
QtWayland::DataDeviceManager::offerRetainedSelection
void offerRetainedSelection(wl_resource *clientDataDeviceResource)
Definition
qwldatadevicemanager.cpp:206
QtWayland::DataDeviceManager::currentSelectionSource
DataSource * currentSelectionSource()
Definition
qwldatadevicemanager.cpp:144
QtWayland::DataDeviceManager::setCurrentSelectionSource
void setCurrentSelectionSource(DataSource *source)
Definition
qwldatadevicemanager.cpp:32
QtWayland::DataDevice
Definition
qwldatadevice_p.h:35
QtWayland::DataDevice::DataDevice
DataDevice(QWaylandSeat *seat)
Definition
qwldatadevice.cpp:28
QtWayland::DataDevice::sourceDestroyed
void sourceDestroyed(DataSource *source)
Definition
qwldatadevice.cpp:50
QtWayland::DataDevice::setFocus
void setFocus(QWaylandClient *client)
Definition
qwldatadevice.cpp:34
QtWayland::DataOffer
Definition
qwldataoffer_p.h:33
QtWayland::DataOffer::data_offer_receive
void data_offer_receive(Resource *resource, const QString &mime_type, int32_t fd) override
Definition
qwldataoffer.cpp:41
QtWayland::DataOffer::DataOffer
DataOffer(DataSource *data_source, QtWaylandServer::wl_data_device::Resource *target)
Definition
qwldataoffer.cpp:17
QtWayland::DataOffer::data_offer_destroy_resource
void data_offer_destroy_resource(Resource *resource) override
Definition
qwldataoffer.cpp:55
QtWayland::DataOffer::data_offer_accept
void data_offer_accept(Resource *resource, uint32_t serial, const QString &mime_type) override
Definition
qwldataoffer.cpp:33
QtWayland::DataOffer::~DataOffer
~DataOffer() override
Definition
qwldataoffer.cpp:29
QtWayland::DataOffer::data_offer_destroy
void data_offer_destroy(Resource *resource) override
Definition
qwldataoffer.cpp:50
QtWayland::DataSource
Definition
qwldatasource_p.h:35
QtWayland::DataSource::cancel
void cancel()
Definition
qwldatasource.cpp:53
QtWayland::DataSource::send
void send(const QString &mimeType, int fd)
Definition
qwldatasource.cpp:47
QtWayland::DataSource::time
uint32_t time() const
Definition
qwldatasource.cpp:32
QtWayland::DataSource::setManager
void setManager(DataDeviceManager *mgr)
Definition
qwldatasource.cpp:58
QtWayland::DataSource::data_source_destroy_resource
void data_source_destroy_resource(Resource *resource) override
Definition
qwldatasource.cpp:83
QtWayland::DataSource::data_source_offer
void data_source_offer(Resource *resource, const QString &mime_type) override
Definition
qwldatasource.cpp:73
QtWayland::DataSource::~DataSource
~DataSource() override
Definition
qwldatasource.cpp:24
QtWayland::DataSource::setDevice
void setDevice(DataDevice *device)
Definition
qwldatasource.cpp:63
QtWayland::DataSource::accept
void accept(const QString &mimeType)
Definition
qwldatasource.cpp:42
QtWayland::DataSource::data_source_destroy
void data_source_destroy(Resource *resource) override
Definition
qwldatasource.cpp:78
QtWayland::DataSource::mimeTypes
QList< QString > mimeTypes() const
Definition
qwldatasource.cpp:37
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtWayland
Definition
qwaylanddisplay_p.h:54
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(wayland_datadevice)
qtwayland
src
compositor
wayland_wrapper
qwldatadevicemanager_p.h
Generated on
for Qt by
1.18.0