WebCore/generated/JSSVGZoomEvent.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 "JSSVGZoomEvent.h"
       
    26 
       
    27 #include "JSSVGPoint.h"
       
    28 #include "JSSVGRect.h"
       
    29 #include "SVGZoomEvent.h"
       
    30 #include <runtime/JSNumberCell.h>
       
    31 #include <wtf/GetPtr.h>
       
    32 
       
    33 using namespace JSC;
       
    34 
       
    35 namespace WebCore {
       
    36 
       
    37 ASSERT_CLASS_FITS_IN_CELL(JSSVGZoomEvent);
       
    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 JSSVGZoomEventTableValues[7] =
       
    47 {
       
    48     { "zoomRectScreen", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGZoomEventZoomRectScreen), (intptr_t)0 THUNK_GENERATOR(0) },
       
    49     { "previousScale", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGZoomEventPreviousScale), (intptr_t)0 THUNK_GENERATOR(0) },
       
    50     { "previousTranslate", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGZoomEventPreviousTranslate), (intptr_t)0 THUNK_GENERATOR(0) },
       
    51     { "newScale", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGZoomEventNewScale), (intptr_t)0 THUNK_GENERATOR(0) },
       
    52     { "newTranslate", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGZoomEventNewTranslate), (intptr_t)0 THUNK_GENERATOR(0) },
       
    53     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGZoomEventConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    54     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    55 };
       
    56 
       
    57 #undef THUNK_GENERATOR
       
    58 static JSC_CONST_HASHTABLE HashTable JSSVGZoomEventTable = { 17, 15, JSSVGZoomEventTableValues, 0 };
       
    59 /* Hash table for constructor */
       
    60 #if ENABLE(JIT)
       
    61 #define THUNK_GENERATOR(generator) , generator
       
    62 #else
       
    63 #define THUNK_GENERATOR(generator)
       
    64 #endif
       
    65 
       
    66 static const HashTableValue JSSVGZoomEventConstructorTableValues[1] =
       
    67 {
       
    68     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    69 };
       
    70 
       
    71 #undef THUNK_GENERATOR
       
    72 static JSC_CONST_HASHTABLE HashTable JSSVGZoomEventConstructorTable = { 1, 0, JSSVGZoomEventConstructorTableValues, 0 };
       
    73 class JSSVGZoomEventConstructor : public DOMConstructorObject {
       
    74 public:
       
    75     JSSVGZoomEventConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    76 
       
    77     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    78     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    79     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    80     static const JSC::ClassInfo s_info;
       
    81     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    82     {
       
    83         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    84     }
       
    85 protected:
       
    86     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
    87 };
       
    88 
       
    89 const ClassInfo JSSVGZoomEventConstructor::s_info = { "SVGZoomEventConstructor", 0, &JSSVGZoomEventConstructorTable, 0 };
       
    90 
       
    91 JSSVGZoomEventConstructor::JSSVGZoomEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
    92     : DOMConstructorObject(JSSVGZoomEventConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
    93 {
       
    94     putDirect(exec->propertyNames().prototype, JSSVGZoomEventPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
    95 }
       
    96 
       
    97 bool JSSVGZoomEventConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    98 {
       
    99     return getStaticValueSlot<JSSVGZoomEventConstructor, DOMObject>(exec, &JSSVGZoomEventConstructorTable, this, propertyName, slot);
       
   100 }
       
   101 
       
   102 bool JSSVGZoomEventConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   103 {
       
   104     return getStaticValueDescriptor<JSSVGZoomEventConstructor, DOMObject>(exec, &JSSVGZoomEventConstructorTable, this, propertyName, descriptor);
       
   105 }
       
   106 
       
   107 /* Hash table for prototype */
       
   108 #if ENABLE(JIT)
       
   109 #define THUNK_GENERATOR(generator) , generator
       
   110 #else
       
   111 #define THUNK_GENERATOR(generator)
       
   112 #endif
       
   113 
       
   114 static const HashTableValue JSSVGZoomEventPrototypeTableValues[1] =
       
   115 {
       
   116     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   117 };
       
   118 
       
   119 #undef THUNK_GENERATOR
       
   120 static JSC_CONST_HASHTABLE HashTable JSSVGZoomEventPrototypeTable = { 1, 0, JSSVGZoomEventPrototypeTableValues, 0 };
       
   121 const ClassInfo JSSVGZoomEventPrototype::s_info = { "SVGZoomEventPrototype", 0, &JSSVGZoomEventPrototypeTable, 0 };
       
   122 
       
   123 JSObject* JSSVGZoomEventPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   124 {
       
   125     return getDOMPrototype<JSSVGZoomEvent>(exec, globalObject);
       
   126 }
       
   127 
       
   128 const ClassInfo JSSVGZoomEvent::s_info = { "SVGZoomEvent", &JSUIEvent::s_info, &JSSVGZoomEventTable, 0 };
       
   129 
       
   130 JSSVGZoomEvent::JSSVGZoomEvent(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGZoomEvent> impl)
       
   131     : JSUIEvent(structure, globalObject, impl)
       
   132 {
       
   133 }
       
   134 
       
   135 JSObject* JSSVGZoomEvent::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   136 {
       
   137     return new (exec) JSSVGZoomEventPrototype(globalObject, JSSVGZoomEventPrototype::createStructure(JSUIEventPrototype::self(exec, globalObject)));
       
   138 }
       
   139 
       
   140 bool JSSVGZoomEvent::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   141 {
       
   142     return getStaticValueSlot<JSSVGZoomEvent, Base>(exec, &JSSVGZoomEventTable, this, propertyName, slot);
       
   143 }
       
   144 
       
   145 bool JSSVGZoomEvent::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   146 {
       
   147     return getStaticValueDescriptor<JSSVGZoomEvent, Base>(exec, &JSSVGZoomEventTable, this, propertyName, descriptor);
       
   148 }
       
   149 
       
   150 JSValue jsSVGZoomEventZoomRectScreen(ExecState* exec, JSValue slotBase, const Identifier&)
       
   151 {
       
   152     JSSVGZoomEvent* castedThis = static_cast<JSSVGZoomEvent*>(asObject(slotBase));
       
   153     UNUSED_PARAM(exec);
       
   154     SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(castedThis->impl());
       
   155     JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->zoomRectScreen()).get(), 0 /* no context on purpose */);
       
   156     return result;
       
   157 }
       
   158 
       
   159 JSValue jsSVGZoomEventPreviousScale(ExecState* exec, JSValue slotBase, const Identifier&)
       
   160 {
       
   161     JSSVGZoomEvent* castedThis = static_cast<JSSVGZoomEvent*>(asObject(slotBase));
       
   162     UNUSED_PARAM(exec);
       
   163     SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(castedThis->impl());
       
   164     JSValue result = jsNumber(exec, imp->previousScale());
       
   165     return result;
       
   166 }
       
   167 
       
   168 JSValue jsSVGZoomEventPreviousTranslate(ExecState* exec, JSValue slotBase, const Identifier&)
       
   169 {
       
   170     JSSVGZoomEvent* castedThis = static_cast<JSSVGZoomEvent*>(asObject(slotBase));
       
   171     UNUSED_PARAM(exec);
       
   172     SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(castedThis->impl());
       
   173     JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->previousTranslate()).get(), 0 /* no context on purpose */);
       
   174     return result;
       
   175 }
       
   176 
       
   177 JSValue jsSVGZoomEventNewScale(ExecState* exec, JSValue slotBase, const Identifier&)
       
   178 {
       
   179     JSSVGZoomEvent* castedThis = static_cast<JSSVGZoomEvent*>(asObject(slotBase));
       
   180     UNUSED_PARAM(exec);
       
   181     SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(castedThis->impl());
       
   182     JSValue result = jsNumber(exec, imp->newScale());
       
   183     return result;
       
   184 }
       
   185 
       
   186 JSValue jsSVGZoomEventNewTranslate(ExecState* exec, JSValue slotBase, const Identifier&)
       
   187 {
       
   188     JSSVGZoomEvent* castedThis = static_cast<JSSVGZoomEvent*>(asObject(slotBase));
       
   189     UNUSED_PARAM(exec);
       
   190     SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(castedThis->impl());
       
   191     JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<FloatPoint>::create(imp->newTranslate()).get(), 0 /* no context on purpose */);
       
   192     return result;
       
   193 }
       
   194 
       
   195 JSValue jsSVGZoomEventConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   196 {
       
   197     JSSVGZoomEvent* domObject = static_cast<JSSVGZoomEvent*>(asObject(slotBase));
       
   198     return JSSVGZoomEvent::getConstructor(exec, domObject->globalObject());
       
   199 }
       
   200 JSValue JSSVGZoomEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   201 {
       
   202     return getDOMConstructor<JSSVGZoomEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   203 }
       
   204 
       
   205 
       
   206 }
       
   207 
       
   208 #endif // ENABLE(SVG)