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 JSHTMLOptionsCollection_h
22 #define JSHTMLOptionsCollection_h
23 
24 #include "HTMLOptionsCollection.h"
25 #include "JSHTMLCollection.h"
26 #include <runtime/JSObjectWithGlobalObject.h>
27 
28 namespace WebCore {
29 
30 class HTMLOptionsCollection;
31 
32 class JSHTMLOptionsCollection : public JSHTMLCollection {
33     typedef JSHTMLCollection Base;
34 public:
35     JSHTMLOptionsCollection(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<HTMLOptionsCollection>);
36     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
37     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
38     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
39     virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
40     virtual void put(JSC::ExecState*, unsigned propertyName, JSC::JSValue);
41     static const JSC::ClassInfo s_info;
42 
createStructure(JSC::JSGlobalData & globalData,JSC::JSValue prototype)43     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
44     {
45         return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
46     }
47 
48     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
49 
50     // Custom attributes
51     JSC::JSValue length(JSC::ExecState*) const;
52     void setLength(JSC::ExecState*, JSC::JSValue);
53 
54     // Custom functions
55     JSC::JSValue add(JSC::ExecState*);
56     JSC::JSValue remove(JSC::ExecState*);
impl()57     HTMLOptionsCollection* impl() const
58     {
59         return static_cast<HTMLOptionsCollection*>(Base::impl());
60     }
61 protected:
62     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
63     void indexSetter(JSC::ExecState*, unsigned index, JSC::JSValue);
64 };
65 
66 HTMLOptionsCollection* toHTMLOptionsCollection(JSC::JSValue);
67 
68 class JSHTMLOptionsCollectionPrototype : public JSC::JSObjectWithGlobalObject {
69     typedef JSC::JSObjectWithGlobalObject Base;
70 public:
71     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
72     static const JSC::ClassInfo s_info;
73     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
74     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
createStructure(JSC::JSGlobalData & globalData,JSC::JSValue prototype)75     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
76     {
77         return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
78     }
JSHTMLOptionsCollectionPrototype(JSC::JSGlobalData & globalData,JSC::JSGlobalObject * globalObject,JSC::Structure * structure)79     JSHTMLOptionsCollectionPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) : JSC::JSObjectWithGlobalObject(globalData, globalObject, structure) { }
80 protected:
81     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
82 };
83 
84 // Functions
85 
86 JSC::EncodedJSValue JSC_HOST_CALL jsHTMLOptionsCollectionPrototypeFunctionAdd(JSC::ExecState*);
87 JSC::EncodedJSValue JSC_HOST_CALL jsHTMLOptionsCollectionPrototypeFunctionRemove(JSC::ExecState*);
88 // Attributes
89 
90 JSC::JSValue jsHTMLOptionsCollectionSelectedIndex(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
91 void setJSHTMLOptionsCollectionSelectedIndex(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
92 JSC::JSValue jsHTMLOptionsCollectionLength(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
93 void setJSHTMLOptionsCollectionLength(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
94 JSC::JSValue jsHTMLOptionsCollectionConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
95 
96 } // namespace WebCore
97 
98 #endif
99