tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSSVGCursorElement.cpp
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)
24
25 #include "JSSVGCursorElement.h"
26
27 #include "ExceptionCode.h"
28 #include "JSDOMBinding.h"
29 #include "JSSVGAnimatedBoolean.h"
30 #include "JSSVGAnimatedLength.h"
31 #include "JSSVGAnimatedString.h"
32 #include "JSSVGStringList.h"
33 #include "SVGCursorElement.h"
34 #include "SVGStringList.h"
35 #include <runtime/Error.h>
36 #include <wtf/GetPtr.h>
37
38 using namespace JSC;
39
40 namespace WebCore {
41
42 ASSERT_CLASS_FITS_IN_CELL(JSSVGCursorElement);
43
44 /* Hash table */
45 #if ENABLE(JIT)
46 #define THUNK_GENERATOR(generator) , generator
47 #else
48 #define THUNK_GENERATOR(generator)
49 #endif
50 #if ENABLE(DFG_JIT)
51 #define INTRINSIC(intrinsic) , intrinsic
52 #else
53 #define INTRINSIC(intrinsic)
54 #endif
55
56 static const HashTableValue JSSVGCursorElementTableValues[] =
57 {
58     { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementX), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
59     { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementY), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
60     { "href", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementHref), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
61     { "requiredFeatures", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementRequiredFeatures), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
62     { "requiredExtensions", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementRequiredExtensions), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
63     { "systemLanguage", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementSystemLanguage), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
64     { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
65     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
66     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
67 };
68
69 #undef THUNK_GENERATOR
70 static const HashTable JSSVGCursorElementTable = { 18, 15, JSSVGCursorElementTableValues, 0 };
71 /* Hash table for constructor */
72 #if ENABLE(JIT)
73 #define THUNK_GENERATOR(generator) , generator
74 #else
75 #define THUNK_GENERATOR(generator)
76 #endif
77 #if ENABLE(DFG_JIT)
78 #define INTRINSIC(intrinsic) , intrinsic
79 #else
80 #define INTRINSIC(intrinsic)
81 #endif
82
83 static const HashTableValue JSSVGCursorElementConstructorTableValues[] =
84 {
85     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
86 };
87
88 #undef THUNK_GENERATOR
89 static const HashTable JSSVGCursorElementConstructorTable = { 1, 0, JSSVGCursorElementConstructorTableValues, 0 };
90 const ClassInfo JSSVGCursorElementConstructor::s_info = { "SVGCursorElementConstructor", &DOMConstructorObject::s_info, &JSSVGCursorElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGCursorElementConstructor) };
91
92 JSSVGCursorElementConstructor::JSSVGCursorElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
93     : DOMConstructorObject(structure, globalObject)
94 {
95 }
96
97 void JSSVGCursorElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
98 {
99     Base::finishCreation(exec->globalData());
100     ASSERT(inherits(&s_info));
101     putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGCursorElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
102 }
103
104 bool JSSVGCursorElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
105 {
106     return getStaticValueSlot<JSSVGCursorElementConstructor, JSDOMWrapper>(exec, &JSSVGCursorElementConstructorTable, static_cast<JSSVGCursorElementConstructor*>(cell), propertyName, slot);
107 }
108
109 bool JSSVGCursorElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
110 {
111     return getStaticValueDescriptor<JSSVGCursorElementConstructor, JSDOMWrapper>(exec, &JSSVGCursorElementConstructorTable, static_cast<JSSVGCursorElementConstructor*>(object), propertyName, descriptor);
112 }
113
114 /* Hash table for prototype */
115 #if ENABLE(JIT)
116 #define THUNK_GENERATOR(generator) , generator
117 #else
118 #define THUNK_GENERATOR(generator)
119 #endif
120 #if ENABLE(DFG_JIT)
121 #define INTRINSIC(intrinsic) , intrinsic
122 #else
123 #define INTRINSIC(intrinsic)
124 #endif
125
126 static const HashTableValue JSSVGCursorElementPrototypeTableValues[] =
127 {
128     { "hasExtension", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGCursorElementPrototypeFunctionHasExtension), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
129     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
130 };
131
132 #undef THUNK_GENERATOR
133 static const HashTable JSSVGCursorElementPrototypeTable = { 2, 1, JSSVGCursorElementPrototypeTableValues, 0 };
134 const ClassInfo JSSVGCursorElementPrototype::s_info = { "SVGCursorElementPrototype", &JSC::JSNonFinalObject::s_info, &JSSVGCursorElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGCursorElementPrototype) };
135
136 JSObject* JSSVGCursorElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
137 {
138     return getDOMPrototype<JSSVGCursorElement>(exec, globalObject);
139 }
140
141 bool JSSVGCursorElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
142 {
143     JSSVGCursorElementPrototype* thisObject = jsCast<JSSVGCursorElementPrototype*>(cell);
144     return getStaticFunctionSlot<JSObject>(exec, &JSSVGCursorElementPrototypeTable, thisObject, propertyName, slot);
145 }
146
147 bool JSSVGCursorElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
148 {
149     JSSVGCursorElementPrototype* thisObject = jsCast<JSSVGCursorElementPrototype*>(object);
150     return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGCursorElementPrototypeTable, thisObject, propertyName, descriptor);
151 }
152
153 const ClassInfo JSSVGCursorElement::s_info = { "SVGCursorElement", &JSSVGElement::s_info, &JSSVGCursorElementTable, 0 , CREATE_METHOD_TABLE(JSSVGCursorElement) };
154
155 JSSVGCursorElement::JSSVGCursorElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGCursorElement> impl)
156     : JSSVGElement(structure, globalObject, impl)
157 {
158 }
159
160 void JSSVGCursorElement::finishCreation(JSGlobalData& globalData)
161 {
162     Base::finishCreation(globalData);
163     ASSERT(inherits(&s_info));
164 }
165
166 JSObject* JSSVGCursorElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
167 {
168     return JSSVGCursorElementPrototype::create(exec->globalData(), globalObject, JSSVGCursorElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
169 }
170
171 bool JSSVGCursorElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
172 {
173     JSSVGCursorElement* thisObject = jsCast<JSSVGCursorElement*>(cell);
174     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
175     return getStaticValueSlot<JSSVGCursorElement, Base>(exec, &JSSVGCursorElementTable, thisObject, propertyName, slot);
176 }
177
178 bool JSSVGCursorElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
179 {
180     JSSVGCursorElement* thisObject = jsCast<JSSVGCursorElement*>(object);
181     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
182     return getStaticValueDescriptor<JSSVGCursorElement, Base>(exec, &JSSVGCursorElementTable, thisObject, propertyName, descriptor);
183 }
184
185 JSValue jsSVGCursorElementX(ExecState* exec, JSValue slotBase, const Identifier&)
186 {
187     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
188     UNUSED_PARAM(exec);
189     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
190     RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
191     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
192     return result;
193 }
194
195
196 JSValue jsSVGCursorElementY(ExecState* exec, JSValue slotBase, const Identifier&)
197 {
198     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
199     UNUSED_PARAM(exec);
200     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
201     RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
202     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
203     return result;
204 }
205
206
207 JSValue jsSVGCursorElementHref(ExecState* exec, JSValue slotBase, const Identifier&)
208 {
209     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
210     UNUSED_PARAM(exec);
211     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
212     RefPtr<SVGAnimatedString> obj = imp->hrefAnimated();
213     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
214     return result;
215 }
216
217
218 JSValue jsSVGCursorElementRequiredFeatures(ExecState* exec, JSValue slotBase, const Identifier&)
219 {
220     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
221     UNUSED_PARAM(exec);
222     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
223     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->requiredFeatures())));
224     return result;
225 }
226
227
228 JSValue jsSVGCursorElementRequiredExtensions(ExecState* exec, JSValue slotBase, const Identifier&)
229 {
230     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
231     UNUSED_PARAM(exec);
232     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
233     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->requiredExtensions())));
234     return result;
235 }
236
237
238 JSValue jsSVGCursorElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&)
239 {
240     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
241     UNUSED_PARAM(exec);
242     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
243     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticListPropertyTearOff<SVGStringList>::create(imp, imp->systemLanguage())));
244     return result;
245 }
246
247
248 JSValue jsSVGCursorElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&)
249 {
250     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
251     UNUSED_PARAM(exec);
252     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
253     RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
254     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
255     return result;
256 }
257
258
259 JSValue jsSVGCursorElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
260 {
261     JSSVGCursorElement* domObject = static_cast<JSSVGCursorElement*>(asObject(slotBase));
262     return JSSVGCursorElement::getConstructor(exec, domObject->globalObject());
263 }
264
265 JSValue JSSVGCursorElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
266 {
267     return getDOMConstructor<JSSVGCursorElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
268 }
269
270 EncodedJSValue JSC_HOST_CALL jsSVGCursorElementPrototypeFunctionHasExtension(ExecState* exec)
271 {
272     JSValue thisValue = exec->hostThisValue();
273     if (!thisValue.inherits(&JSSVGCursorElement::s_info))
274         return throwVMTypeError(exec);
275     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(thisValue));
276     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGCursorElement::s_info);
277     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
278     const String& extension(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)));
279     if (exec->hadException())
280         return JSValue::encode(jsUndefined());
281
282     JSC::JSValue result = jsBoolean(imp->hasExtension(extension));
283     return JSValue::encode(result);
284 }
285
286
287 }
288
289 #endif // ENABLE(SVG)