6#include "private/qeglfsintegration_p.h"
8#include <private/qguiapplication_p.h>
9#include <QtGui/private/qeglconvenience_p.h>
10#include <QtGui/private/qeglplatformcontext_p.h>
12#include <qpa/qwindowsysteminterface.h>
14#include <QtCore/QJsonDocument>
15#include <QtCore/QJsonArray>
16#include <QtCore/QJsonParseError>
29 getDisplays =
reinterpret_cast<PFNQGSGETDISPLAYSPROC
>(eglGetProcAddress(
"qgsGetDisplays"));
30 setDisplay =
reinterpret_cast<PFNQGSSETDISPLAYPROC
>(eglGetProcAddress(
"qgsSetDisplay"));
56 if (displaysDocument.isArray()){
57 QJsonArray screenArray = displaysDocument.array();
58 for (
auto screenValue : screenArray) {
59 if (screenValue.isObject())
64 qWarning() <<
"eglfs_emu: Failed to parse display info JSON with error: " <<
error.errorString()
65 <<
" at offset " <<
error.offset <<
" : " << displaysInfo;
69 qFatal(
"EGL library doesn't support Emulator extensions");
97 return EGLNativeWindowType(
qintptr(1 + uniqueWindowId.fetchAndAddRelaxed(1)));
void screenInit() override
QEglFSEmulatorIntegration()
PFNQGSGETDISPLAYSPROC getDisplays
PFNQGSSETDISPLAYPROC setDisplay
bool hasCapability(QPlatformIntegration::Capability cap) const override
bool usesDefaultScreen() override
EGLNativeWindowType createNativeWindow(QPlatformWindow *platformWindow, const QSize &size, const QSurfaceFormat &format) override
void platformDestroy() override
void platformInit() override
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error=nullptr)
Parses json as a UTF-8 encoded JSON document, and creates a QJsonDocument from it.
static void handleScreenAdded(QPlatformScreen *screen, bool isPrimary=false)
Should be called by the implementation whenever a new screen is added.
Combined button and popup list for selecting options.
#define Q_BASIC_ATOMIC_INITIALIZER(a)
DBusConnection const char DBusError * error
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum format
\inmodule QtCore\reentrant