summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmdom.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmdom.h')
-rw-r--r--src/plugins/platforms/wasm/qwasmdom.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qwasmdom.h b/src/plugins/platforms/wasm/qwasmdom.h
new file mode 100644
index 0000000000..92f710a13d
--- /dev/null
+++ b/src/plugins/platforms/wasm/qwasmdom.h
@@ -0,0 +1,29 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef QWASMDOM_H
+#define QWASMDOM_H
+
+#include <QtCore/qtconfigmacros.h>
+
+#include <emscripten/val.h>
+
+#include <string>
+
+QT_BEGIN_NAMESPACE
+
+class QPoint;
+
+namespace dom {
+inline emscripten::val document()
+{
+ return emscripten::val::global("document");
+}
+
+void syncCSSClassWith(emscripten::val element, std::string cssClassName, bool flag);
+
+QPoint mapPoint(emscripten::val source, emscripten::val target, const QPoint &point);
+} // namespace dom
+
+QT_END_NAMESPACE
+#endif // QWASMDOM_H