|
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 #include "config.h" |
|
22 |
|
23 #if ENABLE(SVG) && ENABLE(FILTERS) |
|
24 |
|
25 #include "JSSVGComponentTransferFunctionElement.h" |
|
26 |
|
27 #include "JSSVGAnimatedEnumeration.h" |
|
28 #include "JSSVGAnimatedNumber.h" |
|
29 #include "JSSVGAnimatedNumberList.h" |
|
30 #include "SVGComponentTransferFunctionElement.h" |
|
31 #include <wtf/GetPtr.h> |
|
32 |
|
33 using namespace JSC; |
|
34 |
|
35 namespace WebCore { |
|
36 |
|
37 ASSERT_CLASS_FITS_IN_CELL(JSSVGComponentTransferFunctionElement); |
|
38 |
|
39 /* Hash table */ |
|
40 #if ENABLE(JIT) |
|
41 #define THUNK_GENERATOR(generator) , generator |
|
42 #else |
|
43 #define THUNK_GENERATOR(generator) |
|
44 #endif |
|
45 |
|
46 static const HashTableValue JSSVGComponentTransferFunctionElementTableValues[9] = |
|
47 { |
|
48 { "type", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementType), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
49 { "tableValues", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementTableValues), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
50 { "slope", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSlope), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
51 { "intercept", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementIntercept), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
52 { "amplitude", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementAmplitude), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
53 { "exponent", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementExponent), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
54 { "offset", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementOffset), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
55 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
56 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
57 }; |
|
58 |
|
59 #undef THUNK_GENERATOR |
|
60 static JSC_CONST_HASHTABLE HashTable JSSVGComponentTransferFunctionElementTable = { 19, 15, JSSVGComponentTransferFunctionElementTableValues, 0 }; |
|
61 /* Hash table for constructor */ |
|
62 #if ENABLE(JIT) |
|
63 #define THUNK_GENERATOR(generator) , generator |
|
64 #else |
|
65 #define THUNK_GENERATOR(generator) |
|
66 #endif |
|
67 |
|
68 static const HashTableValue JSSVGComponentTransferFunctionElementConstructorTableValues[7] = |
|
69 { |
|
70 { "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
71 { "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_IDENTITY), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
72 { "SVG_FECOMPONENTTRANSFER_TYPE_TABLE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_TABLE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
73 { "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_DISCRETE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
74 { "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_LINEAR), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
75 { "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_GAMMA), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
76 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
77 }; |
|
78 |
|
79 #undef THUNK_GENERATOR |
|
80 static JSC_CONST_HASHTABLE HashTable JSSVGComponentTransferFunctionElementConstructorTable = { 17, 15, JSSVGComponentTransferFunctionElementConstructorTableValues, 0 }; |
|
81 class JSSVGComponentTransferFunctionElementConstructor : public DOMConstructorObject { |
|
82 public: |
|
83 JSSVGComponentTransferFunctionElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
84 |
|
85 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
86 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
87 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
88 static const JSC::ClassInfo s_info; |
|
89 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
90 { |
|
91 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
92 } |
|
93 protected: |
|
94 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
95 }; |
|
96 |
|
97 const ClassInfo JSSVGComponentTransferFunctionElementConstructor::s_info = { "SVGComponentTransferFunctionElementConstructor", 0, &JSSVGComponentTransferFunctionElementConstructorTable, 0 }; |
|
98 |
|
99 JSSVGComponentTransferFunctionElementConstructor::JSSVGComponentTransferFunctionElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
100 : DOMConstructorObject(JSSVGComponentTransferFunctionElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
101 { |
|
102 putDirect(exec->propertyNames().prototype, JSSVGComponentTransferFunctionElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
103 } |
|
104 |
|
105 bool JSSVGComponentTransferFunctionElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
106 { |
|
107 return getStaticValueSlot<JSSVGComponentTransferFunctionElementConstructor, DOMObject>(exec, &JSSVGComponentTransferFunctionElementConstructorTable, this, propertyName, slot); |
|
108 } |
|
109 |
|
110 bool JSSVGComponentTransferFunctionElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
111 { |
|
112 return getStaticValueDescriptor<JSSVGComponentTransferFunctionElementConstructor, DOMObject>(exec, &JSSVGComponentTransferFunctionElementConstructorTable, this, propertyName, descriptor); |
|
113 } |
|
114 |
|
115 /* Hash table for prototype */ |
|
116 #if ENABLE(JIT) |
|
117 #define THUNK_GENERATOR(generator) , generator |
|
118 #else |
|
119 #define THUNK_GENERATOR(generator) |
|
120 #endif |
|
121 |
|
122 static const HashTableValue JSSVGComponentTransferFunctionElementPrototypeTableValues[7] = |
|
123 { |
|
124 { "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
125 { "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_IDENTITY), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
126 { "SVG_FECOMPONENTTRANSFER_TYPE_TABLE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_TABLE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
127 { "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_DISCRETE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
128 { "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_LINEAR), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
129 { "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_GAMMA), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
130 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
131 }; |
|
132 |
|
133 #undef THUNK_GENERATOR |
|
134 static JSC_CONST_HASHTABLE HashTable JSSVGComponentTransferFunctionElementPrototypeTable = { 17, 15, JSSVGComponentTransferFunctionElementPrototypeTableValues, 0 }; |
|
135 const ClassInfo JSSVGComponentTransferFunctionElementPrototype::s_info = { "SVGComponentTransferFunctionElementPrototype", 0, &JSSVGComponentTransferFunctionElementPrototypeTable, 0 }; |
|
136 |
|
137 JSObject* JSSVGComponentTransferFunctionElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
138 { |
|
139 return getDOMPrototype<JSSVGComponentTransferFunctionElement>(exec, globalObject); |
|
140 } |
|
141 |
|
142 bool JSSVGComponentTransferFunctionElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
143 { |
|
144 return getStaticValueSlot<JSSVGComponentTransferFunctionElementPrototype, JSObject>(exec, &JSSVGComponentTransferFunctionElementPrototypeTable, this, propertyName, slot); |
|
145 } |
|
146 |
|
147 bool JSSVGComponentTransferFunctionElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
148 { |
|
149 return getStaticValueDescriptor<JSSVGComponentTransferFunctionElementPrototype, JSObject>(exec, &JSSVGComponentTransferFunctionElementPrototypeTable, this, propertyName, descriptor); |
|
150 } |
|
151 |
|
152 const ClassInfo JSSVGComponentTransferFunctionElement::s_info = { "SVGComponentTransferFunctionElement", &JSSVGElement::s_info, &JSSVGComponentTransferFunctionElementTable, 0 }; |
|
153 |
|
154 JSSVGComponentTransferFunctionElement::JSSVGComponentTransferFunctionElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGComponentTransferFunctionElement> impl) |
|
155 : JSSVGElement(structure, globalObject, impl) |
|
156 { |
|
157 } |
|
158 |
|
159 JSObject* JSSVGComponentTransferFunctionElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
160 { |
|
161 return new (exec) JSSVGComponentTransferFunctionElementPrototype(globalObject, JSSVGComponentTransferFunctionElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); |
|
162 } |
|
163 |
|
164 bool JSSVGComponentTransferFunctionElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
165 { |
|
166 return getStaticValueSlot<JSSVGComponentTransferFunctionElement, Base>(exec, &JSSVGComponentTransferFunctionElementTable, this, propertyName, slot); |
|
167 } |
|
168 |
|
169 bool JSSVGComponentTransferFunctionElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
170 { |
|
171 return getStaticValueDescriptor<JSSVGComponentTransferFunctionElement, Base>(exec, &JSSVGComponentTransferFunctionElementTable, this, propertyName, descriptor); |
|
172 } |
|
173 |
|
174 JSValue jsSVGComponentTransferFunctionElementType(ExecState* exec, JSValue slotBase, const Identifier&) |
|
175 { |
|
176 JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slotBase)); |
|
177 UNUSED_PARAM(exec); |
|
178 SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); |
|
179 RefPtr<SVGAnimatedEnumeration> obj = imp->typeAnimated(); |
|
180 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
181 return result; |
|
182 } |
|
183 |
|
184 JSValue jsSVGComponentTransferFunctionElementTableValues(ExecState* exec, JSValue slotBase, const Identifier&) |
|
185 { |
|
186 JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slotBase)); |
|
187 UNUSED_PARAM(exec); |
|
188 SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); |
|
189 RefPtr<SVGAnimatedNumberList> obj = imp->tableValuesAnimated(); |
|
190 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
191 return result; |
|
192 } |
|
193 |
|
194 JSValue jsSVGComponentTransferFunctionElementSlope(ExecState* exec, JSValue slotBase, const Identifier&) |
|
195 { |
|
196 JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slotBase)); |
|
197 UNUSED_PARAM(exec); |
|
198 SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); |
|
199 RefPtr<SVGAnimatedNumber> obj = imp->slopeAnimated(); |
|
200 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
201 return result; |
|
202 } |
|
203 |
|
204 JSValue jsSVGComponentTransferFunctionElementIntercept(ExecState* exec, JSValue slotBase, const Identifier&) |
|
205 { |
|
206 JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slotBase)); |
|
207 UNUSED_PARAM(exec); |
|
208 SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); |
|
209 RefPtr<SVGAnimatedNumber> obj = imp->interceptAnimated(); |
|
210 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
211 return result; |
|
212 } |
|
213 |
|
214 JSValue jsSVGComponentTransferFunctionElementAmplitude(ExecState* exec, JSValue slotBase, const Identifier&) |
|
215 { |
|
216 JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slotBase)); |
|
217 UNUSED_PARAM(exec); |
|
218 SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); |
|
219 RefPtr<SVGAnimatedNumber> obj = imp->amplitudeAnimated(); |
|
220 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
221 return result; |
|
222 } |
|
223 |
|
224 JSValue jsSVGComponentTransferFunctionElementExponent(ExecState* exec, JSValue slotBase, const Identifier&) |
|
225 { |
|
226 JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slotBase)); |
|
227 UNUSED_PARAM(exec); |
|
228 SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); |
|
229 RefPtr<SVGAnimatedNumber> obj = imp->exponentAnimated(); |
|
230 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
231 return result; |
|
232 } |
|
233 |
|
234 JSValue jsSVGComponentTransferFunctionElementOffset(ExecState* exec, JSValue slotBase, const Identifier&) |
|
235 { |
|
236 JSSVGComponentTransferFunctionElement* castedThis = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slotBase)); |
|
237 UNUSED_PARAM(exec); |
|
238 SVGComponentTransferFunctionElement* imp = static_cast<SVGComponentTransferFunctionElement*>(castedThis->impl()); |
|
239 RefPtr<SVGAnimatedNumber> obj = imp->offsetAnimated(); |
|
240 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
241 return result; |
|
242 } |
|
243 |
|
244 JSValue jsSVGComponentTransferFunctionElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
245 { |
|
246 JSSVGComponentTransferFunctionElement* domObject = static_cast<JSSVGComponentTransferFunctionElement*>(asObject(slotBase)); |
|
247 return JSSVGComponentTransferFunctionElement::getConstructor(exec, domObject->globalObject()); |
|
248 } |
|
249 JSValue JSSVGComponentTransferFunctionElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
250 { |
|
251 return getDOMConstructor<JSSVGComponentTransferFunctionElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
252 } |
|
253 |
|
254 // Constant getters |
|
255 |
|
256 JSValue jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN(ExecState* exec, JSValue, const Identifier&) |
|
257 { |
|
258 return jsNumber(exec, static_cast<int>(0)); |
|
259 } |
|
260 |
|
261 JSValue jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_IDENTITY(ExecState* exec, JSValue, const Identifier&) |
|
262 { |
|
263 return jsNumber(exec, static_cast<int>(1)); |
|
264 } |
|
265 |
|
266 JSValue jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_TABLE(ExecState* exec, JSValue, const Identifier&) |
|
267 { |
|
268 return jsNumber(exec, static_cast<int>(2)); |
|
269 } |
|
270 |
|
271 JSValue jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_DISCRETE(ExecState* exec, JSValue, const Identifier&) |
|
272 { |
|
273 return jsNumber(exec, static_cast<int>(3)); |
|
274 } |
|
275 |
|
276 JSValue jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_LINEAR(ExecState* exec, JSValue, const Identifier&) |
|
277 { |
|
278 return jsNumber(exec, static_cast<int>(4)); |
|
279 } |
|
280 |
|
281 JSValue jsSVGComponentTransferFunctionElementSVG_FECOMPONENTTRANSFER_TYPE_GAMMA(ExecState* exec, JSValue, const Identifier&) |
|
282 { |
|
283 return jsNumber(exec, static_cast<int>(5)); |
|
284 } |
|
285 |
|
286 |
|
287 } |
|
288 |
|
289 #endif // ENABLE(SVG) && ENABLE(FILTERS) |