summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmcursor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into ↵v5.15.8-lts-lgplTarja Sundqvist2022-11-111-6/+10
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I569a2246c9e8d70430e8c5405b9f3df2218078ee
| * wasm: fix changing cursor shapeLorn Potter2021-10-291-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation would occasionally result in a crash when a window was closed. Apparently 'auto' cursor does not work so well, so we now use 'default' name. Fixes: QTBUG-96178 Change-Id: I0179d20dbdc01f0e3021d746324e1e39c678a298 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 97be0cca174a3b92c24062c557bf4df34db23f7b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Revert "Update commercial license headers"Tarja Sundqvist2021-03-241-11/+11
|/ | | | | | | | | | | This reverts commit 7a27444682c4cabc74b82bbce71481a49d748722. Revert of commercial license header changes is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I112b51ad8a0ec8506de9c2ec2f2d72fac9b37300 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Update commercial license headersTarja Sundqvist2021-01-261-11/+11
| | | | | | | | | | | | | | | | | Updated header.COMM to files in tqtc-qtbase/src/openg, tqtc-qtbase/src/openglextensions, tqtc-qtbase/src/, tqtc-qtbase/src/platformheaders, tqtc-qtbase/src/platformsupport and tqtc-qtbase/src/plugins. The commercial license header may contains some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4154 Change-Id: If366ee14b640372751d03bc1e169d15c877b3235 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* wasm: store and pass canvases as emscripten::valMorten Johan Sørvig2020-02-121-3/+1
| | | | | | | | | | | | | | | | | | | | Store and pass canvases as emscripten::val instead of a QString containing the element id. This simplifies code which interacts with the canvas using the emscripten::val API, by removing the need to look up with getElementById. The Emscripten C event API does not accept emscripten::val, and using the element id is still needed here. emscripten::val does not provide a hash key suitable for use with QHash, but does provide an equality-compare in the form of val::equals(). Change the canvas->screen mapping code to use a QVector instead of a QHash. Change-Id: I1dbdbbc8fb06bb869031f1500e83ae2d64780a7f Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: fix redundant string conversions between wasm and JavaScriptAlexandra Cherdantseva2020-01-221-3/+4
| | | | | | | | | | | | | | | Avoid redundant conversions from UTF16 to UTF8 to UTF16 with help of new class QWasmString static methods: + QWasmString::fromQString to convert QString to js string using js Module.UTF16ToString + QWasmString::toQString to convert js string to QString using js Module.stringToUTF16 Fixed document.getElementById calls for cavasId with unicode characters. Change-Id: I3fc55bfeb6aeda75fa3acd85d22cea667b542f38 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: do not get canvas as property of js global objectAlexandra Cherdantseva2020-01-131-2/+6
| | | | | | | | | You cannot be sure that property with specified key in a global object is really a canvas. Should use `document.getElementById`. Change-Id: Ife55adaad5517aed64122b0c9bff32489cf19a2f Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: support all cursor shapesAlexandra Cherdantseva2019-12-301-7/+14
| | | | | | | | Every Qt::CursorShape is supported. Tested in Chrome, Firefox and Safari. Change-Id: I38c9024dba4af70af789ac84ad7e38f749c847d7 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: support rendering to multiple canvasesMorten Johan Sørvig2019-03-081-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt (via the the qtloader.js API) now supports rendering to multiple canvases. The application sees each canvas as a QScreen. Make qtloader.js support multiple canvases: var qtloader = QtLoader({ canvasElements : [array-of-canvas], showCanvas: function() { // make canvas(es) visible }, }); The canvases were previously created/returned by showCanvas(), however this function is called after the Qt app has been started and adding screens that that point is too late. (This worked before since there was only one screen, and no need to connect each screen instance to specific canvas.) Remove QWasmScreen, QWasmCompositor, and QWasmEventTranslator singletons from QWasmIntegration. These are are now crated per-screen and are owned by the QWasmScreen. Task-number: QTBUG-64079 Change-Id: I24689929fd5bfb7ff0ba076f66937728fa4bc4e4 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: make setting the cursor shape work againMorten Johan Sørvig2019-02-211-1/+2
| | | | | | | | | Commit 960af0d64 ported away from EM_ASM but also changed the logic. Set the canvas.style.cursor property, like it originally did. Change-Id: Ie4b23abeae54173894bff1db000a305c459684bb Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: remove EM_ASM calls in wasm platform pluginLorn Potter2019-02-131-5/+2
| | | | | | Change-Id: I8453836b6730d18eaaa4ffe1fb9cb3933079ebee Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* WebAssembly for QtBaseMorten Johan Sørvig2018-08-301-0/+131
This is the squashed diff from wip/webassembly to dev. Done-with: Peng Wu <peng.wu@intopalo.com> Done-with: Sami Enne <sami.enne@intopalo.com> Done-with: Morten Johan Sørvig <morten.sorvig@qt.io> Started-by: Andrew Knight <andrew.knight@intopalo.com> Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>