2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
24 #if ENABLE(TOUCH_EVENTS)
26 #include "JSDOMBinding.h"
28 #include <runtime/JSGlobalObject.h>
29 #include <runtime/JSObject.h>
30 #include <runtime/ObjectPrototype.h>
34 class JSTouch : public JSDOMWrapper {
36 typedef JSDOMWrapper Base;
37 static JSTouch* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<Touch> impl)
39 JSTouch* ptr = new (JSC::allocateCell<JSTouch>(globalObject->globalData().heap)) JSTouch(structure, globalObject, impl);
40 ptr->finishCreation(globalObject->globalData());
44 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
45 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
46 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
47 static const JSC::ClassInfo s_info;
49 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
51 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
54 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
55 Touch* impl() const { return m_impl; }
56 void releaseImpl() { m_impl->deref(); m_impl = 0; }
61 JSTouch(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<Touch>);
62 void finishCreation(JSC::JSGlobalData&);
63 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
66 class JSTouchOwner : public JSC::WeakHandleOwner {
67 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
68 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
71 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, Touch*)
73 DEFINE_STATIC_LOCAL(JSTouchOwner, jsTouchOwner, ());
77 inline void* wrapperContext(DOMWrapperWorld* world, Touch*)
82 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Touch*);
83 Touch* toTouch(JSC::JSValue);
84 JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Touch*);
86 class JSTouchPrototype : public JSC::JSNonFinalObject {
88 typedef JSC::JSNonFinalObject Base;
89 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
90 static JSTouchPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
92 JSTouchPrototype* ptr = new (JSC::allocateCell<JSTouchPrototype>(globalData.heap)) JSTouchPrototype(globalData, globalObject, structure);
93 ptr->finishCreation(globalData);
97 static const JSC::ClassInfo s_info;
98 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
100 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
104 JSTouchPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
106 static const unsigned StructureFlags = Base::StructureFlags;
109 class JSTouchConstructor : public DOMConstructorObject {
111 JSTouchConstructor(JSC::Structure*, JSDOMGlobalObject*);
112 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
115 typedef DOMConstructorObject Base;
116 static JSTouchConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
118 JSTouchConstructor* ptr = new (JSC::allocateCell<JSTouchConstructor>(*exec->heap())) JSTouchConstructor(structure, globalObject);
119 ptr->finishCreation(exec, globalObject);
123 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
124 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
125 static const JSC::ClassInfo s_info;
126 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
128 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
131 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
136 JSC::JSValue jsTouchClientX(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
137 JSC::JSValue jsTouchClientY(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
138 JSC::JSValue jsTouchScreenX(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
139 JSC::JSValue jsTouchScreenY(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
140 JSC::JSValue jsTouchPageX(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
141 JSC::JSValue jsTouchPageY(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
142 JSC::JSValue jsTouchTarget(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
143 JSC::JSValue jsTouchIdentifier(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
144 JSC::JSValue jsTouchWebkitRadiusX(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
145 JSC::JSValue jsTouchWebkitRadiusY(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
146 JSC::JSValue jsTouchWebkitRotationAngle(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
147 JSC::JSValue jsTouchWebkitForce(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
148 JSC::JSValue jsTouchConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
150 } // namespace WebCore
152 #endif // ENABLE(TOUCH_EVENTS)