Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM TextTrack.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_TextTrackBinding_h
4 : #define mozilla_dom_TextTrackBinding_h
5 :
6 : #include "js/RootingAPI.h"
7 : #include "jspubtd.h"
8 : #include "mozilla/ErrorResult.h"
9 : #include "mozilla/dom/BindingDeclarations.h"
10 : #include "mozilla/dom/Nullable.h"
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 : struct NativePropertyHooks;
16 : class ProtoAndIfaceCache;
17 : class TextTrack;
18 : struct TextTrackAtoms;
19 :
20 : } // namespace dom
21 : } // namespace mozilla
22 :
23 : namespace mozilla {
24 : namespace dom {
25 :
26 : enum class TextTrackKind : uint8_t {
27 : Subtitles,
28 : Captions,
29 : Descriptions,
30 : Chapters,
31 : Metadata,
32 : EndGuard_
33 : };
34 :
35 : namespace TextTrackKindValues {
36 : extern const EnumEntry strings[6];
37 : } // namespace TextTrackKindValues
38 :
39 : bool
40 : ToJSValue(JSContext* aCx, TextTrackKind aArgument, JS::MutableHandle<JS::Value> aValue);
41 :
42 :
43 : enum class TextTrackMode : uint8_t {
44 : Disabled,
45 : Hidden,
46 : Showing,
47 : EndGuard_
48 : };
49 :
50 : namespace TextTrackModeValues {
51 : extern const EnumEntry strings[4];
52 : } // namespace TextTrackModeValues
53 :
54 : bool
55 : ToJSValue(JSContext* aCx, TextTrackMode aArgument, JS::MutableHandle<JS::Value> aValue);
56 :
57 :
58 : namespace TextTrackBinding {
59 :
60 : typedef mozilla::dom::TextTrack NativeType;
61 :
62 : JSObject*
63 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
64 :
65 : const JSClass*
66 : GetJSClass();
67 :
68 : bool
69 : Wrap(JSContext* aCx, mozilla::dom::TextTrack* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
70 :
71 : template <class T>
72 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
73 : {
74 0 : JS::Rooted<JSObject*> reflector(aCx);
75 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
76 : }
77 :
78 : // We declare this as an array so that retrieving a pointer to this
79 : // binding's property hooks only requires compile/link-time resolvable
80 : // address arithmetic. Declaring it as a pointer instead would require
81 : // doing a run-time load to fetch a pointer to this binding's property
82 : // hooks. And then structures which embedded a pointer to this structure
83 : // would require a run-time load for proper initialization, which would
84 : // then induce static constructors. Lots of static constructors.
85 : extern const NativePropertyHooks sNativePropertyHooks[];
86 :
87 : void
88 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
89 :
90 : JS::Handle<JSObject*>
91 : GetProtoObjectHandle(JSContext* aCx);
92 :
93 : JS::Handle<JSObject*>
94 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
95 :
96 : JSObject*
97 : GetConstructorObject(JSContext* aCx);
98 :
99 : } // namespace TextTrackBinding
100 :
101 :
102 :
103 : } // namespace dom
104 : } // namespace mozilla
105 :
106 : #endif // mozilla_dom_TextTrackBinding_h
|