Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandintegration_p.h
Go to the documentation of this file.
1
// Copyright (C) 2019 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QPLATFORMINTEGRATION_WAYLAND_H
6
#
define
QPLATFORMINTEGRATION_WAYLAND_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
<
QtWaylandClient
/
qtwaylandclientglobal
.
h
>
20
#
include
<
qpa
/
qplatformintegration
.
h
>
21
#
include
<
qpa
/
qplatformopenglcontext
.
h
>
22
#
include
<
QtCore
/
QMutex
>
23
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
24
25
#
include
<
memory
>
26
27
QT_BEGIN_NAMESPACE
28
29
namespace
QtWaylandClient
{
30
31
class
QWaylandBuffer;
32
class
QWaylandDisplay;
33
class
QWaylandClientBufferIntegration;
34
class
QWaylandServerBufferIntegration;
35
class
QWaylandShellIntegration;
36
class
QWaylandInputDeviceIntegration;
37
class
QWaylandInputDevice;
38
class
QWaylandScreen;
39
class
QWaylandCursor;
40
class
QWaylandPlatformServices;
41
class
QWaylandSessionManager;
42
43
class
Q_WAYLANDCLIENT_EXPORT
QWaylandIntegration
:
public
QPlatformIntegration
44
#
if
QT_CONFIG
(
opengl
)
45
,
public
QNativeInterface
::
Private
::
QEGLIntegration
46
#
endif
47
{
48
public
:
49
QWaylandIntegration
(
const
QString
&
platformName
);
50
~
QWaylandIntegration
()
override
;
51
52
static
QWaylandIntegration
*
instance
() {
return
sInstance
; }
53
54
bool
init
();
55
56
bool
hasCapability
(
QPlatformIntegration
::
Capability
cap
)
const
override
;
57
QPlatformWindow
*
createPlatformWindow
(
QWindow
*
window
)
const
override
;
58
#
if
QT_CONFIG
(
opengl
)
59
QPlatformOpenGLContext
*
createPlatformOpenGLContext
(
QOpenGLContext
*
context
)
const
override
;
60
QPlatformOffscreenSurface
*
createPlatformOffscreenSurface
(
QOffscreenSurface
*
surface
)
const
override
;
61
QOpenGLContext
*
createOpenGLContext
(
EGLContext
context
,
EGLDisplay
display
,
QOpenGLContext
*
shareContext
)
const
override
;
62
#
endif
63
QPlatformBackingStore
*
createPlatformBackingStore
(
QWindow
*
window
)
const
override
;
64
65
QAbstractEventDispatcher
*
createEventDispatcher
()
const
override
;
66
void
initialize
()
override
;
67
68
QPlatformFontDatabase
*
fontDatabase
()
const
override
;
69
70
QPlatformNativeInterface
*
nativeInterface
()
const
override
;
71
#
if
QT_CONFIG
(
clipboard
)
72
QPlatformClipboard
*
clipboard
()
const
override
;
73
#
endif
74
#
if
QT_CONFIG
(
draganddrop
)
75
QPlatformDrag
*
drag
()
const
override
;
76
#
endif
77
QPlatformInputContext
*
inputContext
()
const
override
;
78
79
QVariant
styleHint
(
StyleHint
hint
)
const
override
;
80
81
#
if
QT_CONFIG
(
accessibility
)
82
QPlatformAccessibility
*
accessibility
()
const
override
;
83
#
endif
84
85
QPlatformServices
*
services
()
const
override
;
86
87
QWaylandDisplay
*
display
()
const
;
88
89
Qt
::
KeyboardModifiers
queryKeyboardModifiers
()
const
override
;
90
91
QList
<
int
>
possibleKeys
(
const
QKeyEvent
*
event
)
const
override
;
92
93
QStringList
themeNames
()
const
override
;
94
95
QPlatformTheme
*
createPlatformTheme
(
const
QString
&
name
)
const
override
;
96
97
#
if
QT_CONFIG
(
vulkan
)
98
QPlatformVulkanInstance
*
createPlatformVulkanInstance
(
QVulkanInstance
*
instance
)
const
override
;
99
#
endif
100
101
void
setApplicationBadge
(
qint64
number
)
override
;
102
void
beep
()
const
override
;
103
104
virtual
QWaylandInputDevice
*
createInputDevice
(
QWaylandDisplay
*
display
,
int
version
,
uint32_t
id
)
const
;
105
virtual
QWaylandScreen
*
createPlatformScreen
(
QWaylandDisplay
*
waylandDisplay
,
int
version
,
uint32_t
id
)
const
;
106
virtual
QWaylandCursor
*
createPlatformCursor
(
QWaylandDisplay
*
display
)
const
;
107
108
virtual
QWaylandClientBufferIntegration
*
clientBufferIntegration
()
const
;
109
virtual
QWaylandServerBufferIntegration
*
serverBufferIntegration
()
const
;
110
virtual
QWaylandShellIntegration
*
shellIntegration
()
const
;
111
112
void
reconfigureInputContext
();
113
114
protected
:
115
// NOTE: mDisplay *must* be destructed after mDrag and mClientBufferIntegration
116
// and mShellIntegration.
117
// Do not move this definition into the private section at the bottom.
118
std
::
unique_ptr
<
QWaylandDisplay
>
mDisplay
;
119
120
protected
:
121
void
reset
();
122
virtual
QPlatformNativeInterface
*
createPlatformNativeInterface
();
123
124
std
::
unique_ptr
<
QWaylandClientBufferIntegration
>
mClientBufferIntegration
;
125
std
::
unique_ptr
<
QWaylandServerBufferIntegration
>
mServerBufferIntegration
;
126
std
::
unique_ptr
<
QWaylandShellIntegration
>
mShellIntegration
;
127
std
::
unique_ptr
<
QWaylandInputDeviceIntegration
>
mInputDeviceIntegration
;
128
129
std
::
unique_ptr
<
QPlatformInputContext
>
mInputContext
;
130
131
private
:
132
void
initializePlatform
();
133
void
initializeClientBufferIntegration
();
134
void
initializeServerBufferIntegration
();
135
void
initializeShellIntegration
();
136
void
initializeInputDeviceIntegration
();
137
QWaylandShellIntegration
*
createShellIntegration
(
const
QString
&
interfaceName
);
138
#
ifndef
QT_NO_SESSIONMANAGER
139
QPlatformSessionManager
*
createPlatformSessionManager
(
const
QString
&
id
,
const
QString
&
key
)
const
override
;
140
#
endif
141
142
const
QString
mPlatformName
;
143
std
::
unique_ptr
<
QPlatformFontDatabase
>
mFontDb
;
144
#
if
QT_CONFIG
(
clipboard
)
145
std
::
unique_ptr
<
QPlatformClipboard
>
mClipboard
;
146
#
endif
147
#
if
QT_CONFIG
(
draganddrop
)
148
std
::
unique_ptr
<
QPlatformDrag
>
mDrag
;
149
#
endif
150
std
::
unique_ptr
<
QPlatformNativeInterface
>
mNativeInterface
;
151
#
if
QT_CONFIG
(
accessibility
)
152
mutable
std
::
unique_ptr
<
QPlatformAccessibility
>
mAccessibility
;
153
#
endif
154
std
::
unique_ptr
<
QWaylandPlatformServices
>
mPlatformServices
;
155
QMutex
mClientBufferInitLock
;
156
bool
mClientBufferIntegrationInitialized
=
false
;
157
bool
mServerBufferIntegrationInitialized
=
false
;
158
bool
mShellIntegrationInitialized
=
false
;
159
160
static
QWaylandIntegration
*
sInstance
;
161
162
friend
class
QWaylandDisplay
;
163
};
164
165
}
166
167
QT_END_NAMESPACE
168
169
#
endif
QtWaylandClient::EventThread
Definition
qwaylanddisplay.cpp:80
QtWaylandClient::EventThread::run
void run() override
Definition
qwaylanddisplay.cpp:156
QtWaylandClient::EventThread::stop
void stop()
Definition
qwaylanddisplay.cpp:138
QtWaylandClient::EventThread::readAndDispatchEvents
void readAndDispatchEvents()
Definition
qwaylanddisplay.cpp:101
QtWaylandClient::EventThread::waylandError
void waylandError()
QtWaylandClient::QWaylandIntegration
Definition
qwaylandintegration_p.h:47
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
QtWaylandClient
Definition
qwaylandclientextension.h:16
QtWaylandClient::Q_LOGGING_CATEGORY
Q_LOGGING_CATEGORY(lcQpaWayland, "qt.qpa.wayland")
QtWaylandClient::WithDestructor
Definition
qwaylandxdgshell.cpp:30
QtWaylandClient::WithDestructor::~WithDestructor
~WithDestructor()
Definition
qwaylandxdgshell.cpp:32
qtbase
src
plugins
platforms
wayland
qwaylandintegration_p.h
Generated on
for Qt by
1.16.1