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
main.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 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
#
include
<
qpa
/
qplatformintegrationplugin
.
h
>
6
#
include
"qdirectfbintegration.h"
7
#
include
"qdirectfb_egl.h"
8
9
QT_BEGIN_NAMESPACE
10
11
using
namespace
Qt::StringLiterals;
12
13
#
ifdef
DIRECTFB_GL_EGL
14
#
define
QT_EGL_BACKEND_STRING
(
list
)
list
<<
"directfbegl"
;
15
#
define
QT_EGL_BACKEND_CREATE
(
list
,
out
)
16
if
(
list
.
toLower
(
)
==
"directfbegl"
)
17
out
=
new
QDirectFbIntegrationEGL
;
18
#
else
19
#
define
QT_EGL_BACKEND_STRING
(
list
)
20
#
define
QT_EGL_BACKEND_CREATE
(
system
,
out
)
21
#
endif
22
23
class
QDirectFbIntegrationPlugin
:
public
QPlatformIntegrationPlugin
24
{
25
Q_OBJECT
26
Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE
"directfb.json"
)
27
public
:
28
QPlatformIntegration
*
create
(
const
QString
&,
const
QStringList
&)
override
;
29
};
30
31
QPlatformIntegration *
QDirectFbIntegrationPlugin
::create(
const
QString& system,
const
QStringList& paramList)
32
{
33
Q_UNUSED(paramList);
34
QDirectFbIntegration
*integration =
nullptr
;
35
36
if
(!system.compare(
"directfb"_L1
, Qt::CaseInsensitive))
37
integration =
new
QDirectFbIntegration
;
38
QT_EGL_BACKEND_CREATE
(system, integration)
39
40
if
(!integration)
41
return
0;
42
43
integration
->
connectToDirectFb
(
)
;
44
45
return
integration;
46
}
47
48
QT_END_NAMESPACE
49
50
#
include
"main.moc"
QDirectFbIntegrationPlugin
Definition
main.cpp:24
QDirectFbIntegration
Definition
qdirectfbintegration.h:22
QDirectFbIntegration::connectToDirectFb
void connectToDirectFb()
Definition
qdirectfbintegration.cpp:33
QPlatformGraphicsBufferHelper
\inmodule QtGui
QT_EGL_BACKEND_CREATE
#define QT_EGL_BACKEND_CREATE(system, out)
Definition
main.cpp:20
qtbase
src
plugins
platforms
directfb
main.cpp
Generated on
for Qt by
1.14.0