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