WebCore/generated/JSSVGCursorElement.cpp
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     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 "JSSVGAnimatedBoolean.h"
       
    28 #include "JSSVGAnimatedLength.h"
       
    29 #include "JSSVGAnimatedString.h"
       
    30 #include "JSSVGStringList.h"
       
    31 #include "SVGCursorElement.h"
       
    32 #include "SVGStringList.h"
       
    33 #include <runtime/Error.h>
       
    34 #include <wtf/GetPtr.h>
       
    35 
       
    36 using namespace JSC;
       
    37 
       
    38 namespace WebCore {
       
    39 
       
    40 ASSERT_CLASS_FITS_IN_CELL(JSSVGCursorElement);
       
    41 
       
    42 /* Hash table */
       
    43 #if ENABLE(JIT)
       
    44 #define THUNK_GENERATOR(generator) , generator
       
    45 #else
       
    46 #define THUNK_GENERATOR(generator)
       
    47 #endif
       
    48 
       
    49 static const HashTableValue JSSVGCursorElementTableValues[9] =
       
    50 {
       
    51     { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementX), (intptr_t)0 THUNK_GENERATOR(0) },
       
    52     { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementY), (intptr_t)0 THUNK_GENERATOR(0) },
       
    53     { "href", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementHref), (intptr_t)0 THUNK_GENERATOR(0) },
       
    54     { "requiredFeatures", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementRequiredFeatures), (intptr_t)0 THUNK_GENERATOR(0) },
       
    55     { "requiredExtensions", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementRequiredExtensions), (intptr_t)0 THUNK_GENERATOR(0) },
       
    56     { "systemLanguage", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementSystemLanguage), (intptr_t)0 THUNK_GENERATOR(0) },
       
    57     { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) },
       
    58     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGCursorElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    59     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    60 };
       
    61 
       
    62 #undef THUNK_GENERATOR
       
    63 static JSC_CONST_HASHTABLE HashTable JSSVGCursorElementTable = { 18, 15, JSSVGCursorElementTableValues, 0 };
       
    64 /* Hash table for constructor */
       
    65 #if ENABLE(JIT)
       
    66 #define THUNK_GENERATOR(generator) , generator
       
    67 #else
       
    68 #define THUNK_GENERATOR(generator)
       
    69 #endif
       
    70 
       
    71 static const HashTableValue JSSVGCursorElementConstructorTableValues[1] =
       
    72 {
       
    73     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    74 };
       
    75 
       
    76 #undef THUNK_GENERATOR
       
    77 static JSC_CONST_HASHTABLE HashTable JSSVGCursorElementConstructorTable = { 1, 0, JSSVGCursorElementConstructorTableValues, 0 };
       
    78 class JSSVGCursorElementConstructor : public DOMConstructorObject {
       
    79 public:
       
    80     JSSVGCursorElementConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    81 
       
    82     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    83     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    84     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    85     static const JSC::ClassInfo s_info;
       
    86     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    87     {
       
    88         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    89     }
       
    90 protected:
       
    91     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
    92 };
       
    93 
       
    94 const ClassInfo JSSVGCursorElementConstructor::s_info = { "SVGCursorElementConstructor", 0, &JSSVGCursorElementConstructorTable, 0 };
       
    95 
       
    96 JSSVGCursorElementConstructor::JSSVGCursorElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
    97     : DOMConstructorObject(JSSVGCursorElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
    98 {
       
    99     putDirect(exec->propertyNames().prototype, JSSVGCursorElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
   100 }
       
   101 
       
   102 bool JSSVGCursorElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   103 {
       
   104     return getStaticValueSlot<JSSVGCursorElementConstructor, DOMObject>(exec, &JSSVGCursorElementConstructorTable, this, propertyName, slot);
       
   105 }
       
   106 
       
   107 bool JSSVGCursorElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   108 {
       
   109     return getStaticValueDescriptor<JSSVGCursorElementConstructor, DOMObject>(exec, &JSSVGCursorElementConstructorTable, this, propertyName, descriptor);
       
   110 }
       
   111 
       
   112 /* Hash table for prototype */
       
   113 #if ENABLE(JIT)
       
   114 #define THUNK_GENERATOR(generator) , generator
       
   115 #else
       
   116 #define THUNK_GENERATOR(generator)
       
   117 #endif
       
   118 
       
   119 static const HashTableValue JSSVGCursorElementPrototypeTableValues[2] =
       
   120 {
       
   121     { "hasExtension", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGCursorElementPrototypeFunctionHasExtension), (intptr_t)1 THUNK_GENERATOR(0) },
       
   122     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   123 };
       
   124 
       
   125 #undef THUNK_GENERATOR
       
   126 static JSC_CONST_HASHTABLE HashTable JSSVGCursorElementPrototypeTable = { 2, 1, JSSVGCursorElementPrototypeTableValues, 0 };
       
   127 const ClassInfo JSSVGCursorElementPrototype::s_info = { "SVGCursorElementPrototype", 0, &JSSVGCursorElementPrototypeTable, 0 };
       
   128 
       
   129 JSObject* JSSVGCursorElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   130 {
       
   131     return getDOMPrototype<JSSVGCursorElement>(exec, globalObject);
       
   132 }
       
   133 
       
   134 bool JSSVGCursorElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   135 {
       
   136     return getStaticFunctionSlot<JSObject>(exec, &JSSVGCursorElementPrototypeTable, this, propertyName, slot);
       
   137 }
       
   138 
       
   139 bool JSSVGCursorElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   140 {
       
   141     return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGCursorElementPrototypeTable, this, propertyName, descriptor);
       
   142 }
       
   143 
       
   144 const ClassInfo JSSVGCursorElement::s_info = { "SVGCursorElement", &JSSVGElement::s_info, &JSSVGCursorElementTable, 0 };
       
   145 
       
   146 JSSVGCursorElement::JSSVGCursorElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGCursorElement> impl)
       
   147     : JSSVGElement(structure, globalObject, impl)
       
   148 {
       
   149 }
       
   150 
       
   151 JSObject* JSSVGCursorElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   152 {
       
   153     return new (exec) JSSVGCursorElementPrototype(globalObject, JSSVGCursorElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject)));
       
   154 }
       
   155 
       
   156 bool JSSVGCursorElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   157 {
       
   158     return getStaticValueSlot<JSSVGCursorElement, Base>(exec, &JSSVGCursorElementTable, this, propertyName, slot);
       
   159 }
       
   160 
       
   161 bool JSSVGCursorElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   162 {
       
   163     return getStaticValueDescriptor<JSSVGCursorElement, Base>(exec, &JSSVGCursorElementTable, this, propertyName, descriptor);
       
   164 }
       
   165 
       
   166 JSValue jsSVGCursorElementX(ExecState* exec, JSValue slotBase, const Identifier&)
       
   167 {
       
   168     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
       
   169     UNUSED_PARAM(exec);
       
   170     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
       
   171     RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
       
   172     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   173     return result;
       
   174 }
       
   175 
       
   176 JSValue jsSVGCursorElementY(ExecState* exec, JSValue slotBase, const Identifier&)
       
   177 {
       
   178     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
       
   179     UNUSED_PARAM(exec);
       
   180     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
       
   181     RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
       
   182     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   183     return result;
       
   184 }
       
   185 
       
   186 JSValue jsSVGCursorElementHref(ExecState* exec, JSValue slotBase, const Identifier&)
       
   187 {
       
   188     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
       
   189     UNUSED_PARAM(exec);
       
   190     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
       
   191     RefPtr<SVGAnimatedString> obj = imp->hrefAnimated();
       
   192     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   193     return result;
       
   194 }
       
   195 
       
   196 JSValue jsSVGCursorElementRequiredFeatures(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     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp);
       
   202     return result;
       
   203 }
       
   204 
       
   205 JSValue jsSVGCursorElementRequiredExtensions(ExecState* exec, JSValue slotBase, const Identifier&)
       
   206 {
       
   207     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
       
   208     UNUSED_PARAM(exec);
       
   209     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
       
   210     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp);
       
   211     return result;
       
   212 }
       
   213 
       
   214 JSValue jsSVGCursorElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&)
       
   215 {
       
   216     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
       
   217     UNUSED_PARAM(exec);
       
   218     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
       
   219     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp);
       
   220     return result;
       
   221 }
       
   222 
       
   223 JSValue jsSVGCursorElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&)
       
   224 {
       
   225     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(slotBase));
       
   226     UNUSED_PARAM(exec);
       
   227     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
       
   228     RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
       
   229     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);
       
   230     return result;
       
   231 }
       
   232 
       
   233 JSValue jsSVGCursorElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   234 {
       
   235     JSSVGCursorElement* domObject = static_cast<JSSVGCursorElement*>(asObject(slotBase));
       
   236     return JSSVGCursorElement::getConstructor(exec, domObject->globalObject());
       
   237 }
       
   238 JSValue JSSVGCursorElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   239 {
       
   240     return getDOMConstructor<JSSVGCursorElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   241 }
       
   242 
       
   243 EncodedJSValue JSC_HOST_CALL jsSVGCursorElementPrototypeFunctionHasExtension(ExecState* exec)
       
   244 {
       
   245     JSValue thisValue = exec->hostThisValue();
       
   246     if (!thisValue.inherits(&JSSVGCursorElement::s_info))
       
   247         return throwVMTypeError(exec);
       
   248     JSSVGCursorElement* castedThis = static_cast<JSSVGCursorElement*>(asObject(thisValue));
       
   249     SVGCursorElement* imp = static_cast<SVGCursorElement*>(castedThis->impl());
       
   250     const String& extension = ustringToString(exec->argument(0).toString(exec));
       
   251 
       
   252 
       
   253     JSC::JSValue result = jsBoolean(imp->hasExtension(extension));
       
   254     return JSValue::encode(result);
       
   255 }
       
   256 
       
   257 
       
   258 }
       
   259 
       
   260 #endif // ENABLE(SVG)