summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmcompositor.h
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2023-01-24 10:18:34 +0100
committerMikolaj Boc <mikolaj.boc@qt.io>2023-02-07 18:59:59 +0100
commitd141d6894960dba7c62d67400a31a49a4abcdb08 (patch)
tree8711444671b98ec1f0d889dc9cfc9c0ef013efc3 /src/plugins/platforms/wasm/qwasmcompositor.h
parent62be4ab5be41b09eea16e5675ed4a74c795e58d9 (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/qwasmcompositor.h')
-rw-r--r--src/plugins/platforms/wasm/qwasmcompositor.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcompositor.h b/src/plugins/platforms/wasm/qwasmcompositor.h
index 55f93209f37..95e5de818df 100644
--- a/src/plugins/platforms/wasm/qwasmcompositor.h
+++ b/src/plugins/platforms/wasm/qwasmcompositor.h
@@ -26,7 +26,6 @@ class QWasmWindow;
class QWasmScreen;
class QOpenGLContext;
class QOpenGLTexture;
-class QWasmEventTranslator;
class QWasmCompositor final : public QObject
{
@@ -69,11 +68,8 @@ private:
void deliverUpdateRequests();
void deliverUpdateRequest(QWasmWindow *window, UpdateRequestDeliveryType updateType);
- static int keyboard_cb(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData);
-
static int touchCallback(int eventType, const EmscriptenTouchEvent *ev, void *userData);
- bool processKeyboard(int eventType, const EmscriptenKeyboardEvent *keyEvent);
bool processTouch(int eventType, const EmscriptenTouchEvent *touchEvent);
void updateEnabledState();
@@ -88,9 +84,7 @@ private:
std::unique_ptr<QPointingDevice> m_touchDevice;
- QMap <int, QPointF> m_pressedTouchIds;
-
- std::unique_ptr<QWasmEventTranslator> m_eventTranslator;
+ QMap<int, QPointF> m_pressedTouchIds;
};
QT_END_NAMESPACE