diff options
author | Mikolaj Boc <mikolaj.boc@qt.io> | 2023-01-24 10:18:34 +0100 |
---|---|---|
committer | Mikolaj Boc <mikolaj.boc@qt.io> | 2023-02-07 18:59:59 +0100 |
commit | d141d6894960dba7c62d67400a31a49a4abcdb08 (patch) | |
tree | 8711444671b98ec1f0d889dc9cfc9c0ef013efc3 /src/plugins/platforms/wasm/qwasmclipboard.h | |
parent | 62be4ab5be41b09eea16e5675ed4a74c795e58d9 (diff) |
Transfer the key handling logic to QWasmWindow
Also, use the embind approach as the rest of the events do, and
introduce a KeyEvent class which simplifies and streamlines event
support.
The event translator has been given a more specific function of
just handling the dead keys. Rest of the translation functionality
is coded directly in KeyEvent for more encapsulation.
Change-Id: I11b0262fc42fe920206ecc6de0d434b9d9ab9998
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmclipboard.h')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmclipboard.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/platforms/wasm/qwasmclipboard.h b/src/plugins/platforms/wasm/qwasmclipboard.h index cb649e03fe..4a21252c8e 100644 --- a/src/plugins/platforms/wasm/qwasmclipboard.h +++ b/src/plugins/platforms/wasm/qwasmclipboard.h @@ -12,10 +12,10 @@ #include <emscripten/bind.h> #include <emscripten/val.h> -#include "qwasmeventtranslator.h" - QT_BEGIN_NAMESPACE +struct KeyEvent; + class QWasmClipboard : public QObject, public QPlatformClipboard { public: @@ -34,8 +34,7 @@ public: bool supportsMode(QClipboard::Mode mode) const override; bool ownsMode(QClipboard::Mode mode) const override; - ProcessKeyboardResult processKeyboard(const QWasmEventTranslator::TranslatedEvent &event, - const QFlags<Qt::KeyboardModifier> &modifiers); + ProcessKeyboardResult processKeyboard(const KeyEvent &event); static void installEventHandlers(const emscripten::val &target); bool hasClipboardApi(); |