webengine/osswebengine/DerivedSources/WebCore/JSSVGAnimatedPoints.cpp
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     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 
       
    24 #if ENABLE(SVG)
       
    25 
       
    26 #include "Document.h"
       
    27 #include "Frame.h"
       
    28 #include "SVGDocumentExtensions.h"
       
    29 #include "SVGElement.h"
       
    30 #include "SVGAnimatedTemplate.h"
       
    31 #include "JSSVGAnimatedPoints.h"
       
    32 
       
    33 #include <wtf/GetPtr.h>
       
    34 
       
    35 #include "JSSVGPointList.h"
       
    36 #include "SVGAnimatedPoints.h"
       
    37 #include "SVGPointList.h"
       
    38 
       
    39 using namespace KJS;
       
    40 
       
    41 namespace WebCore {
       
    42 
       
    43 /* Hash table */
       
    44 
       
    45 static const HashEntry JSSVGAnimatedPointsTableEntries[] =
       
    46 {
       
    47     { 0, 0, 0, 0, 0 },
       
    48     { "points", JSSVGAnimatedPoints::PointsAttrNum, DontDelete|ReadOnly, 0, &JSSVGAnimatedPointsTableEntries[2] },
       
    49     { "animatedPoints", JSSVGAnimatedPoints::AnimatedPointsAttrNum, DontDelete|ReadOnly, 0, 0 }
       
    50 };
       
    51 
       
    52 static const HashTable JSSVGAnimatedPointsTable = 
       
    53 {
       
    54     2, 3, JSSVGAnimatedPointsTableEntries, 2
       
    55 };
       
    56 
       
    57 /* Hash table for prototype */
       
    58 
       
    59 static const HashEntry JSSVGAnimatedPointsPrototypeTableEntries[] =
       
    60 {
       
    61     { 0, 0, 0, 0, 0 }
       
    62 };
       
    63 
       
    64 static const HashTable JSSVGAnimatedPointsPrototypeTable = 
       
    65 {
       
    66     2, 1, JSSVGAnimatedPointsPrototypeTableEntries, 1
       
    67 };
       
    68 
       
    69 const ClassInfo JSSVGAnimatedPointsPrototype::info = { "SVGAnimatedPointsPrototype", 0, &JSSVGAnimatedPointsPrototypeTable, 0 };
       
    70 
       
    71 JSObject* JSSVGAnimatedPointsPrototype::self(ExecState* exec)
       
    72 {
       
    73     return KJS::cacheGlobalObject<JSSVGAnimatedPointsPrototype>(exec, "[[JSSVGAnimatedPoints.prototype]]");
       
    74 }
       
    75 
       
    76 const ClassInfo JSSVGAnimatedPoints::info = { "SVGAnimatedPoints", 0, &JSSVGAnimatedPointsTable, 0 };
       
    77 
       
    78 JSSVGAnimatedPoints::JSSVGAnimatedPoints(ExecState* exec, SVGAnimatedPoints* impl)
       
    79     : m_impl(impl)
       
    80 {
       
    81     setPrototype(JSSVGAnimatedPointsPrototype::self(exec));
       
    82 }
       
    83 
       
    84 JSSVGAnimatedPoints::~JSSVGAnimatedPoints()
       
    85 {
       
    86     ScriptInterpreter::forgetDOMObject(m_impl.get());
       
    87 }
       
    88 
       
    89 bool JSSVGAnimatedPoints::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    90 {
       
    91     return getStaticValueSlot<JSSVGAnimatedPoints, KJS::DOMObject>(exec, &JSSVGAnimatedPointsTable, this, propertyName, slot);
       
    92 }
       
    93 
       
    94 JSValue* JSSVGAnimatedPoints::getValueProperty(ExecState* exec, int token) const
       
    95 {
       
    96     switch (token) {
       
    97     case PointsAttrNum: {
       
    98         SVGAnimatedPoints* imp = static_cast<SVGAnimatedPoints*>(impl());
       
    99 
       
   100         return toJS(exec, WTF::getPtr(imp->points()));
       
   101     }
       
   102     case AnimatedPointsAttrNum: {
       
   103         SVGAnimatedPoints* imp = static_cast<SVGAnimatedPoints*>(impl());
       
   104 
       
   105         return toJS(exec, WTF::getPtr(imp->animatedPoints()));
       
   106     }
       
   107     }
       
   108     return 0;
       
   109 }
       
   110 
       
   111 KJS::JSValue* toJS(KJS::ExecState* exec, SVGAnimatedPoints* obj)
       
   112 {
       
   113     return KJS::cacheDOMObject<SVGAnimatedPoints, JSSVGAnimatedPoints>(exec, obj);
       
   114 }
       
   115 SVGAnimatedPoints* toSVGAnimatedPoints(KJS::JSValue* val)
       
   116 {
       
   117     return val->isObject(&JSSVGAnimatedPoints::info) ? static_cast<JSSVGAnimatedPoints*>(val)->impl() : 0;
       
   118 }
       
   119 
       
   120 }
       
   121 
       
   122 #endif // ENABLE(SVG)