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
/
QScopedPointer
>
23
#
include
<
QtCore
/
QMutex
>
24
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
25
26
QT_BEGIN_NAMESPACE
27
28
namespace
QtWaylandClient
{
29
30
class
QWaylandBuffer;
31
class
QWaylandDisplay;
32
class
QWaylandClientBufferIntegration;
33
class
QWaylandServerBufferIntegration;
34
class
QWaylandShellIntegration;
35
class
QWaylandInputDeviceIntegration;
36
class
QWaylandInputDevice;
37
class
QWaylandScreen;
38
class
QWaylandCursor;
39
class
QWaylandPlatformServices;
40
class
QWaylandSessionManager;
41
42
class
Q_WAYLANDCLIENT_EXPORT
QWaylandIntegration
:
public
QPlatformIntegration
43
#
if
QT_CONFIG
(
opengl
)
44
,
public
QNativeInterface
::
Private
::
QEGLIntegration
45
#
endif
46
{
47
public
:
48
QWaylandIntegration
(
const
QString
&
platformName
);
49
~
QWaylandIntegration
()
override
;
50
51
static
QWaylandIntegration
*
instance
() {
return
sInstance
; }
52
53
bool
init
();
54
55
bool
hasCapability
(
QPlatformIntegration
::
Capability
cap
)
const
override
;
56
QPlatformWindow
*
createPlatformWindow
(
QWindow
*
window
)
const
override
;
57
#
if
QT_CONFIG
(
opengl
)
58
QPlatformOpenGLContext
*
createPlatformOpenGLContext
(
QOpenGLContext
*
context
)
const
override
;
59
QPlatformOffscreenSurface
*
createPlatformOffscreenSurface
(
QOffscreenSurface
*
surface
)
const
override
;
60
QOpenGLContext
*
createOpenGLContext
(
EGLContext
context
,
EGLDisplay
display
,
QOpenGLContext
*
shareContext
)
const
override
;
61
#
endif
62
QPlatformBackingStore
*
createPlatformBackingStore
(
QWindow
*
window
)
const
override
;
63
64
QAbstractEventDispatcher
*
createEventDispatcher
()
const
override
;
65
void
initialize
()
override
;
66
67
QPlatformFontDatabase
*
fontDatabase
()
const
override
;
68
69
QPlatformNativeInterface
*
nativeInterface
()
const
override
;
70
#
if
QT_CONFIG
(
clipboard
)
71
QPlatformClipboard
*
clipboard
()
const
override
;
72
#
endif
73
#
if
QT_CONFIG
(
draganddrop
)
74
QPlatformDrag
*
drag
()
const
override
;
75
#
endif
76
QPlatformInputContext
*
inputContext
()
const
override
;
77
78
QVariant
styleHint
(
StyleHint
hint
)
const
override
;
79
80
#
if
QT_CONFIG
(
accessibility
)
81
QPlatformAccessibility
*
accessibility
()
const
override
;
82
#
endif
83
84
QPlatformServices
*
services
()
const
override
;
85
86
QWaylandDisplay
*
display
()
const
;
87
88
Qt
::
KeyboardModifiers
queryKeyboardModifiers
()
const
override
;
89
90
QList
<
int
>
possibleKeys
(
const
QKeyEvent
*
event
)
const
override
;
91
92
QStringList
themeNames
()
const
override
;
93
94
QPlatformTheme
*
createPlatformTheme
(
const
QString
&
name
)
const
override
;
95
96
#
if
QT_CONFIG
(
vulkan
)
97
QPlatformVulkanInstance
*
createPlatformVulkanInstance
(
QVulkanInstance
*
instance
)
const
override
;
98
#
endif
99
100
void
setApplicationBadge
(
qint64
number
)
override
;
101
void
beep
()
const
override
;
102
103
virtual
QWaylandInputDevice
*
createInputDevice
(
QWaylandDisplay
*
display
,
int
version
,
uint32_t
id
)
const
;
104
virtual
QWaylandScreen
*
createPlatformScreen
(
QWaylandDisplay
*
waylandDisplay
,
int
version
,
uint32_t
id
)
const
;
105
virtual
QWaylandCursor
*
createPlatformCursor
(
QWaylandDisplay
*
display
)
const
;
106
107
virtual
QWaylandClientBufferIntegration
*
clientBufferIntegration
()
const
;
108
virtual
QWaylandServerBufferIntegration
*
serverBufferIntegration
()
const
;
109
virtual
QWaylandShellIntegration
*
shellIntegration
()
const
;
110
111
void
reconfigureInputContext
();
112
113
protected
:
114
// NOTE: mDisplay *must* be destructed after mDrag and mClientBufferIntegration
115
// and mShellIntegration.
116
// Do not move this definition into the private section at the bottom.
117
QScopedPointer
<
QWaylandDisplay
>
mDisplay
;
118
119
protected
:
120
void
reset
();
121
virtual
QPlatformNativeInterface
*
createPlatformNativeInterface
();
122
123
QScopedPointer
<
QWaylandClientBufferIntegration
>
mClientBufferIntegration
;
124
QScopedPointer
<
QWaylandServerBufferIntegration
>
mServerBufferIntegration
;
125
QScopedPointer
<
QWaylandShellIntegration
>
mShellIntegration
;
126
QScopedPointer
<
QWaylandInputDeviceIntegration
>
mInputDeviceIntegration
;
127
128
QScopedPointer
<
QPlatformInputContext
>
mInputContext
;
129
130
private
:
131
void
initializePlatform
();
132
void
initializeClientBufferIntegration
();
133
void
initializeServerBufferIntegration
();
134
void
initializeShellIntegration
();
135
void
initializeInputDeviceIntegration
();
136
QWaylandShellIntegration
*
createShellIntegration
(
const
QString
&
interfaceName
);
137
#
ifndef
QT_NO_SESSIONMANAGER
138
QPlatformSessionManager
*
createPlatformSessionManager
(
const
QString
&
id
,
const
QString
&
key
)
const
override
;
139
#
endif
140
141
const
QString
mPlatformName
;
142
QScopedPointer
<
QPlatformFontDatabase
>
mFontDb
;
143
#
if
QT_CONFIG
(
clipboard
)
144
QScopedPointer
<
QPlatformClipboard
>
mClipboard
;
145
#
endif
146
#
if
QT_CONFIG
(
draganddrop
)
147
QScopedPointer
<
QPlatformDrag
>
mDrag
;
148
#
endif
149
QScopedPointer
<
QPlatformNativeInterface
>
mNativeInterface
;
150
#
if
QT_CONFIG
(
accessibility
)
151
mutable
QScopedPointer
<
QPlatformAccessibility
>
mAccessibility
;
152
#
endif
153
QScopedPointer
<
QWaylandPlatformServices
>
mPlatformServices
;
154
QMutex
mClientBufferInitLock
;
155
bool
mClientBufferIntegrationInitialized
=
false
;
156
bool
mServerBufferIntegrationInitialized
=
false
;
157
bool
mShellIntegrationInitialized
=
false
;
158
159
static
QWaylandIntegration
*
sInstance
;
160
161
friend
class
QWaylandDisplay
;
162
};
163
164
}
165
166
QT_END_NAMESPACE
167
168
#
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:46
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