summaryrefslogtreecommitdiffstats
path: root/src/core/web_event_factory.h
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-04-11 18:42:16 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2017-04-21 11:10:02 +0000
commit6fe967c4b0abaffccb4301f7167b08916da4d80f (patch)
tree4c1bbc02956b6977cb111ea2014174a83a73743f /src/core/web_event_factory.h
parent0c9e2eae483dc777b9f53819d23805abc80e51d8 (diff)
Implement proper touch handling on macOS
Use the OS provided QNativeGestureEvents for pinching and smart zooming. This replaces the usage of the Android based gesture recognizer on macOS. This also implements multitouch gestures to work with the Qt Quick implementation of QtWebEngine for macOS, because touch events are ignored by default on macOS in QQuickItem. Task-number: QTBUG-58779 Change-Id: I17399e4e89a57557540b2fd0940a445326b682f3 Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/core/web_event_factory.h')
-rw-r--r--src/core/web_event_factory.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/web_event_factory.h b/src/core/web_event_factory.h
index c9871a4b9..d82113db3 100644
--- a/src/core/web_event_factory.h
+++ b/src/core/web_event_factory.h
@@ -42,6 +42,7 @@
#include "content/public/browser/native_web_keyboard_event.h"
#include "third_party/WebKit/public/platform/WebInputEvent.h"
+#include "third_party/WebKit/public/platform/WebGestureEvent.h"
#include <QtGlobal>
@@ -50,6 +51,7 @@ class QHoverEvent;
class QKeyEvent;
class QMouseEvent;
class QWheelEvent;
+class QNativeGestureEvent;
QT_END_NAMESPACE
class WebEventFactory {
@@ -57,6 +59,7 @@ class WebEventFactory {
public:
static blink::WebMouseEvent toWebMouseEvent(QMouseEvent*, double dpiScale);
static blink::WebMouseEvent toWebMouseEvent(QHoverEvent*, double dpiScale);
+ static blink::WebGestureEvent toWebGestureEvent(QNativeGestureEvent *, double dpiScale);
static blink::WebMouseWheelEvent toWebWheelEvent(QWheelEvent*, double dpiScale);
static content::NativeWebKeyboardEvent toWebKeyboardEvent(QKeyEvent*);
};