2005-10-02 Anders Carlsson <andersca@mac.com>
[WebKit-https.git] / WebCore / ksvg2 / ecma / Constructors.cpp
1 /*
2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
3                   2004, 2005 Rob Buis <buis@kde.org>
4
5     This file is part of the KDE project
6
7     This library is free software; you can redistribute it and/or
8     modify it under the terms of the GNU Library General Public
9     License as published by the Free Software Foundation; either
10     version 2 of the License, or (at your option) any later version.
11
12     This library is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15     Library General Public License for more details.
16
17     You should have received a copy of the GNU Library General Public License
18     along with this library; see the file COPYING.LIB.  If not, write to
19     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20     Boston, MA 02111-1307, USA.
21 */
22
23 #include <ksvg2/ksvg.h>
24 #include "Constructors.h"
25
26 #include <ksvg2/data/Constructors.lut.h>
27 using namespace KSVG;
28
29 // EcmaScript Constructors (enumerations)
30
31 /*
32 @begin SVGExceptionConstructor::s_hashTable 5
33  SVG_WRONG_TYPE_ERR                KSVG::SVG_WRONG_TYPE_ERR            DontDelete|ReadOnly
34  SVG_INVALID_VALUE_ERR            KSVG::SVG_INVALID_VALUE_ERR            DontDelete|ReadOnly
35  SVG_MATRIX_NOT_INVERTABLE        KSVG::SVG_MATRIX_NOT_INVERTABLE        DontDelete|ReadOnly
36 @end
37 */
38
39 KSVG_IMPLEMENT_CONSTRUCTOR(SVGExceptionConstructor, "SVGException")
40
41 /*
42 @begin SVGLengthConstructor::s_hashTable 13
43  SVG_LENGTHTYPE_UNKNOWN            SVG_LENGTHTYPE_UNKNOWN        DontDelete|ReadOnly
44  SVG_LENGTHTYPE_NUMBER            SVG_LENGTHTYPE_NUMBER        DontDelete|ReadOnly
45  SVG_LENGTHTYPE_PERCENTAGE        SVG_LENGTHTYPE_PERCENTAGE    DontDelete|ReadOnly
46  SVG_LENGTHTYPE_EMS                SVG_LENGTHTYPE_EMS            DontDelete|ReadOnly
47  SVG_LENGTHTYPE_EXS                SVG_LENGTHTYPE_EXS            DontDelete|ReadOnly
48  SVG_LENGTHTYPE_PX                SVG_LENGTHTYPE_PX            DontDelete|ReadOnly
49  SVG_LENGTHTYPE_CM                SVG_LENGTHTYPE_CM            DontDelete|ReadOnly
50  SVG_LENGTHTYPE_MM                SVG_LENGTHTYPE_MM            DontDelete|ReadOnly
51  SVG_LENGTHTYPE_IN                SVG_LENGTHTYPE_IN            DontDelete|ReadOnly
52  SVG_LENGTHTYPE_PT                SVG_LENGTHTYPE_PT            DontDelete|ReadOnly
53  SVG_LENGTHTYPE_PC                SVG_LENGTHTYPE_PC            DontDelete|ReadOnly
54 @end
55 */
56
57 KSVG_IMPLEMENT_CONSTRUCTOR(SVGLengthConstructor, "SVGLength")
58
59 /*
60 @begin SVGAngleConstructor::s_hashTable 7
61  SVG_ANGLETYPE_UNKNOWN        SVG_ANGLETYPE_UNKNOWN        DontDelete|ReadOnly
62  SVG_ANGLETYPE_UNSPECIFIED    SVG_ANGLETYPE_UNSPECIFIED    DontDelete|ReadOnly
63  SVG_ANGLETYPE_DEG            SVG_ANGLETYPE_DEG            DontDelete|ReadOnly
64  SVG_ANGLETYPE_RAD            SVG_ANGLETYPE_RAD            DontDelete|ReadOnly
65  SVG_ANGLETYPE_GRAD            SVG_ANGLETYPE_GRAD            DontDelete|ReadOnly
66 @end
67 */
68
69 KSVG_IMPLEMENT_CONSTRUCTOR(SVGAngleConstructor, "SVGAngle")
70
71 /*
72 @begin SVGColorConstructor::s_hashTable 5
73  SVG_COLORTYPE_UNKNOWN                SVG_COLORTYPE_UNKNOWN            DontDelete|ReadOnly
74  SVG_COLORTYPE_RGBCOLOR                SVG_COLORTYPE_RGBCOLOR            DontDelete|ReadOnly
75  SVG_COLORTYPE_RGBCOLOR_ICCCOLOR    SVG_COLORTYPE_RGBCOLOR_ICCCOLOR    DontDelete|ReadOnly
76  SVG_COLORTYPE_CURRENTCOLOR            SVG_COLORTYPE_CURRENTCOLOR        DontDelete|ReadOnly
77 @end
78 */
79
80 KSVG_IMPLEMENT_CONSTRUCTOR(SVGColorConstructor, "SVGColor")
81
82 /*
83 @begin SVGUnitTypesConstructor::s_hashTable 5
84  SVG_UNIT_TYPE_UNKNOWN                SVG_UNIT_TYPE_UNKNOWN            DontDelete|ReadOnly
85  SVG_UNIT_TYPE_USERSPACEONUSE        SVG_UNIT_TYPE_USERSPACEONUSE    DontDelete|ReadOnly
86  SVG_UNIT_TYPE_OBJECTBOUNDINGBOX    SVG_UNIT_TYPE_OBJECTBOUNDINGBOX    DontDelete|ReadOnly
87 @end
88 */
89
90 KSVG_IMPLEMENT_CONSTRUCTOR(SVGUnitTypesConstructor, "SVGUnitTypes")
91
92 /*
93 @begin SVGZoomAndPanConstructor::s_hashTable 5
94  SVG_ZOOMANDPAN_UNKNOWN    SVG_ZOOMANDPAN_UNKNOWN    DontDelete|ReadOnly
95  SVG_ZOOMANDPAN_DISABLE    SVG_ZOOMANDPAN_DISABLE    DontDelete|ReadOnly
96  SVG_ZOOMANDPAN_MAGNIFY    SVG_ZOOMANDPAN_MAGNIFY    DontDelete|ReadOnly
97 @end
98 */
99
100 KSVG_IMPLEMENT_CONSTRUCTOR(SVGZoomAndPanConstructor, "SVGZoomAndPan")
101
102 /*KSVG_IMPLEMENT_CONSTRUCTOR(SVGRenderingIntentConstructor, "SVGRenderingIntent")
103 KSVG_IMPLEMENT_CONSTRUCTOR(SVGCSSRuleConstructor, "SVGCSSRule")
104 KSVG_IMPLEMENT_CONSTRUCTOR(SVGTextContentElementConstructor, "SVGTextContent")
105 KSVG_IMPLEMENT_CONSTRUCTOR(SVGTextPathElementConstructor, "SVGTextPathElement")
106 */
107
108 /*
109 @begin SVGMarkerElementConstructor::s_hashTable 7
110  SVG_MARKERUNITS_UNKNOWN        SVG_MARKERUNITS_UNKNOWN            DontDelete|ReadOnly
111  SVG_MARKERUNITS_USERSPACEONUSE    SVG_MARKERUNITS_USERSPACEONUSE    DontDelete|ReadOnly
112  SVG_MARKERUNITS_STROKEWIDTH    SVG_MARKERUNITS_STROKEWIDTH        DontDelete|ReadOnly
113  SVG_MARKER_ORIENT_UNKNOWN        SVG_MARKER_ORIENT_UNKNOWN        DontDelete|ReadOnly
114  SVG_MARKER_ORIENT_AUTO            SVG_MARKER_ORIENT_AUTO            DontDelete|ReadOnly
115  SVG_MARKER_ORIENT_ANGLE        SVG_MARKER_ORIENT_ANGLE            DontDelete|ReadOnly
116 @end
117 */
118
119 KSVG_IMPLEMENT_CONSTRUCTOR(SVGMarkerElementConstructor, "SVGMarkerElement")
120
121 /*
122 @begin SVGTransformConstructor::s_hashTable 9
123  SVG_TRANSFORM_UNKNOWN        SVG_TRANSFORM_UNKNOWN    DontDelete|ReadOnly
124  SVG_TRANSFORM_MATRIX        SVG_TRANSFORM_MATRIX    DontDelete|ReadOnly
125  SVG_TRANSFORM_TRANSLATE    SVG_TRANSFORM_TRANSLATE    DontDelete|ReadOnly
126  SVG_TRANSFORM_SCALE        SVG_TRANSFORM_SCALE        DontDelete|ReadOnly
127  SVG_TRANSFORM_ROTATE        SVG_TRANSFORM_ROTATE    DontDelete|ReadOnly
128  SVG_TRANSFORM_SKEWX        SVG_TRANSFORM_SKEWX        DontDelete|ReadOnly
129  SVG_TRANSFORM_SKEWY        SVG_TRANSFORM_SKEWY        DontDelete|ReadOnly
130 @end
131 */
132
133 KSVG_IMPLEMENT_CONSTRUCTOR(SVGTransformConstructor, "SVGTransform")
134
135 /*
136 @begin SVGPreserveAspectRatioConstructor::s_hashTable 17
137  SVG_PRESERVEASPECTRATIO_UNKNOWN    SVG_PRESERVEASPECTRATIO_UNKNOWN        DontDelete|ReadOnly
138  SVG_PRESERVEASPECTRATIO_NONE        SVG_PRESERVEASPECTRATIO_NONE        DontDelete|ReadOnly
139  SVG_PRESERVEASPECTRATIO_XMINYMIN    SVG_PRESERVEASPECTRATIO_XMINYMIN    DontDelete|ReadOnly
140  SVG_PRESERVEASPECTRATIO_XMIDYMIN    SVG_PRESERVEASPECTRATIO_XMIDYMIN    DontDelete|ReadOnly
141  SVG_PRESERVEASPECTRATIO_XMAXYMIN    SVG_PRESERVEASPECTRATIO_XMAXYMIN    DontDelete|ReadOnly
142  SVG_PRESERVEASPECTRATIO_XMINYMID    SVG_PRESERVEASPECTRATIO_XMINYMID    DontDelete|ReadOnly
143  SVG_PRESERVEASPECTRATIO_XMIDYMID    SVG_PRESERVEASPECTRATIO_XMIDYMID    DontDelete|ReadOnly
144  SVG_PRESERVEASPECTRATIO_XMAXYMID    SVG_PRESERVEASPECTRATIO_XMAXYMID    DontDelete|ReadOnly
145  SVG_PRESERVEASPECTRATIO_XMINYMAX    SVG_PRESERVEASPECTRATIO_XMINYMAX    DontDelete|ReadOnly
146  SVG_PRESERVEASPECTRATIO_XMIDYMAX    SVG_PRESERVEASPECTRATIO_XMIDYMAX    DontDelete|ReadOnly
147  SVG_PRESERVEASPECTRATIO_XMAXYMAX    SVG_PRESERVEASPECTRATIO_XMAXYMAX    DontDelete|ReadOnly
148  SVG_MEETORSLICE_UNKNOWN            SVG_MEETORSLICE_UNKNOWN                DontDelete|ReadOnly
149  SVG_MEETORSLICE_MEET                SVG_MEETORSLICE_MEET                DontDelete|ReadOnly
150  SVG_MEETORSLICE_SLICE                SVG_MEETORSLICE_SLICE                DontDelete|ReadOnly
151 @end
152 */
153
154 KSVG_IMPLEMENT_CONSTRUCTOR(SVGPreserveAspectRatioConstructor, "SVGPreserveAspectRatio")
155
156 /*
157 @begin SVGPathSegConstructor::s_hashTable 23
158  PATHSEG_UNKNOWN                        PATHSEG_UNKNOWN                        DontDelete|ReadOnly
159  PATHSEG_CLOSEPATH                        PATHSEG_CLOSEPATH                        DontDelete|ReadOnly
160  PATHSEG_MOVETO_ABS                        PATHSEG_MOVETO_ABS                    DontDelete|ReadOnly
161  PATHSEG_MOVETO_REL                        PATHSEG_MOVETO_REL                    DontDelete|ReadOnly
162  PATHSEG_LINETO_ABS                        PATHSEG_LINETO_ABS                    DontDelete|ReadOnly
163  PATHSEG_LINETO_REL                        PATHSEG_LINETO_REL                    DontDelete|ReadOnly
164  PATHSEG_CURVETO_CUBIC_ABS                PATHSEG_CURVETO_CUBIC_ABS                DontDelete|ReadOnly
165  PATHSEG_CURVETO_CUBIC_REL                PATHSEG_CURVETO_CUBIC_REL                DontDelete|ReadOnly
166  PATHSEG_CURVETO_QUADRATIC_ABS            PATHSEG_CURVETO_QUADRATIC_ABS            DontDelete|ReadOnly
167  PATHSEG_CURVETO_QUADRATIC_REL            PATHSEG_CURVETO_QUADRATIC_REL            DontDelete|ReadOnly
168  PATHSEG_ARC_ABS                        PATHSEG_ARC_ABS                        DontDelete|ReadOnly
169  PATHSEG_ARC_REL                        PATHSEG_ARC_REL                        DontDelete|ReadOnly
170  PATHSEG_LINETO_HORIZONTAL_ABS            PATHSEG_LINETO_HORIZONTAL_ABS            DontDelete|ReadOnly
171  PATHSEG_LINETO_HORIZONTAL_REL            PATHSEG_LINETO_HORIZONTAL_REL            DontDelete|ReadOnly
172  PATHSEG_LINETO_VERTICAL_ABS            PATHSEG_LINETO_VERTICAL_ABS            DontDelete|ReadOnly
173  PATHSEG_LINETO_VERTICAL_REL            PATHSEG_LINETO_VERTICAL_REL            DontDelete|ReadOnly
174  PATHSEG_CURVETO_CUBIC_SMOOTH_ABS        PATHSEG_CURVETO_CUBIC_SMOOTH_ABS        DontDelete|ReadOnly
175  PATHSEG_CURVETO_CUBIC_SMOOTH_REL        PATHSEG_CURVETO_CUBIC_SMOOTH_REL        DontDelete|ReadOnly
176  PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS    PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS    DontDelete|ReadOnly
177  PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL    PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL    DontDelete|ReadOnly
178 @end
179 */
180 KSVG_IMPLEMENT_CONSTRUCTOR(SVGPathSegConstructor, "SVGPathSeg")
181
182 /*
183 @begin SVGPaintConstructor::s_hashTable 11
184 SVG_PAINTTYPE_UNKNOWN                SVG_PAINTTYPE_UNKNOWN                DontDelete|ReadOnly
185 SVG_PAINTTYPE_CURRENTCOLOR            SVG_PAINTTYPE_CURRENTCOLOR            DontDelete|ReadOnly
186 SVG_PAINTTYPE_RGBCOLOR                SVG_PAINTTYPE_RGBCOLOR                DontDelete|ReadOnly
187 SVG_PAINTTYPE_RGBCOLOR                SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR        DontDelete|ReadOnly
188 SVG_PAINTTYPE_NONE                    SVG_PAINTTYPE_NONE                    DontDelete|ReadOnly
189 SVG_PAINTTYPE_URI_NONE                SVG_PAINTTYPE_URI_NONE                DontDelete|ReadOnly
190 SVG_PAINTTYPE_URI_RGBCOLOR            SVG_PAINTTYPE_URI_RGBCOLOR            DontDelete|ReadOnly
191 SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR    SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR    DontDelete|ReadOnly
192 SVG_PAINTTYPE_URI_CURRENTCOLOR        SVG_PAINTTYPE_URI_CURRENTCOLOR        DontDelete|ReadOnly
193 SVG_PAINTTYPE_URI                    SVG_PAINTTYPE_URI                    DontDelete|ReadOnly
194 @end
195 */
196
197 KSVG_IMPLEMENT_CONSTRUCTOR(SVGPaintConstructor, "SVGPaint")
198
199 /*
200 @begin SVGGradientElementConstructor::s_hashTable 5
201  SVG_SPREADMETHOD_UNKNOWN    SVG_SPREADMETHOD_UNKNOWN    DontDelete|ReadOnly
202  SVG_SPREADMETHOD_PAD        SVG_SPREADMETHOD_PAD        DontDelete|ReadOnly
203  SVG_SPREADMETHOD_REFLECT    SVG_SPREADMETHOD_REFLECT    DontDelete|ReadOnly
204  SVG_SPREADMETHOD_REPEAT    SVG_SPREADMETHOD_REPEAT        DontDelete|ReadOnly
205 @end
206 */
207
208 KSVG_IMPLEMENT_CONSTRUCTOR(SVGGradientElementConstructor, "SVGGradientElement")
209
210 // vim:ts=4:noet