|
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 "JSSVGRenderingIntent.h" |
|
32 |
|
33 #include <wtf/GetPtr.h> |
|
34 |
|
35 #include "SVGRenderingIntent.h" |
|
36 |
|
37 using namespace KJS; |
|
38 |
|
39 namespace WebCore { |
|
40 |
|
41 /* Hash table */ |
|
42 |
|
43 static const HashEntry JSSVGRenderingIntentTableEntries[] = |
|
44 { |
|
45 { "constructor", JSSVGRenderingIntent::ConstructorAttrNum, DontDelete|DontEnum|ReadOnly, 0, 0 } |
|
46 }; |
|
47 |
|
48 static const HashTable JSSVGRenderingIntentTable = |
|
49 { |
|
50 2, 1, JSSVGRenderingIntentTableEntries, 1 |
|
51 }; |
|
52 |
|
53 /* Hash table for constructor */ |
|
54 |
|
55 static const HashEntry JSSVGRenderingIntentConstructorTableEntries[] = |
|
56 { |
|
57 { 0, 0, 0, 0, 0 }, |
|
58 { "RENDERING_INTENT_UNKNOWN", SVGRenderingIntent::RENDERING_INTENT_UNKNOWN, DontDelete|ReadOnly, 0, 0 }, |
|
59 { 0, 0, 0, 0, 0 }, |
|
60 { "RENDERING_INTENT_SATURATION", SVGRenderingIntent::RENDERING_INTENT_SATURATION, DontDelete|ReadOnly, 0, 0 }, |
|
61 { "RENDERING_INTENT_AUTO", SVGRenderingIntent::RENDERING_INTENT_AUTO, DontDelete|ReadOnly, 0, &JSSVGRenderingIntentConstructorTableEntries[6] }, |
|
62 { "RENDERING_INTENT_PERCEPTUAL", SVGRenderingIntent::RENDERING_INTENT_PERCEPTUAL, DontDelete|ReadOnly, 0, &JSSVGRenderingIntentConstructorTableEntries[7] }, |
|
63 { "RENDERING_INTENT_RELATIVE_COLORIMETRIC", SVGRenderingIntent::RENDERING_INTENT_RELATIVE_COLORIMETRIC, DontDelete|ReadOnly, 0, 0 }, |
|
64 { "RENDERING_INTENT_ABSOLUTE_COLORIMETRIC", SVGRenderingIntent::RENDERING_INTENT_ABSOLUTE_COLORIMETRIC, DontDelete|ReadOnly, 0, 0 } |
|
65 }; |
|
66 |
|
67 static const HashTable JSSVGRenderingIntentConstructorTable = |
|
68 { |
|
69 2, 8, JSSVGRenderingIntentConstructorTableEntries, 6 |
|
70 }; |
|
71 |
|
72 class JSSVGRenderingIntentConstructor : public DOMObject { |
|
73 public: |
|
74 JSSVGRenderingIntentConstructor(ExecState* exec) |
|
75 { |
|
76 setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype()); |
|
77 putDirect(exec->propertyNames().prototype, JSSVGRenderingIntentPrototype::self(exec), None); |
|
78 } |
|
79 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); |
|
80 JSValue* getValueProperty(ExecState*, int token) const; |
|
81 virtual const ClassInfo* classInfo() const { return &info; } |
|
82 static const ClassInfo info; |
|
83 |
|
84 virtual bool implementsHasInstance() const { return true; } |
|
85 }; |
|
86 |
|
87 const ClassInfo JSSVGRenderingIntentConstructor::info = { "SVGRenderingIntentConstructor", 0, &JSSVGRenderingIntentConstructorTable, 0 }; |
|
88 |
|
89 bool JSSVGRenderingIntentConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
90 { |
|
91 return getStaticValueSlot<JSSVGRenderingIntentConstructor, DOMObject>(exec, &JSSVGRenderingIntentConstructorTable, this, propertyName, slot); |
|
92 } |
|
93 |
|
94 JSValue* JSSVGRenderingIntentConstructor::getValueProperty(ExecState*, int token) const |
|
95 { |
|
96 // The token is the numeric value of its associated constant |
|
97 return jsNumber(token); |
|
98 } |
|
99 |
|
100 /* Hash table for prototype */ |
|
101 |
|
102 static const HashEntry JSSVGRenderingIntentPrototypeTableEntries[] = |
|
103 { |
|
104 { 0, 0, 0, 0, 0 }, |
|
105 { "RENDERING_INTENT_UNKNOWN", SVGRenderingIntent::RENDERING_INTENT_UNKNOWN, DontDelete|ReadOnly, 0, 0 }, |
|
106 { 0, 0, 0, 0, 0 }, |
|
107 { "RENDERING_INTENT_SATURATION", SVGRenderingIntent::RENDERING_INTENT_SATURATION, DontDelete|ReadOnly, 0, 0 }, |
|
108 { "RENDERING_INTENT_AUTO", SVGRenderingIntent::RENDERING_INTENT_AUTO, DontDelete|ReadOnly, 0, &JSSVGRenderingIntentPrototypeTableEntries[6] }, |
|
109 { "RENDERING_INTENT_PERCEPTUAL", SVGRenderingIntent::RENDERING_INTENT_PERCEPTUAL, DontDelete|ReadOnly, 0, &JSSVGRenderingIntentPrototypeTableEntries[7] }, |
|
110 { "RENDERING_INTENT_RELATIVE_COLORIMETRIC", SVGRenderingIntent::RENDERING_INTENT_RELATIVE_COLORIMETRIC, DontDelete|ReadOnly, 0, 0 }, |
|
111 { "RENDERING_INTENT_ABSOLUTE_COLORIMETRIC", SVGRenderingIntent::RENDERING_INTENT_ABSOLUTE_COLORIMETRIC, DontDelete|ReadOnly, 0, 0 } |
|
112 }; |
|
113 |
|
114 static const HashTable JSSVGRenderingIntentPrototypeTable = |
|
115 { |
|
116 2, 8, JSSVGRenderingIntentPrototypeTableEntries, 6 |
|
117 }; |
|
118 |
|
119 const ClassInfo JSSVGRenderingIntentPrototype::info = { "SVGRenderingIntentPrototype", 0, &JSSVGRenderingIntentPrototypeTable, 0 }; |
|
120 |
|
121 JSObject* JSSVGRenderingIntentPrototype::self(ExecState* exec) |
|
122 { |
|
123 return KJS::cacheGlobalObject<JSSVGRenderingIntentPrototype>(exec, "[[JSSVGRenderingIntent.prototype]]"); |
|
124 } |
|
125 |
|
126 bool JSSVGRenderingIntentPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
127 { |
|
128 return getStaticValueSlot<JSSVGRenderingIntentPrototype, JSObject>(exec, &JSSVGRenderingIntentPrototypeTable, this, propertyName, slot); |
|
129 } |
|
130 |
|
131 JSValue* JSSVGRenderingIntentPrototype::getValueProperty(ExecState*, int token) const |
|
132 { |
|
133 // The token is the numeric value of its associated constant |
|
134 return jsNumber(token); |
|
135 } |
|
136 |
|
137 const ClassInfo JSSVGRenderingIntent::info = { "SVGRenderingIntent", 0, &JSSVGRenderingIntentTable, 0 }; |
|
138 |
|
139 JSSVGRenderingIntent::JSSVGRenderingIntent(ExecState* exec, SVGRenderingIntent* impl) |
|
140 : m_impl(impl) |
|
141 { |
|
142 setPrototype(JSSVGRenderingIntentPrototype::self(exec)); |
|
143 } |
|
144 |
|
145 JSSVGRenderingIntent::~JSSVGRenderingIntent() |
|
146 { |
|
147 ScriptInterpreter::forgetDOMObject(m_impl.get()); |
|
148 } |
|
149 |
|
150 bool JSSVGRenderingIntent::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
151 { |
|
152 return getStaticValueSlot<JSSVGRenderingIntent, KJS::DOMObject>(exec, &JSSVGRenderingIntentTable, this, propertyName, slot); |
|
153 } |
|
154 |
|
155 JSValue* JSSVGRenderingIntent::getValueProperty(ExecState* exec, int token) const |
|
156 { |
|
157 switch (token) { |
|
158 case ConstructorAttrNum: |
|
159 return getConstructor(exec); |
|
160 } |
|
161 return 0; |
|
162 } |
|
163 |
|
164 JSValue* JSSVGRenderingIntent::getConstructor(ExecState* exec) |
|
165 { |
|
166 return KJS::cacheGlobalObject<JSSVGRenderingIntentConstructor>(exec, "[[SVGRenderingIntent.constructor]]"); |
|
167 } |
|
168 KJS::JSValue* toJS(KJS::ExecState* exec, SVGRenderingIntent* obj) |
|
169 { |
|
170 return KJS::cacheDOMObject<SVGRenderingIntent, JSSVGRenderingIntent>(exec, obj); |
|
171 } |
|
172 SVGRenderingIntent* toSVGRenderingIntent(KJS::JSValue* val) |
|
173 { |
|
174 return val->isObject(&JSSVGRenderingIntent::info) ? static_cast<JSSVGRenderingIntent*>(val)->impl() : 0; |
|
175 } |
|
176 |
|
177 } |
|
178 |
|
179 #endif // ENABLE(SVG) |