NativeWebTouchEvent.h [plain text]
#pragma once
#include "WebEvent.h"
#if ENABLE(TOUCH_EVENTS)
#if PLATFORM(IOS_FAMILY)
#if defined(__OBJC__)
#include <UIKit/UIKit.h>
struct _UIWebTouchEvent;
#endif
#elif PLATFORM(GTK)
#include <WebCore/GUniquePtrGtk.h>
#elif USE(LIBWPE)
#include <wpe/wpe.h>
#endif
#endif // ENABLE(TOUCH_EVENTS)
namespace WebKit {
#if ENABLE(TOUCH_EVENTS)
class NativeWebTouchEvent : public WebTouchEvent {
public:
#if PLATFORM(IOS_FAMILY)
#if defined(__OBJC__)
explicit NativeWebTouchEvent(const _UIWebTouchEvent*, UIKeyModifierFlags);
#endif
#elif PLATFORM(GTK)
NativeWebTouchEvent(GdkEvent*, Vector<WebPlatformTouchPoint>&&);
NativeWebTouchEvent(const NativeWebTouchEvent&);
const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); }
#elif USE(LIBWPE)
NativeWebTouchEvent(struct wpe_input_touch_event*, float deviceScaleFactor);
const struct wpe_input_touch_event_raw* nativeFallbackTouchPoint() const { return &m_fallbackTouchPoint; }
#elif PLATFORM(WIN)
NativeWebTouchEvent();
#endif
private:
#if PLATFORM(IOS_FAMILY) && defined(__OBJC__)
Vector<WebPlatformTouchPoint> extractWebTouchPoint(const _UIWebTouchEvent*);
#endif
#if PLATFORM(GTK)
GUniquePtr<GdkEvent> m_nativeEvent;
#elif USE(LIBWPE)
struct wpe_input_touch_event_raw m_fallbackTouchPoint;
#endif
};
#endif // ENABLE(TOUCH_EVENTS)
#if PLATFORM(IOS_FAMILY) && defined(__OBJC__)
OptionSet<WebEvent::Modifier> webEventModifierFlags(UIKeyModifierFlags);
#endif
}