|
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 "JSHTMLCollection.h" |
|
25 |
|
26 namespace WebCore { |
|
27 |
|
28 class HTMLOptionsCollection; |
|
29 |
|
30 class JSHTMLOptionsCollection : public JSHTMLCollection { |
|
31 public: |
|
32 JSHTMLOptionsCollection(KJS::ExecState*, HTMLOptionsCollection*); |
|
33 virtual bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&); |
|
34 KJS::JSValue* getValueProperty(KJS::ExecState*, int token) const; |
|
35 virtual void put(KJS::ExecState*, const KJS::Identifier&, KJS::JSValue*, int attr = KJS::None); |
|
36 void putValueProperty(KJS::ExecState*, int, KJS::JSValue*, int attr); |
|
37 virtual const KJS::ClassInfo* classInfo() const { return &info; } |
|
38 static const KJS::ClassInfo info; |
|
39 |
|
40 enum { |
|
41 // Attributes |
|
42 SelectedIndexAttrNum, LengthAttrNum, |
|
43 |
|
44 // Functions |
|
45 AddFuncNum |
|
46 }; |
|
47 |
|
48 // Custom attributes |
|
49 KJS::JSValue* length(KJS::ExecState*) const; |
|
50 void setLength(KJS::ExecState*, KJS::JSValue*); |
|
51 void indexSetter(KJS::ExecState*, unsigned index, KJS::JSValue*, int attr); |
|
52 HTMLOptionsCollection* impl() const; |
|
53 }; |
|
54 |
|
55 HTMLOptionsCollection* toHTMLOptionsCollection(KJS::JSValue*); |
|
56 |
|
57 class JSHTMLOptionsCollectionPrototype : public KJS::JSObject { |
|
58 public: |
|
59 static KJS::JSObject* self(KJS::ExecState* exec); |
|
60 virtual const KJS::ClassInfo* classInfo() const { return &info; } |
|
61 static const KJS::ClassInfo info; |
|
62 bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&); |
|
63 JSHTMLOptionsCollectionPrototype(KJS::ExecState* exec) |
|
64 : KJS::JSObject(JSHTMLCollectionPrototype::self(exec)) { } |
|
65 }; |
|
66 |
|
67 class JSHTMLOptionsCollectionPrototypeFunction : public KJS::InternalFunctionImp { |
|
68 public: |
|
69 JSHTMLOptionsCollectionPrototypeFunction(KJS::ExecState* exec, int i, int len, const KJS::Identifier& name) |
|
70 : KJS::InternalFunctionImp(static_cast<KJS::FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()), name) |
|
71 , id(i) |
|
72 { |
|
73 put(exec, exec->propertyNames().length, KJS::jsNumber(len), KJS::DontDelete|KJS::ReadOnly|KJS::DontEnum); |
|
74 } |
|
75 virtual KJS::JSValue* callAsFunction(KJS::ExecState*, KJS::JSObject*, const KJS::List&); |
|
76 |
|
77 private: |
|
78 int id; |
|
79 }; |
|
80 |
|
81 } // namespace WebCore |
|
82 |
|
83 #endif |