tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSLowPass2FilterNode.cpp
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 #if ENABLE(WEB_AUDIO)
24
25 #include "JSLowPass2FilterNode.h"
26
27 #include "AudioParam.h"
28 #include "JSAudioParam.h"
29 #include "LowPass2FilterNode.h"
30 #include <wtf/GetPtr.h>
31
32 using namespace JSC;
33
34 namespace WebCore {
35
36 ASSERT_CLASS_FITS_IN_CELL(JSLowPass2FilterNode);
37
38 /* Hash table */
39 #if ENABLE(JIT)
40 #define THUNK_GENERATOR(generator) , generator
41 #else
42 #define THUNK_GENERATOR(generator)
43 #endif
44 #if ENABLE(DFG_JIT)
45 #define INTRINSIC(intrinsic) , intrinsic
46 #else
47 #define INTRINSIC(intrinsic)
48 #endif
49
50 static const HashTableValue JSLowPass2FilterNodeTableValues[] =
51 {
52     { "cutoff", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsLowPass2FilterNodeCutoff), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
53     { "resonance", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsLowPass2FilterNodeResonance), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
54     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsLowPass2FilterNodeConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
55     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
56 };
57
58 #undef THUNK_GENERATOR
59 static const HashTable JSLowPass2FilterNodeTable = { 9, 7, JSLowPass2FilterNodeTableValues, 0 };
60 /* Hash table for constructor */
61 #if ENABLE(JIT)
62 #define THUNK_GENERATOR(generator) , generator
63 #else
64 #define THUNK_GENERATOR(generator)
65 #endif
66 #if ENABLE(DFG_JIT)
67 #define INTRINSIC(intrinsic) , intrinsic
68 #else
69 #define INTRINSIC(intrinsic)
70 #endif
71
72 static const HashTableValue JSLowPass2FilterNodeConstructorTableValues[] =
73 {
74     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
75 };
76
77 #undef THUNK_GENERATOR
78 static const HashTable JSLowPass2FilterNodeConstructorTable = { 1, 0, JSLowPass2FilterNodeConstructorTableValues, 0 };
79 const ClassInfo JSLowPass2FilterNodeConstructor::s_info = { "LowPass2FilterNodeConstructor", &DOMConstructorObject::s_info, &JSLowPass2FilterNodeConstructorTable, 0, CREATE_METHOD_TABLE(JSLowPass2FilterNodeConstructor) };
80
81 JSLowPass2FilterNodeConstructor::JSLowPass2FilterNodeConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
82     : DOMConstructorObject(structure, globalObject)
83 {
84 }
85
86 void JSLowPass2FilterNodeConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
87 {
88     Base::finishCreation(exec->globalData());
89     ASSERT(inherits(&s_info));
90     putDirect(exec->globalData(), exec->propertyNames().prototype, JSLowPass2FilterNodePrototype::self(exec, globalObject), DontDelete | ReadOnly);
91 }
92
93 bool JSLowPass2FilterNodeConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
94 {
95     return getStaticValueSlot<JSLowPass2FilterNodeConstructor, JSDOMWrapper>(exec, &JSLowPass2FilterNodeConstructorTable, static_cast<JSLowPass2FilterNodeConstructor*>(cell), propertyName, slot);
96 }
97
98 bool JSLowPass2FilterNodeConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
99 {
100     return getStaticValueDescriptor<JSLowPass2FilterNodeConstructor, JSDOMWrapper>(exec, &JSLowPass2FilterNodeConstructorTable, static_cast<JSLowPass2FilterNodeConstructor*>(object), propertyName, descriptor);
101 }
102
103 /* Hash table for prototype */
104 #if ENABLE(JIT)
105 #define THUNK_GENERATOR(generator) , generator
106 #else
107 #define THUNK_GENERATOR(generator)
108 #endif
109 #if ENABLE(DFG_JIT)
110 #define INTRINSIC(intrinsic) , intrinsic
111 #else
112 #define INTRINSIC(intrinsic)
113 #endif
114
115 static const HashTableValue JSLowPass2FilterNodePrototypeTableValues[] =
116 {
117     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
118 };
119
120 #undef THUNK_GENERATOR
121 static const HashTable JSLowPass2FilterNodePrototypeTable = { 1, 0, JSLowPass2FilterNodePrototypeTableValues, 0 };
122 const ClassInfo JSLowPass2FilterNodePrototype::s_info = { "LowPass2FilterNodePrototype", &JSC::JSNonFinalObject::s_info, &JSLowPass2FilterNodePrototypeTable, 0, CREATE_METHOD_TABLE(JSLowPass2FilterNodePrototype) };
123
124 JSObject* JSLowPass2FilterNodePrototype::self(ExecState* exec, JSGlobalObject* globalObject)
125 {
126     return getDOMPrototype<JSLowPass2FilterNode>(exec, globalObject);
127 }
128
129 const ClassInfo JSLowPass2FilterNode::s_info = { "LowPass2FilterNode", &JSAudioNode::s_info, &JSLowPass2FilterNodeTable, 0 , CREATE_METHOD_TABLE(JSLowPass2FilterNode) };
130
131 JSLowPass2FilterNode::JSLowPass2FilterNode(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<LowPass2FilterNode> impl)
132     : JSAudioNode(structure, globalObject, impl)
133 {
134 }
135
136 void JSLowPass2FilterNode::finishCreation(JSGlobalData& globalData)
137 {
138     Base::finishCreation(globalData);
139     ASSERT(inherits(&s_info));
140 }
141
142 JSObject* JSLowPass2FilterNode::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
143 {
144     return JSLowPass2FilterNodePrototype::create(exec->globalData(), globalObject, JSLowPass2FilterNodePrototype::createStructure(exec->globalData(), globalObject, JSAudioNodePrototype::self(exec, globalObject)));
145 }
146
147 bool JSLowPass2FilterNode::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
148 {
149     JSLowPass2FilterNode* thisObject = jsCast<JSLowPass2FilterNode*>(cell);
150     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
151     return getStaticValueSlot<JSLowPass2FilterNode, Base>(exec, &JSLowPass2FilterNodeTable, thisObject, propertyName, slot);
152 }
153
154 bool JSLowPass2FilterNode::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
155 {
156     JSLowPass2FilterNode* thisObject = jsCast<JSLowPass2FilterNode*>(object);
157     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
158     return getStaticValueDescriptor<JSLowPass2FilterNode, Base>(exec, &JSLowPass2FilterNodeTable, thisObject, propertyName, descriptor);
159 }
160
161 JSValue jsLowPass2FilterNodeCutoff(ExecState* exec, JSValue slotBase, const Identifier&)
162 {
163     JSLowPass2FilterNode* castedThis = static_cast<JSLowPass2FilterNode*>(asObject(slotBase));
164     UNUSED_PARAM(exec);
165     LowPass2FilterNode* imp = static_cast<LowPass2FilterNode*>(castedThis->impl());
166     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->cutoff()));
167     return result;
168 }
169
170
171 JSValue jsLowPass2FilterNodeResonance(ExecState* exec, JSValue slotBase, const Identifier&)
172 {
173     JSLowPass2FilterNode* castedThis = static_cast<JSLowPass2FilterNode*>(asObject(slotBase));
174     UNUSED_PARAM(exec);
175     LowPass2FilterNode* imp = static_cast<LowPass2FilterNode*>(castedThis->impl());
176     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->resonance()));
177     return result;
178 }
179
180
181 JSValue jsLowPass2FilterNodeConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
182 {
183     JSLowPass2FilterNode* domObject = static_cast<JSLowPass2FilterNode*>(asObject(slotBase));
184     return JSLowPass2FilterNode::getConstructor(exec, domObject->globalObject());
185 }
186
187 JSValue JSLowPass2FilterNode::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
188 {
189     return getDOMConstructor<JSLowPass2FilterNodeConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
190 }
191
192 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, LowPass2FilterNode* impl)
193 {
194     return wrap<JSLowPass2FilterNode>(exec, globalObject, impl);
195 }
196
197
198 }
199
200 #endif // ENABLE(WEB_AUDIO)