wasm: Fix up namespacing in wasm platform plugin
Pick-to: 6.4 Change-Id: I2fdbb6688b252743578dfcd58f9259eb5ac3cca8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
87c2a401da
commit
ff0c7dfc6e
@ -16,6 +16,7 @@
|
|||||||
#include <QBuffer>
|
#include <QBuffer>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
using namespace emscripten;
|
using namespace emscripten;
|
||||||
|
|
||||||
static void pasteClipboardData(emscripten::val format, emscripten::val dataPtr)
|
static void pasteClipboardData(emscripten::val format, emscripten::val dataPtr)
|
||||||
@ -438,3 +439,4 @@ void QWasmClipboard::writeToClipboard(const QMimeData *data)
|
|||||||
val document = val::global("document");
|
val document = val::global("document");
|
||||||
document.call<val>("execCommand", val("copy"));
|
document.call<val>("execCommand", val("copy"));
|
||||||
}
|
}
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#include <emscripten/bind.h>
|
#include <emscripten/bind.h>
|
||||||
#include <emscripten/val.h>
|
#include <emscripten/val.h>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QWasmClipboard : public QObject, public QPlatformClipboard
|
class QWasmClipboard : public QObject, public QPlatformClipboard
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -36,4 +38,6 @@ public:
|
|||||||
bool isSafari;
|
bool isSafari;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QWASMCLIPBOARD_H
|
#endif // QWASMCLIPBOARD_H
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include <emscripten/emscripten.h>
|
#include <emscripten/emscripten.h>
|
||||||
#include <emscripten/bind.h>
|
#include <emscripten/bind.h>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
using namespace emscripten;
|
using namespace emscripten;
|
||||||
|
|
||||||
void QWasmCursor::changeCursor(QCursor *windowCursor, QWindow *window)
|
void QWasmCursor::changeCursor(QCursor *windowCursor, QWindow *window)
|
||||||
@ -133,3 +134,5 @@ void QWasmCursor::clearOverrideWasmCursor(QScreen *screen)
|
|||||||
QWasmCursor *wCursor = static_cast<QWasmCursor *>(QWasmScreen::get(screen)->cursor());
|
QWasmCursor *wCursor = static_cast<QWasmCursor *>(QWasmScreen::get(screen)->cursor());
|
||||||
wCursor->setWasmCursor(screen, wCursor->htmlCursorName);
|
wCursor->setWasmCursor(screen, wCursor->htmlCursorName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#define QWASMCURSOR_H
|
#define QWASMCURSOR_H
|
||||||
|
|
||||||
#include <qpa/qplatformcursor.h>
|
#include <qpa/qplatformcursor.h>
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QWasmCursor : public QPlatformCursor
|
class QWasmCursor : public QPlatformCursor
|
||||||
{
|
{
|
||||||
@ -19,4 +20,6 @@ private:
|
|||||||
void setWasmCursor(QScreen *screen, const QByteArray &name);
|
void setWasmCursor(QScreen *screen, const QByteArray &name);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,9 +5,13 @@
|
|||||||
|
|
||||||
#include <QtGui/qpa/qwindowsysteminterface.h>
|
#include <QtGui/qpa/qwindowsysteminterface.h>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
// Note: All event dispatcher functionality is implemented in QEventDispatcherWasm
|
// Note: All event dispatcher functionality is implemented in QEventDispatcherWasm
|
||||||
// in QtCore, except for processWindowSystemEvents() below which uses API from QtGui.
|
// in QtCore, except for processWindowSystemEvents() below which uses API from QtGui.
|
||||||
void QWasmEventDispatcher::processWindowSystemEvents(QEventLoop::ProcessEventsFlags flags)
|
void QWasmEventDispatcher::processWindowSystemEvents(QEventLoop::ProcessEventsFlags flags)
|
||||||
{
|
{
|
||||||
QWindowSystemInterface::sendWindowSystemEvents(flags);
|
QWindowSystemInterface::sendWindowSystemEvents(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
@ -24,10 +24,10 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace emscripten;
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
using namespace emscripten;
|
||||||
|
|
||||||
typedef struct emkb2qt {
|
typedef struct emkb2qt {
|
||||||
const char *em;
|
const char *em;
|
||||||
unsigned int qt;
|
unsigned int qt;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
#include <qwindow.h>
|
#include <qwindow.h>
|
||||||
#include <QKeySequence>
|
#include <QKeySequence>
|
||||||
#include <qpa/qwindowsysteminterface.h>
|
#include <qpa/qwindowsysteminterface.h>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
using namespace qstdweb;
|
using namespace qstdweb;
|
||||||
|
|
||||||
static void inputCallback(emscripten::val event)
|
static void inputCallback(emscripten::val event)
|
||||||
@ -162,3 +164,5 @@ int QWasmInputContext::androidKeyboardCallback(int eventType,
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#include <emscripten/html5.h>
|
#include <emscripten/html5.h>
|
||||||
#include <emscripten/emscripten.h>
|
#include <emscripten/emscripten.h>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QWasmInputContext : public QPlatformInputContext
|
class QWasmInputContext : public QPlatformInputContext
|
||||||
{
|
{
|
||||||
Q_DISABLE_COPY(QWasmInputContext)
|
Q_DISABLE_COPY(QWasmInputContext)
|
||||||
@ -42,4 +44,6 @@ private:
|
|||||||
bool inputPanelIsOpen = false;
|
bool inputPanelIsOpen = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QWASMINPUTCONTEXT_H
|
#endif // QWASMINPUTCONTEXT_H
|
||||||
|
@ -32,9 +32,11 @@
|
|||||||
// this is where EGL headers are pulled in, make sure it is last
|
// this is where EGL headers are pulled in, make sure it is last
|
||||||
#include "qwasmscreen.h"
|
#include "qwasmscreen.h"
|
||||||
#include <private/qsimpledrag_p.h>
|
#include <private/qsimpledrag_p.h>
|
||||||
using namespace emscripten;
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
using namespace emscripten;
|
||||||
|
|
||||||
using namespace Qt::StringLiterals;
|
using namespace Qt::StringLiterals;
|
||||||
|
|
||||||
static void addContainerElement(emscripten::val element)
|
static void addContainerElement(emscripten::val element)
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "qwasmoffscreensurface.h"
|
#include "qwasmoffscreensurface.h"
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
QWasmOffscrenSurface::QWasmOffscrenSurface(QOffscreenSurface *offscreenSurface)
|
QWasmOffscrenSurface::QWasmOffscrenSurface(QOffscreenSurface *offscreenSurface)
|
||||||
:QPlatformOffscreenSurface(offscreenSurface)
|
:QPlatformOffscreenSurface(offscreenSurface)
|
||||||
{
|
{
|
||||||
@ -13,3 +15,5 @@ QWasmOffscrenSurface::~QWasmOffscrenSurface()
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
#include <QtGui/qguiapplication.h>
|
#include <QtGui/qguiapplication.h>
|
||||||
#include <private/qhighdpiscaling_p.h>
|
#include <private/qhighdpiscaling_p.h>
|
||||||
|
|
||||||
using namespace emscripten;
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
using namespace emscripten;
|
||||||
|
|
||||||
const char * QWasmScreen::m_canvasResizeObserverCallbackContextPropertyName = "data-qtCanvasResizeObserverCallbackContext";
|
const char * QWasmScreen::m_canvasResizeObserverCallbackContextPropertyName = "data-qtCanvasResizeObserverCallbackContext";
|
||||||
|
|
||||||
QWasmScreen::QWasmScreen(const emscripten::val &containerOrCanvas)
|
QWasmScreen::QWasmScreen(const emscripten::val &containerOrCanvas)
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
/* XPM */
|
/* XPM */
|
||||||
static const char * const qt_menu_xpm[] = {
|
static const char * const qt_menu_xpm[] = {
|
||||||
"16 16 72 1",
|
"16 16 72 1",
|
||||||
@ -153,5 +155,5 @@ static const char * const qt_normalizeup_xpm[] = {
|
|||||||
".######...",
|
".######...",
|
||||||
".........."};
|
".........."};
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
#endif // QWASMSTYLEPIXMAPS_P_H
|
#endif // QWASMSTYLEPIXMAPS_P_H
|
||||||
|
@ -14,10 +14,11 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
Q_GUI_EXPORT int qt_defaultDpiX();
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
Q_GUI_EXPORT int qt_defaultDpiX();
|
||||||
|
|
||||||
QWasmWindow::QWasmWindow(QWindow *w, QWasmCompositor *compositor, QWasmBackingStore *backingStore)
|
QWasmWindow::QWasmWindow(QWindow *w, QWasmCompositor *compositor, QWasmBackingStore *backingStore)
|
||||||
: QPlatformWindow(w),
|
: QPlatformWindow(w),
|
||||||
m_window(w),
|
m_window(w),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user