webengine/osswebengine/DerivedSources/WebCore/JSSVGPoint.h
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 #ifndef JSSVGPoint_H
       
    22 #define JSSVGPoint_H
       
    23 
       
    24 
       
    25 #if ENABLE(SVG)
       
    26 
       
    27 #include "kjs_binding.h"
       
    28 #include "FloatPoint.h"
       
    29 #include "JSSVGPODTypeWrapper.h"
       
    30 
       
    31 namespace WebCore {
       
    32 
       
    33 class JSSVGPoint : public KJS::DOMObject {
       
    34 public:
       
    35     JSSVGPoint(KJS::ExecState*, JSSVGPODTypeWrapper<FloatPoint>*);
       
    36     virtual ~JSSVGPoint();
       
    37     virtual bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
       
    38     KJS::JSValue* getValueProperty(KJS::ExecState*, int token) const;
       
    39     virtual void put(KJS::ExecState*, const KJS::Identifier&, KJS::JSValue*, int attr = KJS::None);
       
    40     void putValueProperty(KJS::ExecState*, int, KJS::JSValue*, int attr);
       
    41     virtual const KJS::ClassInfo* classInfo() const { return &info; }
       
    42     static const KJS::ClassInfo info;
       
    43 
       
    44     enum {
       
    45         // Attributes
       
    46         XAttrNum, YAttrNum, 
       
    47 
       
    48         // Functions
       
    49         MatrixTransformFuncNum
       
    50     };
       
    51     JSSVGPODTypeWrapper<FloatPoint>* impl() const { return m_impl.get(); }
       
    52 private:
       
    53     RefPtr<JSSVGPODTypeWrapper<FloatPoint> > m_impl;
       
    54 };
       
    55 
       
    56 KJS::JSValue* toJS(KJS::ExecState*, JSSVGPODTypeWrapper<FloatPoint>*);
       
    57 FloatPoint toSVGPoint(KJS::JSValue*);
       
    58 
       
    59 class JSSVGPointPrototype : public KJS::JSObject {
       
    60 public:
       
    61     static KJS::JSObject* self(KJS::ExecState* exec);
       
    62     virtual const KJS::ClassInfo* classInfo() const { return &info; }
       
    63     static const KJS::ClassInfo info;
       
    64     bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
       
    65     JSSVGPointPrototype(KJS::ExecState* exec)
       
    66         : KJS::JSObject(exec->lexicalInterpreter()->builtinObjectPrototype()) { }
       
    67 };
       
    68 
       
    69 class JSSVGPointPrototypeFunction : public KJS::InternalFunctionImp {
       
    70 public:
       
    71     JSSVGPointPrototypeFunction(KJS::ExecState* exec, int i, int len, const KJS::Identifier& name)
       
    72         : KJS::InternalFunctionImp(static_cast<KJS::FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()), name)
       
    73         , id(i)
       
    74     {
       
    75         put(exec, exec->propertyNames().length, KJS::jsNumber(len), KJS::DontDelete|KJS::ReadOnly|KJS::DontEnum);
       
    76     }
       
    77     virtual KJS::JSValue* callAsFunction(KJS::ExecState*, KJS::JSObject*, const KJS::List&);
       
    78 
       
    79 private:
       
    80     int id;
       
    81 };
       
    82 
       
    83 } // namespace WebCore
       
    84 
       
    85 #endif // ENABLE(SVG)
       
    86 
       
    87 #endif