summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmevent.h')
-rw-r--r--src/plugins/platforms/wasm/qwasmevent.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qwasmevent.h b/src/plugins/platforms/wasm/qwasmevent.h
index 215d06bae5..e8aea9072e 100644
--- a/src/plugins/platforms/wasm/qwasmevent.h
+++ b/src/plugins/platforms/wasm/qwasmevent.h
@@ -24,6 +24,7 @@ enum class EventType {
PointerUp,
PointerEnter,
PointerLeave,
+ Wheel,
};
enum class PointerType {
@@ -36,6 +37,8 @@ enum class WindowArea {
Client,
};
+enum class DeltaMode { Pixel, Line, Page };
+
namespace KeyboardModifier {
namespace internal
{
@@ -203,6 +206,22 @@ struct DragEvent : public MouseEvent
emscripten::val dataTransfer;
};
+struct WheelEvent : public MouseEvent
+{
+ static std::optional<WheelEvent> fromWeb(emscripten::val webEvent);
+
+ WheelEvent(EventType type, emscripten::val webEvent);
+ ~WheelEvent();
+ WheelEvent(const WheelEvent &other);
+ WheelEvent(WheelEvent &&other);
+ WheelEvent &operator=(const WheelEvent &other);
+ WheelEvent &operator=(WheelEvent &&other);
+
+ DeltaMode deltaMode;
+ bool webkitDirectionInvertedFromDevice;
+ QPoint delta;
+};
+
QT_END_NAMESPACE
#endif // QWASMEVENT_H