NativeWebMouseEvent.h [plain text]
#ifndef NativeWebMouseEvent_h
#define NativeWebMouseEvent_h
#include "WebEvent.h"
#if PLATFORM(MAC)
#include <wtf/RetainPtr.h>
OBJC_CLASS NSView;
#elif PLATFORM(QT)
#include <qevent.h>
#elif PLATFORM(GTK)
#include <GOwnPtrGtk.h>
typedef union _GdkEvent GdkEvent;
#elif PLATFORM(EFL)
#include <Evas.h>
#endif
namespace WebKit {
class NativeWebMouseEvent : public WebMouseEvent {
public:
#if PLATFORM(MAC)
NativeWebMouseEvent(NSEvent *, NSView *);
#elif PLATFORM(WIN)
NativeWebMouseEvent(HWND, UINT message, WPARAM, LPARAM, bool);
#elif PLATFORM(QT)
explicit NativeWebMouseEvent(QMouseEvent*, const QTransform& fromItemTransform, int eventClickCount);
#elif PLATFORM(GTK)
NativeWebMouseEvent(const NativeWebMouseEvent&);
NativeWebMouseEvent(GdkEvent*, int);
#elif PLATFORM(EFL)
NativeWebMouseEvent(const Evas_Event_Mouse_Down*, const Evas_Point*);
NativeWebMouseEvent(const Evas_Event_Mouse_Up*, const Evas_Point*);
NativeWebMouseEvent(const Evas_Event_Mouse_Move*, const Evas_Point*);
#endif
#if PLATFORM(MAC)
NSEvent* nativeEvent() const { return m_nativeEvent.get(); }
#elif PLATFORM(WIN)
const MSG* nativeEvent() const { return &m_nativeEvent; }
#elif PLATFORM(QT)
const QMouseEvent* nativeEvent() const { return m_nativeEvent; }
#elif PLATFORM(GTK)
const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); }
#elif PLATFORM(EFL)
const void* nativeEvent() const { return m_nativeEvent; }
#endif
private:
#if PLATFORM(MAC)
RetainPtr<NSEvent> m_nativeEvent;
#elif PLATFORM(WIN)
MSG m_nativeEvent;
#elif PLATFORM(QT)
QMouseEvent* m_nativeEvent;
#elif PLATFORM(GTK)
GOwnPtr<GdkEvent> m_nativeEvent;
#elif PLATFORM(EFL)
const void* m_nativeEvent;
#endif
};
}
#endif // NativeWebMouseEvent_h