webengine/osswebengine/DerivedSources/WebCore/JSSVGMatrix.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 JSSVGMatrix_H
       
    22 #define JSSVGMatrix_H
       
    23 
       
    24 
       
    25 #if ENABLE(SVG)
       
    26 
       
    27 #include "kjs_binding.h"
       
    28 #include "AffineTransform.h"
       
    29 #include "JSSVGPODTypeWrapper.h"
       
    30 
       
    31 namespace WebCore {
       
    32 
       
    33 class JSSVGMatrix : public KJS::DOMObject {
       
    34 public:
       
    35     JSSVGMatrix(KJS::ExecState*, JSSVGPODTypeWrapper<AffineTransform>*);
       
    36     virtual ~JSSVGMatrix();
       
    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         AAttrNum, BAttrNum, CAttrNum, DAttrNum, 
       
    47         EAttrNum, FAttrNum, 
       
    48 
       
    49         // Functions
       
    50         MultiplyFuncNum, InverseFuncNum, TranslateFuncNum, ScaleFuncNum, 
       
    51         ScaleNonUniformFuncNum, RotateFuncNum, RotateFromVectorFuncNum, FlipXFuncNum, 
       
    52         FlipYFuncNum, SkewXFuncNum, SkewYFuncNum
       
    53     };
       
    54 
       
    55     // Custom functions
       
    56     KJS::JSValue* inverse(KJS::ExecState*, const KJS::List&);
       
    57     KJS::JSValue* rotateFromVector(KJS::ExecState*, const KJS::List&);
       
    58     JSSVGPODTypeWrapper<AffineTransform>* impl() const { return m_impl.get(); }
       
    59 private:
       
    60     RefPtr<JSSVGPODTypeWrapper<AffineTransform> > m_impl;
       
    61 };
       
    62 
       
    63 KJS::JSValue* toJS(KJS::ExecState*, JSSVGPODTypeWrapper<AffineTransform>*);
       
    64 AffineTransform toSVGMatrix(KJS::JSValue*);
       
    65 
       
    66 class JSSVGMatrixPrototype : public KJS::JSObject {
       
    67 public:
       
    68     static KJS::JSObject* self(KJS::ExecState* exec);
       
    69     virtual const KJS::ClassInfo* classInfo() const { return &info; }
       
    70     static const KJS::ClassInfo info;
       
    71     bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
       
    72     JSSVGMatrixPrototype(KJS::ExecState* exec)
       
    73         : KJS::JSObject(exec->lexicalInterpreter()->builtinObjectPrototype()) { }
       
    74 };
       
    75 
       
    76 class JSSVGMatrixPrototypeFunction : public KJS::InternalFunctionImp {
       
    77 public:
       
    78     JSSVGMatrixPrototypeFunction(KJS::ExecState* exec, int i, int len, const KJS::Identifier& name)
       
    79         : KJS::InternalFunctionImp(static_cast<KJS::FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()), name)
       
    80         , id(i)
       
    81     {
       
    82         put(exec, exec->propertyNames().length, KJS::jsNumber(len), KJS::DontDelete|KJS::ReadOnly|KJS::DontEnum);
       
    83     }
       
    84     virtual KJS::JSValue* callAsFunction(KJS::ExecState*, KJS::JSObject*, const KJS::List&);
       
    85 
       
    86 private:
       
    87     int id;
       
    88 };
       
    89 
       
    90 } // namespace WebCore
       
    91 
       
    92 #endif // ENABLE(SVG)
       
    93 
       
    94 #endif