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
qt_egl_p.h
Go to the documentation of this file.
1
// Copyright (C) 2020 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
QT_EGL_P_H
5
#
define
QT_EGL_P_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
// q(data/text)stream.h must be included before any header file that defines Status
19
#
include
<
QtCore
/
qdatastream
.
h
>
20
#
include
<
QtCore
/
qtextstream
.
h
>
21
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
22
23
#
ifdef
QT_EGL_NO_X11
24
#
ifndef
EGL_NO_X11
25
#
define
EGL_NO_X11
26
#
endif
27
#
ifndef
MESA_EGL_NO_X11_HEADERS
28
#
define
MESA_EGL_NO_X11_HEADERS
// MESA
29
#
endif
30
#
if
!
defined
(
Q_OS_INTEGRITY
)
31
#
define
WIN_INTERFACE_CUSTOM
// NV
32
#
endif
// Q_OS_INTEGRITY
33
#
else
// QT_EGL_NO_X11
34
// If one has an eglplatform.h with https://github.com/KhronosGroup/EGL-Registry/pull/130
35
// that needs USE_X11 to be defined.
36
#
define
USE_X11
37
#
endif
38
39
#
ifdef
QT_EGL_WAYLAND
40
#
define
WAYLAND
// NV
41
#
endif
// QT_EGL_WAYLAND
42
43
#
include
<
EGL
/
egl
.
h
>
44
#
include
<
EGL
/
eglext
.
h
>
45
46
#
ifndef
QT_EGL_NO_X11
47
#
undef
Status
48
#
undef
None
49
#
undef
Bool
50
#
undef
CursorShape
51
#
undef
KeyPress
52
#
undef
KeyRelease
53
#
undef
FocusIn
54
#
undef
FocusOut
55
#
undef
FontChange
56
#
undef
Expose
57
#
undef
Unsorted
58
#
undef
Always
59
#
endif
60
61
#
include
<
stdint
.
h
>
62
63
QT_BEGIN_NAMESPACE
64
65
namespace
QtInternal
{
66
67
template
<
class
FromType,
class
ToType>
68
struct
QtEglConverter
69
{
70
static
inline
ToType
convert
(FromType v)
71
{
return
v; }
72
};
73
74
template
<>
75
struct
QtEglConverter
<uint32_t, uintptr_t>
76
{
77
static
inline
uintptr_t
convert
(uint32_t v)
78
{
return
v; }
79
};
80
81
#
if
QT_POINTER_SIZE
>
4
82
template
<>
83
struct
QtEglConverter
<
uintptr_t
,
uint32_t
>
84
{
85
static
inline
uint32_t
convert
(
uintptr_t
v
)
86
{
return
uint32_t
(
v
); }
87
};
88
#
endif
89
90
template
<>
91
struct
QtEglConverter
<uint32_t,
void
*>
92
{
93
static
inline
void
*
convert
(uint32_t v)
94
{
return
reinterpret_cast
<
void
*>(uintptr_t(v)); }
95
};
96
97
template
<>
98
struct
QtEglConverter
<
void
*, uint32_t>
99
{
100
static
inline
uint32_t
convert
(
void
*v)
101
{
return
uintptr_t(v); }
102
};
103
104
}
// QtInternal
105
106
template
<
class
ToType,
class
FromType>
107
static
inline
ToType
qt_egl_cast
(FromType from)
108
{
return
QtInternal
::
QtEglConverter
<FromType, ToType>::convert(from); }
109
110
QT_END_NAMESPACE
111
112
#
endif
// QT_EGL_P_H
QtInternal
Definition
qt_egl_p.h:65
qt_egl_cast
static ToType qt_egl_cast(FromType from)
Definition
qt_egl_p.h:107
QtInternal::QtEglConverter< uint32_t, uintptr_t >
Definition
qt_egl_p.h:76
QtInternal::QtEglConverter< uint32_t, uintptr_t >::convert
static uintptr_t convert(uint32_t v)
Definition
qt_egl_p.h:77
QtInternal::QtEglConverter< uint32_t, void * >
Definition
qt_egl_p.h:92
QtInternal::QtEglConverter< uint32_t, void * >::convert
static void * convert(uint32_t v)
Definition
qt_egl_p.h:93
QtInternal::QtEglConverter< void *, uint32_t >
Definition
qt_egl_p.h:99
QtInternal::QtEglConverter< void *, uint32_t >::convert
static uint32_t convert(void *v)
Definition
qt_egl_p.h:100
QtInternal::QtEglConverter
Definition
qt_egl_p.h:69
QtInternal::QtEglConverter::convert
static ToType convert(FromType v)
Definition
qt_egl_p.h:70
qtbase
src
gui
opengl
platform
egl
qt_egl_p.h
Generated on
for Qt by
1.18.0