2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
21 #ifndef JSAudioListener_h
22 #define JSAudioListener_h
26 #include "AudioListener.h"
27 #include "JSDOMBinding.h"
28 #include <runtime/JSGlobalObject.h>
29 #include <runtime/JSObject.h>
30 #include <runtime/ObjectPrototype.h>
34 class JSAudioListener : public JSDOMWrapper {
36 typedef JSDOMWrapper Base;
37 static JSAudioListener* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<AudioListener> impl)
39 JSAudioListener* ptr = new (JSC::allocateCell<JSAudioListener>(globalObject->globalData().heap)) JSAudioListener(structure, globalObject, impl);
40 ptr->finishCreation(globalObject->globalData());
44 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
45 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
46 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
47 static void put(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
48 static const JSC::ClassInfo s_info;
50 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
52 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
55 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
56 AudioListener* impl() const { return m_impl; }
57 void releaseImpl() { m_impl->deref(); m_impl = 0; }
60 AudioListener* m_impl;
62 JSAudioListener(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<AudioListener>);
63 void finishCreation(JSC::JSGlobalData&);
64 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
67 class JSAudioListenerOwner : public JSC::WeakHandleOwner {
68 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
69 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
72 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, AudioListener*)
74 DEFINE_STATIC_LOCAL(JSAudioListenerOwner, jsAudioListenerOwner, ());
75 return &jsAudioListenerOwner;
78 inline void* wrapperContext(DOMWrapperWorld* world, AudioListener*)
83 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, AudioListener*);
84 AudioListener* toAudioListener(JSC::JSValue);
86 class JSAudioListenerPrototype : public JSC::JSNonFinalObject {
88 typedef JSC::JSNonFinalObject Base;
89 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
90 static JSAudioListenerPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
92 JSAudioListenerPrototype* ptr = new (JSC::allocateCell<JSAudioListenerPrototype>(globalData.heap)) JSAudioListenerPrototype(globalData, globalObject, structure);
93 ptr->finishCreation(globalData);
97 static const JSC::ClassInfo s_info;
98 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
99 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
100 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
102 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
106 JSAudioListenerPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
108 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
111 class JSAudioListenerConstructor : public DOMConstructorObject {
113 JSAudioListenerConstructor(JSC::Structure*, JSDOMGlobalObject*);
114 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
117 typedef DOMConstructorObject Base;
118 static JSAudioListenerConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
120 JSAudioListenerConstructor* ptr = new (JSC::allocateCell<JSAudioListenerConstructor>(*exec->heap())) JSAudioListenerConstructor(structure, globalObject);
121 ptr->finishCreation(exec, globalObject);
125 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
126 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
127 static const JSC::ClassInfo s_info;
128 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
130 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
133 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
138 JSC::EncodedJSValue JSC_HOST_CALL jsAudioListenerPrototypeFunctionSetPosition(JSC::ExecState*);
139 JSC::EncodedJSValue JSC_HOST_CALL jsAudioListenerPrototypeFunctionSetOrientation(JSC::ExecState*);
140 JSC::EncodedJSValue JSC_HOST_CALL jsAudioListenerPrototypeFunctionSetVelocity(JSC::ExecState*);
143 JSC::JSValue jsAudioListenerDopplerFactor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
144 void setJSAudioListenerDopplerFactor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
145 JSC::JSValue jsAudioListenerSpeedOfSound(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
146 void setJSAudioListenerSpeedOfSound(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
147 JSC::JSValue jsAudioListenerConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
149 } // namespace WebCore
151 #endif // ENABLE(WEB_AUDIO)