]>
git.saurik.com Git - iphone-api.git/blob - WebCore/GestureEvent.h
2 * Copyright (C) 2008, Apple Inc. All rights reserved.
4 * No license or rights are granted by Apple expressly or by implication,
5 * estoppel, or otherwise, to Apple copyrights, patents, trademarks, trade
6 * secrets or other rights.
10 #define GestureEvent_h
12 #include <wtf/Platform.h>
14 #if ENABLE(TOUCH_EVENTS)
16 #include <wtf/RefPtr.h>
17 #include "MouseRelatedEvent.h"
18 #include "EventTarget.h"
22 class GestureEvent
: public MouseRelatedEvent
{
24 static PassRefPtr
<GestureEvent
> create()
26 return adoptRef(new GestureEvent
);
28 static PassRefPtr
<GestureEvent
> create(
29 const AtomicString
& type
, bool canBubble
, bool cancelable
, AbstractView
* view
, int detail
,
30 int screenX
, int screenY
, int pageX
, int pageY
,
31 bool ctrlKey
, bool altKey
, bool shiftKey
, bool metaKey
,
32 EventTarget
* target
, float scale
, float rotation
, bool isSimulated
= false)
34 return adoptRef(new GestureEvent(
35 type
, canBubble
, cancelable
, view
, detail
,
36 screenX
, screenY
, pageX
, pageY
,
37 ctrlKey
, altKey
, shiftKey
, metaKey
,
38 target
, scale
, rotation
, isSimulated
));
40 virtual ~GestureEvent() {}
42 void initGestureEvent(const AtomicString
& type
, bool canBubble
, bool cancelable
, AbstractView
* view
, int detail
,
43 int screenX
, int screenY
, int clientX
, int clientY
,
44 bool ctrlKey
, bool altKey
, bool shiftKey
, bool metaKey
,
45 EventTarget
* target
, float scale
, float rotation
);
47 virtual bool isGestureEvent() const { return true; }
49 float scale() const { return m_scale
; }
50 float rotation() const { return m_rotation
; }
54 GestureEvent(const AtomicString
& type
, bool canBubble
, bool cancelable
, AbstractView
* view
, int detail
,
55 int screenX
, int screenY
, int pageX
, int pageY
,
56 bool ctrlKey
, bool altKey
, bool shiftKey
, bool metaKey
,
57 EventTarget
* target
, float scale
, float rotation
, bool isSimulated
= false);
63 } // namespace WebCore
65 #endif // ENABLE(TOUCH_EVENTS)
67 #endif // GestureEvent_h