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
qintegrityfbintegration.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 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
8
9#include <QtGui/private/qgenericunixfontdatabase_p.h>
10#include <QtGui/private/qgenericunixeventdispatcher_p.h>
11
12#include <QtFbSupport/private/qfbbackingstore_p.h>
13#include <QtFbSupport/private/qfbwindow_p.h>
14#include <QtFbSupport/private/qfbcursor_p.h>
15
16#include <QtGui/private/qguiapplication_p.h>
17#include <qpa/qplatforminputcontextfactory_p.h>
18#include <qpa/qwindowsysteminterface.h>
19#include <qpa/qplatformservices.h>
20
22
23QIntegrityFbIntegration::QIntegrityFbIntegration(const QStringList &paramList)
24 : m_fontDb(new QGenericUnixFontDatabase)
25{
26 m_primaryScreen = new QIntegrityFbScreen(paramList);
27}
28
30{
31 QWindowSystemInterface::handleScreenRemoved(m_primaryScreen);
32}
33
35{
36 if (m_primaryScreen->initialize())
37 QWindowSystemInterface::handleScreenAdded(m_primaryScreen);
38 else
39 qWarning("integrityfb: Failed to initialize screen");
40
41 m_inputContext = QPlatformInputContextFactory::create();
42
43 m_nativeInterface.reset(new QPlatformNativeInterface);
44
45 if (!qEnvironmentVariableIntValue("QT_QPA_FB_DISABLE_INPUT"))
46 createInputHandlers();
47}
48
49bool QIntegrityFbIntegration::hasCapability(QPlatformIntegration::Capability cap) const
50{
51 switch (cap) {
52 case ThreadedPixmaps: return true;
53 case WindowManagement: return false;
54 default: return QPlatformIntegration::hasCapability(cap);
55 }
56}
57
59{
60 return new QFbBackingStore(window);
61}
62
64{
65 return new QFbWindow(window);
66}
67
68QAbstractEventDispatcher *QIntegrityFbIntegration::createEventDispatcher() const
69{
70 return createUnixEventDispatcher();
71}
72
74{
75 QList<QPlatformScreen *> list;
76 list.append(m_primaryScreen);
77 return list;
78}
79
81{
82 return m_fontDb.data();
83}
84
86{
87 if (m_services.isNull())
88 m_services.reset(new QPlatformServices);
89
90 return m_services.data();
91}
92
93void QIntegrityFbIntegration::createInputHandlers()
94{
95 new QIntegrityHIDManager("HID", "", this);
96}
97
99{
100 return m_nativeInterface.data();
101}
102
103QT_END_NAMESPACE
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
QList< QPlatformScreen * > screens() const
QPlatformServices * services() const override
bool hasCapability(QPlatformIntegration::Capability cap) const override
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
void initialize() override
Performs initialization steps that depend on having an event dispatcher available.
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
QPlatformNativeInterface * nativeInterface() const override
Combined button and popup list for selecting options.