]>
git.saurik.com Git - iphone-api.git/blob - WebCore/PlatformTouchEvent.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.
9 #ifndef PlatformTouchEvent_h
10 #define PlatformTouchEvent_h
12 #include <JavaScriptCore/Platform.h>
14 #if ENABLE(TOUCH_EVENTS)
16 #include <GraphicsServices/GSEvent.h>
17 #include <wtf/Vector.h>
23 enum TouchEventType
{ TouchEventBegin
, TouchEventChange
, TouchEventEnd
, TouchEventCancel
};
25 class PlatformTouchEvent
{
27 PlatformTouchEvent(GSEventRef
);
29 TouchEventType
eventType() const;
30 double timestamp() const;
31 unsigned touchCount() const;
32 IntPoint
touchLocationAtIndex(unsigned) const;
33 IntPoint
globalTouchLocationAtIndex(unsigned) const;
34 unsigned touchIdentifierAtIndex(unsigned) const;
36 bool gestureChanged() const;
38 float scaleAbsolute() const;
39 float rotationAbsolute() const;
41 GSEventRef
platformEvent() const { return m_gsEvent
; }
44 unsigned m_fingerCount
;
45 Vector
<GSEventPathInfo
> m_pathData
;
47 } // namespace WebCore
49 #endif // ENABLE(TOUCH_EVENTS)
51 #endif // PlatformTouchEvent_h