]>
git.saurik.com Git - iphone-api.git/blob - WebCore/TouchList.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.
12 #include <wtf/Platform.h>
14 #if ENABLE(TOUCH_EVENTS)
16 #include <wtf/RefCounted.h>
17 #include <wtf/PassRefPtr.h>
18 #include <wtf/Vector.h>
23 class TouchList
: public RefCounted
<TouchList
> {
25 static PassRefPtr
<TouchList
> create()
27 return adoptRef(new TouchList());
29 virtual ~TouchList() {}
31 virtual bool isTouchList() { return true; }
33 unsigned length() const { return m_values
.size(); }
34 Touch
* item (unsigned index
) { return index
< length() ? m_values
[index
].get() : 0; }
36 void append(const PassRefPtr
<Touch
>);
41 Vector
<RefPtr
<Touch
> > m_values
;
44 } // namespace WebCore
46 #endif // ENABLE(TOUCH_EVENTS)