summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmdom.h
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2022-10-13 18:24:51 +0200
committerMikolaj Boc <mikolaj.boc@qt.io>2022-12-21 00:20:01 +0100
commit32666691c21cc91a3d7c7585dad711dc9743fdce (patch)
treefc981b05aa3fff66fd6a40929bb2ca8a2fbce5af /src/plugins/platforms/wasm/qwasmdom.h
parent09141ebad7109b90e5dfdbf3b065543b8be14641 (diff)
Move the window through the title bar element itself
The compositor is redundant in the process of moving the window. Have the title bar react to move all by itself. Additionally, a clearer structure in the window was introduced. The non-client area has been extracted into a separate class, as was the icon store and free DOM functions used across files. Since it was now easy, made the window maximize/restore on double click on the title element. Fixes: QTBUG-107626 Pick-to: 6.5 Change-Id: Iba7f207e46806ae7162656965892ae5a48ac5ebe Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
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