NativeWebWheelEvent.h [plain text]
#ifndef NativeWebWheelEvent_h
#define NativeWebWheelEvent_h
#include "WebEvent.h"
#if USE(APPKIT)
#include <wtf/RetainPtr.h>
OBJC_CLASS NSView;
#endif
#if PLATFORM(EFL)
#include <Evas.h>
#include <WebCore/AffineTransform.h>
#endif
#if PLATFORM(GTK)
#include <WebCore/GUniquePtrGtk.h>
typedef union _GdkEvent GdkEvent;
#endif
namespace WebKit {
class NativeWebWheelEvent : public WebWheelEvent {
public:
#if USE(APPKIT)
NativeWebWheelEvent(NSEvent *, NSView *);
#elif PLATFORM(GTK)
NativeWebWheelEvent(const NativeWebWheelEvent&);
NativeWebWheelEvent(GdkEvent*);
#elif PLATFORM(EFL)
NativeWebWheelEvent(const Evas_Event_Mouse_Wheel*, const WebCore::AffineTransform& toWebContent, const WebCore::AffineTransform& toDeviceScreen);
#endif
#if USE(APPKIT)
NSEvent* nativeEvent() const { return m_nativeEvent.get(); }
#elif PLATFORM(GTK)
const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); }
#elif PLATFORM(EFL)
const Evas_Event_Mouse_Wheel* nativeEvent() const { return m_nativeEvent; }
#elif PLATFORM(IOS)
const void* nativeEvent() const { return 0; }
#endif
private:
#if USE(APPKIT)
RetainPtr<NSEvent> m_nativeEvent;
#elif PLATFORM(GTK)
GUniquePtr<GdkEvent> m_nativeEvent;
#elif PLATFORM(EFL)
const Evas_Event_Mouse_Wheel* m_nativeEvent;
#endif
};
}
#endif // NativeWebWheelEvent_h