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
qwasmoffscreensurface.h
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWASMOFFSCREENSURFACE_H
5#define QWASMOFFSCREENSURFACE_H
6
7#include <qpa/qplatformoffscreensurface.h>
8
9#include <emscripten/val.h>
10
11#include <string>
12
14
15class QOffscreenSurface;
16class QWasmOffscreenSurface final : public QPlatformOffscreenSurface
17{
18public:
19 explicit QWasmOffscreenSurface(QOffscreenSurface *offscreenSurface);
21
22 const std::string &id() const { return m_specialTargetId; }
23 bool isValid() const override;
24
25private:
26 std::string m_specialTargetId;
27 emscripten::val m_offscreenCanvas;
28};
29
30QT_END_NAMESPACE
31
32#endif
static bool releaseRequestUpdateHold()
QWasmCompositor(QWasmScreen *screen)
QPlatformInputContext * inputContext() const override
Returns the platforms input context.
void setContainerElements(emscripten::val elementArray)
static QWasmIntegration * get()
Qt::WindowState defaultWindowState(Qt::WindowFlags flags) const override
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
void addContainerElement(emscripten::val elementArray)
void initialize() override
Performs initialization steps that depend on having an event dispatcher available.
void removeContainerElement(emscripten::val elementArray)
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
QStringList themeNames() const override
void loadLocalFontFamilies(emscripten::val families)
QPlatformOpenGLContext * createPlatformOpenGLContext(QOpenGLContext *context) const override
Factory function for QPlatformOpenGLContext.
void removeBackingStore(QWindow *window)
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
QPlatformServices * services() const override
QPlatformWindow * createForeignWindow(QWindow *window, WId nativeHandle) const override
QPlatformTheme * createPlatformTheme(const QString &name) const override
void resizeScreen(const emscripten::val &canvas)
QVariant styleHint(QPlatformIntegration::StyleHint hint) const override
bool hasCapability(QPlatformIntegration::Capability cap) const override
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
QPlatformAccessibility * accessibility() const override
bool isValid() const override
Returns true if the platform offscreen surface has been allocated.
const std::string & id() const
QWasmOffscreenSurface(QOffscreenSurface *offscreenSurface)
static void destroyWebGLContext(QPlatformSurface *surface)
bool isSharing() const override
bool isValid() const override
void doneCurrent() override
QWasmOpenGLContext(QOpenGLContext *context)
void swapBuffers(QPlatformSurface *surface) override
Reimplement in subclass to native swap buffers calls.
bool makeCurrent(QPlatformSurface *surface) override
QSurfaceFormat format() const override
QFunctionPointer getProcAddress(const char *procName) override
Reimplement in subclass to allow dynamic querying of OpenGL symbols.
GLuint defaultFramebufferObject(QPlatformSurface *surface) const override
Reimplement in subclass if your platform uses framebuffer objects for surfaces.
void deleteScreen()
QFont * fixedFont
Definition qwasmtheme.h:60
void onContrastPreferenceChange()
Qt::ContrastPreference contrastPreference() const override
const QPalette * palette(Palette type=SystemPalette) const override
Return a color palette for type type.
Qt::ColorScheme colorScheme() const override
void requestColorScheme(Qt::ColorScheme scheme) override
void onColorSchemeChange()
QVariant themeHint(ThemeHint hint) const override
const QFont * font(Font type) const override
friend class QWasmCompositor
QJSValue function
Definition qjsengine.cpp:9
EMSCRIPTEN_BINDINGS(qtQWasmIntegraton)
static void addContainerElement(emscripten::val element)
static void removeContainerElement(emscripten::val element)
QT_BEGIN_NAMESPACE void qt_set_sequence_auto_mnemonic(bool)
static void loadLocalFontFamilies(emscripten::val event)
static void resizeAllScreens(emscripten::val event)
static void resizeContainerElement(emscripten::val element)
static void setContainerElements(emscripten::val elementArray)
static void qtUpdateDpi()
QT_BEGIN_NAMESPACE Platform platform()
constexpr auto contrastPreferenceNoPreference
Definition qwasmtheme.h:26
void registerCallbacks(std::initializer_list< MediaName > mediaNames, CallbackFn callback, Container &callbacksContainer)
Definition qwasmtheme.h:32
constexpr auto contrastPreferenceMore
Definition qwasmtheme.h:27
constexpr auto colorSchemePreferenceDark
Definition qwasmtheme.h:25
constexpr auto contrastPreferenceCustom
Definition qwasmtheme.h:29
constexpr auto contrastPreferenceLess
Definition qwasmtheme.h:28