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.
21 #ifndef JSDOMTokenList_h
22 #define JSDOMTokenList_h
24 #include "DOMTokenList.h"
25 #include "JSDOMBinding.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
32 class JSDOMTokenList : public JSDOMWrapper {
34 typedef JSDOMWrapper Base;
35 static JSDOMTokenList* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<DOMTokenList> impl)
37 JSDOMTokenList* ptr = new (JSC::allocateCell<JSDOMTokenList>(globalObject->globalData().heap)) JSDOMTokenList(structure, globalObject, impl);
38 ptr->finishCreation(globalObject->globalData());
42 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
43 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
44 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
45 static bool getOwnPropertySlotByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
46 static const JSC::ClassInfo s_info;
48 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
50 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
53 static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);
54 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
55 DOMTokenList* impl() const { return m_impl; }
56 void releaseImpl() { m_impl->deref(); m_impl = 0; }
61 JSDOMTokenList(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<DOMTokenList>);
62 void finishCreation(JSC::JSGlobalData&);
63 static const unsigned StructureFlags = JSC::OverridesGetPropertyNames | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
64 static JSC::JSValue indexGetter(JSC::ExecState*, JSC::JSValue, unsigned);
67 class JSDOMTokenListOwner : public JSC::WeakHandleOwner {
68 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
69 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
72 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, DOMTokenList*)
74 DEFINE_STATIC_LOCAL(JSDOMTokenListOwner, jsDOMTokenListOwner, ());
75 return &jsDOMTokenListOwner;
78 inline void* wrapperContext(DOMWrapperWorld* world, DOMTokenList*)
83 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMTokenList*);
84 DOMTokenList* toDOMTokenList(JSC::JSValue);
86 class JSDOMTokenListPrototype : public JSC::JSNonFinalObject {
88 typedef JSC::JSNonFinalObject Base;
89 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
90 static JSDOMTokenListPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
92 JSDOMTokenListPrototype* ptr = new (JSC::allocateCell<JSDOMTokenListPrototype>(globalData.heap)) JSDOMTokenListPrototype(globalData, globalObject, structure);
93 ptr->finishCreation(globalData);
97 static const JSC::ClassInfo s_info;
98 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
99 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
100 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
102 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
106 JSDOMTokenListPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
108 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
111 class JSDOMTokenListConstructor : public DOMConstructorObject {
113 JSDOMTokenListConstructor(JSC::Structure*, JSDOMGlobalObject*);
114 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
117 typedef DOMConstructorObject Base;
118 static JSDOMTokenListConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
120 JSDOMTokenListConstructor* ptr = new (JSC::allocateCell<JSDOMTokenListConstructor>(*exec->heap())) JSDOMTokenListConstructor(structure, globalObject);
121 ptr->finishCreation(exec, globalObject);
125 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
126 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
127 static const JSC::ClassInfo s_info;
128 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
130 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
133 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
138 JSC::EncodedJSValue JSC_HOST_CALL jsDOMTokenListPrototypeFunctionItem(JSC::ExecState*);
139 JSC::EncodedJSValue JSC_HOST_CALL jsDOMTokenListPrototypeFunctionContains(JSC::ExecState*);
140 JSC::EncodedJSValue JSC_HOST_CALL jsDOMTokenListPrototypeFunctionAdd(JSC::ExecState*);
141 JSC::EncodedJSValue JSC_HOST_CALL jsDOMTokenListPrototypeFunctionRemove(JSC::ExecState*);
142 JSC::EncodedJSValue JSC_HOST_CALL jsDOMTokenListPrototypeFunctionToggle(JSC::ExecState*);
143 JSC::EncodedJSValue JSC_HOST_CALL jsDOMTokenListPrototypeFunctionToString(JSC::ExecState*);
146 JSC::JSValue jsDOMTokenListLength(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
147 JSC::JSValue jsDOMTokenListConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
149 } // namespace WebCore