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