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
qbsdfbintegration.cpp
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// Copyright (C) 2015-2016 Oleksandr Tymoshenko <gonzo@bluezbox.com>
3
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
// Qt-Security score:significant reason:default
5
6
#
include
"qbsdfbintegration.h"
7
#
include
"qbsdfbscreen.h"
8
9
#
include
<
QtGui
/
private
/
qgenericunixfontdatabase_p
.
h
>
10
#
include
<
QtGui
/
private
/
qgenericunixeventdispatcher_p
.
h
>
11
12
#
include
<
QtFbSupport
/
private
/
qfbvthandler_p
.
h
>
13
#
include
<
QtFbSupport
/
private
/
qfbbackingstore_p
.
h
>
14
#
include
<
QtFbSupport
/
private
/
qfbwindow_p
.
h
>
15
#
include
<
QtFbSupport
/
private
/
qfbcursor_p
.
h
>
16
17
#
include
<
QtGui
/
private
/
qguiapplication_p
.
h
>
18
#
include
<
qpa
/
qplatforminputcontext
.
h
>
19
#
include
<
qpa
/
qplatforminputcontextfactory_p
.
h
>
20
#
include
<
qpa
/
qwindowsysteminterface
.
h
>
21
#
include
<
qpa
/
qplatformservices
.
h
>
22
23
#
if
QT_CONFIG
(
tslib
)
24
#
include
<
QtInputSupport
/
private
/
qtslib_p
.
h
>
25
#
endif
26
27
QT_BEGIN_NAMESPACE
28
29
using
namespace
Qt::StringLiterals;
30
31
QBsdFbIntegration
::
QBsdFbIntegration
(
const
QStringList ¶mList)
32
{
33
m_fontDb.reset(
new
QGenericUnixFontDatabase);
34
m_primaryScreen.reset(
new
QBsdFbScreen(paramList));
35
}
36
37
QBsdFbIntegration
::~
QBsdFbIntegration
()
38
{
39
QWindowSystemInterface::handleScreenRemoved(m_primaryScreen.take());
40
}
41
42
void
QBsdFbIntegration
::
initialize
()
43
{
44
if
(m_primaryScreen->initialize())
45
QWindowSystemInterface::handleScreenAdded(m_primaryScreen.data());
46
else
47
qWarning(
"bsdfb: Failed to initialize screen"
);
48
49
m_inputContext.reset(QPlatformInputContextFactory::create());
50
m_nativeInterface.reset(
new
QPlatformNativeInterface);
51
m_vtHandler.reset(
new
QFbVtHandler);
52
53
if
(!qEnvironmentVariableIntValue(
"QT_QPA_FB_DISABLE_INPUT"
))
54
createInputHandlers();
55
}
56
57
bool
QBsdFbIntegration
::
hasCapability
(QPlatformIntegration::Capability cap)
const
58
{
59
switch
(cap) {
60
case
ThreadedPixmaps:
61
return
true
;
62
case
WindowManagement:
63
return
false
;
64
case
RhiBasedRendering:
65
return
false
;
66
default
:
67
return
QPlatformIntegration::hasCapability(cap);
68
}
69
}
70
71
QPlatformBackingStore
*
QBsdFbIntegration
::
createPlatformBackingStore
(QWindow *window)
const
72
{
73
return
new
QFbBackingStore(window);
74
}
75
76
QPlatformWindow
*
QBsdFbIntegration
::
createPlatformWindow
(QWindow *window)
const
77
{
78
return
new
QFbWindow(window);
79
}
80
81
QAbstractEventDispatcher *
QBsdFbIntegration
::
createEventDispatcher
()
const
82
{
83
return
createUnixEventDispatcher();
84
}
85
86
QList
<
QPlatformScreen
*>
QBsdFbIntegration
::
screens
()
const
87
{
88
QList<QPlatformScreen *> list;
89
list.append(m_primaryScreen.data());
90
return
list;
91
}
92
93
QPlatformFontDatabase
*
QBsdFbIntegration
::
fontDatabase
()
const
94
{
95
return
m_fontDb.data();
96
}
97
98
QPlatformServices
*
QBsdFbIntegration
::
services
()
const
99
{
100
if
(m_services.isNull())
101
m_services.reset(
new
QPlatformServices);
102
103
return
m_services.data();
104
}
105
106
void
QBsdFbIntegration
::createInputHandlers()
107
{
108
#
if
QT_CONFIG
(
tslib
)
109
const
bool
useTslib = qEnvironmentVariableIntValue(
"QT_QPA_FB_TSLIB"
);
110
if
(useTslib)
111
new
QTsLibMouseHandler(
"TsLib"_L1
, QString());
112
#
endif
113
}
114
115
QPlatformNativeInterface
*
QBsdFbIntegration
::
nativeInterface
()
const
116
{
117
return
m_nativeInterface.data();
118
}
119
120
QT_END_NAMESPACE
QBsdFbIntegration
Definition
qbsdfbintegration.h:18
QBsdFbIntegration::~QBsdFbIntegration
~QBsdFbIntegration() override
Definition
qbsdfbintegration.cpp:37
QBsdFbIntegration::createPlatformBackingStore
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
Definition
qbsdfbintegration.cpp:71
QBsdFbIntegration::initialize
void initialize() override
Performs initialization steps that depend on having an event dispatcher available.
Definition
qbsdfbintegration.cpp:42
QBsdFbIntegration::createPlatformWindow
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
Definition
qbsdfbintegration.cpp:76
QBsdFbIntegration::services
QPlatformServices * services() const override
Definition
qbsdfbintegration.cpp:98
QBsdFbIntegration::screens
QList< QPlatformScreen * > screens() const
Definition
qbsdfbintegration.cpp:86
QBsdFbIntegration::QBsdFbIntegration
QBsdFbIntegration(const QStringList ¶mList)
Definition
qbsdfbintegration.cpp:31
QBsdFbIntegration::createEventDispatcher
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
Definition
qbsdfbintegration.cpp:81
QBsdFbIntegration::hasCapability
bool hasCapability(QPlatformIntegration::Capability cap) const override
Definition
qbsdfbintegration.cpp:57
QBsdFbIntegration::nativeInterface
QPlatformNativeInterface * nativeInterface() const override
Definition
qbsdfbintegration.cpp:115
QBsdFbIntegration::fontDatabase
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
Definition
qbsdfbintegration.cpp:93
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
plugins
platforms
bsdfb
qbsdfbintegration.cpp
Generated on
for Qt by
1.18.0