|
1 /* |
|
2 This file is part of the WebKit open source project. |
|
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
|
4 |
|
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. |
|
9 |
|
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. |
|
14 |
|
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. |
|
19 */ |
|
20 |
|
21 #ifndef JSHTMLCollection_h |
|
22 #define JSHTMLCollection_h |
|
23 |
|
24 #include "JSDOMBinding.h" |
|
25 #include <runtime/CallData.h> |
|
26 #include <runtime/JSGlobalObject.h> |
|
27 #include <runtime/JSObjectWithGlobalObject.h> |
|
28 #include <runtime/ObjectPrototype.h> |
|
29 |
|
30 namespace WebCore { |
|
31 |
|
32 class HTMLCollection; |
|
33 |
|
34 class JSHTMLCollection : public DOMObjectWithGlobalPointer { |
|
35 typedef DOMObjectWithGlobalPointer Base; |
|
36 public: |
|
37 JSHTMLCollection(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<HTMLCollection>); |
|
38 virtual ~JSHTMLCollection(); |
|
39 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); |
|
40 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); |
|
41 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&); |
|
42 virtual bool getOwnPropertySlot(JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&); |
|
43 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
44 static const JSC::ClassInfo s_info; |
|
45 |
|
46 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
47 { |
|
48 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
49 } |
|
50 |
|
51 virtual JSC::CallType getCallData(JSC::CallData&); |
|
52 |
|
53 virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties); |
|
54 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); |
|
55 |
|
56 // Custom functions |
|
57 JSC::JSValue item(JSC::ExecState*); |
|
58 JSC::JSValue namedItem(JSC::ExecState*); |
|
59 HTMLCollection* impl() const { return m_impl.get(); } |
|
60 |
|
61 private: |
|
62 RefPtr<HTMLCollection> m_impl; |
|
63 protected: |
|
64 static const unsigned StructureFlags = JSC::OverridesGetPropertyNames | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; |
|
65 static JSC::JSValue indexGetter(JSC::ExecState*, JSC::JSValue, unsigned); |
|
66 private: |
|
67 static bool canGetItemsForName(JSC::ExecState*, HTMLCollection*, const JSC::Identifier&); |
|
68 static JSC::JSValue nameGetter(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); |
|
69 }; |
|
70 |
|
71 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, HTMLCollection*); |
|
72 HTMLCollection* toHTMLCollection(JSC::JSValue); |
|
73 |
|
74 class JSHTMLCollectionPrototype : public JSC::JSObjectWithGlobalObject { |
|
75 typedef JSC::JSObjectWithGlobalObject Base; |
|
76 public: |
|
77 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); |
|
78 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
79 static const JSC::ClassInfo s_info; |
|
80 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
81 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
82 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
83 { |
|
84 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
85 } |
|
86 JSHTMLCollectionPrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { } |
|
87 protected: |
|
88 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; |
|
89 }; |
|
90 |
|
91 // Functions |
|
92 |
|
93 JSC::EncodedJSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionItem(JSC::ExecState*); |
|
94 JSC::EncodedJSValue JSC_HOST_CALL jsHTMLCollectionPrototypeFunctionNamedItem(JSC::ExecState*); |
|
95 // Attributes |
|
96 |
|
97 JSC::JSValue jsHTMLCollectionLength(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); |
|
98 JSC::JSValue jsHTMLCollectionConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); |
|
99 |
|
100 } // namespace WebCore |
|
101 |
|
102 #endif |