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 <qgraphicssceneevent.h>
#elif PLATFORM(GTK)
#include <GOwnPtrGtk.h>
typedef union _GdkEvent GdkEvent;
#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(QGraphicsSceneMouseEvent*, int);
#elif PLATFORM(GTK)
NativeWebMouseEvent(const NativeWebMouseEvent&);
NativeWebMouseEvent(GdkEvent*, int);
#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 QGraphicsSceneMouseEvent* nativeEvent() const { return m_nativeEvent; }
#elif PLATFORM(GTK)
const GdkEvent* nativeEvent() const { return m_nativeEvent.get(); }
#endif
private:
#if PLATFORM(MAC)
RetainPtr<NSEvent> m_nativeEvent;
#elif PLATFORM(WIN)
MSG m_nativeEvent;
#elif PLATFORM(QT)
QGraphicsSceneMouseEvent* m_nativeEvent;
#elif PLATFORM(GTK)
GOwnPtr<GdkEvent> m_nativeEvent;
#endif
};
}
#endif // NativeWebMouseEvent_h