webengine/osswebengine/DerivedSources/WebCore/JSSVGZoomEvent.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 "JSSVGZoomEvent.h"
       
    32 
       
    33 #include <wtf/GetPtr.h>
       
    34 
       
    35 #include "JSSVGPoint.h"
       
    36 #include "JSSVGRect.h"
       
    37 #include "SVGZoomEvent.h"
       
    38 
       
    39 using namespace KJS;
       
    40 
       
    41 namespace WebCore {
       
    42 
       
    43 /* Hash table */
       
    44 
       
    45 static const HashEntry JSSVGZoomEventTableEntries[] =
       
    46 {
       
    47     { 0, 0, 0, 0, 0 },
       
    48     { 0, 0, 0, 0, 0 },
       
    49     { "previousScale", JSSVGZoomEvent::PreviousScaleAttrNum, DontDelete|ReadOnly, 0, &JSSVGZoomEventTableEntries[6] },
       
    50     { "zoomRectScreen", JSSVGZoomEvent::ZoomRectScreenAttrNum, DontDelete|ReadOnly, 0, &JSSVGZoomEventTableEntries[5] },
       
    51     { "newTranslate", JSSVGZoomEvent::NewTranslateAttrNum, DontDelete|ReadOnly, 0, 0 },
       
    52     { "previousTranslate", JSSVGZoomEvent::PreviousTranslateAttrNum, DontDelete|ReadOnly, 0, 0 },
       
    53     { "newScale", JSSVGZoomEvent::NewScaleAttrNum, DontDelete|ReadOnly, 0, 0 }
       
    54 };
       
    55 
       
    56 static const HashTable JSSVGZoomEventTable = 
       
    57 {
       
    58     2, 7, JSSVGZoomEventTableEntries, 5
       
    59 };
       
    60 
       
    61 /* Hash table for prototype */
       
    62 
       
    63 static const HashEntry JSSVGZoomEventPrototypeTableEntries[] =
       
    64 {
       
    65     { 0, 0, 0, 0, 0 }
       
    66 };
       
    67 
       
    68 static const HashTable JSSVGZoomEventPrototypeTable = 
       
    69 {
       
    70     2, 1, JSSVGZoomEventPrototypeTableEntries, 1
       
    71 };
       
    72 
       
    73 const ClassInfo JSSVGZoomEventPrototype::info = { "SVGZoomEventPrototype", 0, &JSSVGZoomEventPrototypeTable, 0 };
       
    74 
       
    75 JSObject* JSSVGZoomEventPrototype::self(ExecState* exec)
       
    76 {
       
    77     return KJS::cacheGlobalObject<JSSVGZoomEventPrototype>(exec, "[[JSSVGZoomEvent.prototype]]");
       
    78 }
       
    79 
       
    80 const ClassInfo JSSVGZoomEvent::info = { "SVGZoomEvent", &JSUIEvent::info, &JSSVGZoomEventTable, 0 };
       
    81 
       
    82 JSSVGZoomEvent::JSSVGZoomEvent(ExecState* exec, SVGZoomEvent* impl)
       
    83     : JSUIEvent(exec, impl)
       
    84 {
       
    85     setPrototype(JSSVGZoomEventPrototype::self(exec));
       
    86 }
       
    87 
       
    88 bool JSSVGZoomEvent::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    89 {
       
    90     return getStaticValueSlot<JSSVGZoomEvent, JSUIEvent>(exec, &JSSVGZoomEventTable, this, propertyName, slot);
       
    91 }
       
    92 
       
    93 JSValue* JSSVGZoomEvent::getValueProperty(ExecState* exec, int token) const
       
    94 {
       
    95     switch (token) {
       
    96     case ZoomRectScreenAttrNum: {
       
    97         SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(impl());
       
    98 
       
    99         return toJS(exec, new JSSVGPODTypeWrapper<FloatRect>(imp->zoomRectScreen()));
       
   100     }
       
   101     case PreviousScaleAttrNum: {
       
   102         SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(impl());
       
   103 
       
   104         return jsNumber(imp->previousScale());
       
   105     }
       
   106     case PreviousTranslateAttrNum: {
       
   107         SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(impl());
       
   108 
       
   109         return toJS(exec, new JSSVGPODTypeWrapper<FloatPoint>(imp->previousTranslate()));
       
   110     }
       
   111     case NewScaleAttrNum: {
       
   112         SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(impl());
       
   113 
       
   114         return jsNumber(imp->newScale());
       
   115     }
       
   116     case NewTranslateAttrNum: {
       
   117         SVGZoomEvent* imp = static_cast<SVGZoomEvent*>(impl());
       
   118 
       
   119         return toJS(exec, new JSSVGPODTypeWrapper<FloatPoint>(imp->newTranslate()));
       
   120     }
       
   121     }
       
   122     return 0;
       
   123 }
       
   124 
       
   125 
       
   126 }
       
   127 
       
   128 #endif // ENABLE(SVG)