Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM AudioBufferSourceNode.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_AudioBufferSourceNodeBinding_h
4 : #define mozilla_dom_AudioBufferSourceNodeBinding_h
5 :
6 : #include "js/RootingAPI.h"
7 : #include "jspubtd.h"
8 : #include "mozilla/ErrorResult.h"
9 : #include "mozilla/dom/AudioBuffer.h"
10 : #include "mozilla/dom/BindingDeclarations.h"
11 : #include "mozilla/dom/Nullable.h"
12 :
13 : namespace mozilla {
14 : namespace dom {
15 :
16 : class AudioBuffer;
17 : class AudioBufferSourceNode;
18 : struct AudioBufferSourceNodeAtoms;
19 : struct AudioBufferSourceOptionsAtoms;
20 : struct NativePropertyHooks;
21 : class ProtoAndIfaceCache;
22 :
23 : } // namespace dom
24 : } // namespace mozilla
25 :
26 : namespace mozilla {
27 : namespace dom {
28 :
29 0 : struct AudioBufferSourceOptions : public DictionaryBase
30 : {
31 : MOZ_INIT_OUTSIDE_CTOR Optional<RefPtr<mozilla::dom::AudioBuffer>> mBuffer;
32 : MOZ_INIT_OUTSIDE_CTOR float mDetune;
33 : MOZ_INIT_OUTSIDE_CTOR bool mLoop;
34 : MOZ_INIT_OUTSIDE_CTOR double mLoopEnd;
35 : MOZ_INIT_OUTSIDE_CTOR double mLoopStart;
36 : MOZ_INIT_OUTSIDE_CTOR float mPlaybackRate;
37 :
38 : AudioBufferSourceOptions();
39 :
40 0 : explicit inline AudioBufferSourceOptions(const FastDictionaryInitializer& )
41 0 : {
42 : // Do nothing here; this is used by our "Fast" subclass
43 0 : }
44 :
45 : explicit inline AudioBufferSourceOptions(const AudioBufferSourceOptions& aOther)
46 : {
47 : *this = aOther;
48 : }
49 :
50 : bool
51 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
52 :
53 : bool
54 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
55 :
56 : void
57 : TraceDictionary(JSTracer* trc);
58 :
59 : AudioBufferSourceOptions&
60 : operator=(const AudioBufferSourceOptions& aOther);
61 :
62 : private:
63 : static bool
64 : InitIds(JSContext* cx, AudioBufferSourceOptionsAtoms* atomsCache);
65 : };
66 :
67 : namespace binding_detail {
68 0 : struct FastAudioBufferSourceOptions : public AudioBufferSourceOptions
69 : {
70 0 : inline FastAudioBufferSourceOptions()
71 0 : : AudioBufferSourceOptions(FastDictionaryInitializer())
72 : {
73 : // Doesn't matter what int we pass to the parent constructor
74 0 : }
75 : };
76 : } // namespace binding_detail
77 :
78 :
79 : namespace AudioBufferSourceNodeBinding {
80 :
81 : typedef mozilla::dom::AudioBufferSourceNode NativeType;
82 :
83 : bool
84 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
85 :
86 : JSObject*
87 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
88 :
89 : const JSClass*
90 : GetJSClass();
91 :
92 : bool
93 : Wrap(JSContext* aCx, mozilla::dom::AudioBufferSourceNode* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
94 :
95 : template <class T>
96 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
97 : {
98 0 : JS::Rooted<JSObject*> reflector(aCx);
99 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
100 : }
101 :
102 : // We declare this as an array so that retrieving a pointer to this
103 : // binding's property hooks only requires compile/link-time resolvable
104 : // address arithmetic. Declaring it as a pointer instead would require
105 : // doing a run-time load to fetch a pointer to this binding's property
106 : // hooks. And then structures which embedded a pointer to this structure
107 : // would require a run-time load for proper initialization, which would
108 : // then induce static constructors. Lots of static constructors.
109 : extern const NativePropertyHooks sNativePropertyHooks[];
110 :
111 : void
112 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
113 :
114 : JS::Handle<JSObject*>
115 : GetProtoObjectHandle(JSContext* aCx);
116 :
117 : JS::Handle<JSObject*>
118 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
119 :
120 : JSObject*
121 : GetConstructorObject(JSContext* aCx);
122 :
123 : } // namespace AudioBufferSourceNodeBinding
124 :
125 :
126 :
127 : } // namespace dom
128 : } // namespace mozilla
129 :
130 : #endif // mozilla_dom_AudioBufferSourceNodeBinding_h
|