8#include <QtGui/private/qpixmap_raster_p.h>
9#include <QtGui/private/qguiapplication_p.h>
10#include <qpa/qplatformfontdatabase.h>
11#include <qpa/qplatformnativeinterface.h>
12#include <qpa/qplatformwindow.h>
13#include <qpa/qwindowsysteminterface.h>
16# include <QtGui/private/qwindowsfontdatabase_p.h>
17# if QT_CONFIG(freetype)
18# include <QtGui/private/qwindowsfontdatabase_ft_p.h>
20#elif defined(Q_OS_DARWIN)
21# include <QtGui/private/qcoretextfontdatabase_p.h>
24#if QT_CONFIG(fontconfig)
25# include <QtGui/private/qgenericunixfontdatabase_p.h>
28#if QT_CONFIG(freetype)
29#include <QtGui/private/qfontengine_ft_p.h>
30#include <QtGui/private/qfreetypefontdatabase_p.h>
34#include <QtGui/private/qgenericunixeventdispatcher_p.h>
36#include <QtCore/private/qeventdispatcher_win_p.h>
41using namespace Qt::StringLiterals;
43class QCoreTextFontEngine;
50 for (
const QString ¶m : paramList) {
51 if (param ==
"enable_fonts"_L1)
52 options |= QMinimalIntegration::EnableFonts;
53 else if (param ==
"freetype"_L1)
54 options |= QMinimalIntegration::FreeTypeFontDatabase;
55 else if (param ==
"fontconfig"_L1)
56 options |= QMinimalIntegration::FontconfigDatabase;
72 m_primaryScreen->mGeometry = QRect(0, 0, 240, 320);
74 m_primaryScreen->mFormat = QImage::Format_ARGB32_Premultiplied;
76 QWindowSystemInterface::handleScreenAdded(m_primaryScreen);
81 QWindowSystemInterface::handleScreenRemoved(m_primaryScreen);
82 delete m_fontDatabase;
88 case ThreadedPixmaps:
return true;
89 case MultipleWindows:
return true;
90 case RhiBasedRendering:
return false;
91 default:
return QPlatformIntegration::hasCapability(cap);
106 if (!m_fontDatabase && (m_options & EnableFonts)) {
108 if (m_options & FreeTypeFontDatabase) {
109# if QT_CONFIG(freetype)
110 m_fontDatabase =
new QWindowsFontDatabaseFT;
113 m_fontDatabase =
new QWindowsFontDatabase;
115#elif defined(Q_OS_DARWIN)
116 if (!(m_options & FontconfigDatabase)) {
117 if (m_options & FreeTypeFontDatabase) {
118# if QT_CONFIG(freetype)
119 m_fontDatabase =
new QCoreTextFontDatabaseEngineFactory<QFontEngineFT>;
122 m_fontDatabase =
new QCoreTextFontDatabaseEngineFactory<QCoreTextFontEngine>;
127 if (!m_fontDatabase) {
128#if QT_CONFIG(fontconfig)
129 m_fontDatabase =
new QGenericUnixFontDatabase;
131 m_fontDatabase = QPlatformIntegration::fontDatabase();
136 m_fontDatabase =
new DummyFontDatabase;
137 return m_fontDatabase;
143 QPlatformWindow *w =
new QPlatformWindow(window);
144 w->requestActivateWindow();
150 return new QMinimalBackingStore(window);
156 return new QEventDispatcherWin32;
158 return createUnixEventDispatcher();
164 if (!m_nativeInterface)
165 m_nativeInterface.reset(
new QPlatformNativeInterface);
166 return m_nativeInterface.get();
171 return static_cast<QMinimalIntegration *>(QGuiApplicationPrivate::platformIntegration());
virtual void populateFontDatabase() override
This function is called once at startup by Qt's internal font database.
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
QMinimalIntegration(const QStringList ¶meters)
QPlatformNativeInterface * nativeInterface() const override
static QMinimalIntegration * instance()
bool hasCapability(QPlatformIntegration::Capability cap) const override
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
static unsigned parseOptions(const QStringList ¶mList)
static const char debugBackingStoreEnvironmentVariable[]