Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM Animation.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_AnimationBinding_h
4 : #define mozilla_dom_AnimationBinding_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 : class Animation;
16 : struct AnimationAtoms;
17 : struct NativePropertyHooks;
18 : class ProtoAndIfaceCache;
19 :
20 : } // namespace dom
21 : } // namespace mozilla
22 :
23 : namespace mozilla {
24 : namespace dom {
25 :
26 : enum class AnimationPlayState : uint8_t {
27 : Idle,
28 : Pending,
29 : Running,
30 : Paused,
31 : Finished,
32 : EndGuard_
33 : };
34 :
35 : namespace AnimationPlayStateValues {
36 : extern const EnumEntry strings[6];
37 : } // namespace AnimationPlayStateValues
38 :
39 : bool
40 : ToJSValue(JSContext* aCx, AnimationPlayState aArgument, JS::MutableHandle<JS::Value> aValue);
41 :
42 :
43 : namespace AnimationBinding {
44 :
45 : typedef mozilla::dom::Animation NativeType;
46 :
47 : bool
48 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
49 :
50 : JSObject*
51 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
52 :
53 : const JSClass*
54 : GetJSClass();
55 :
56 : bool
57 : Wrap(JSContext* aCx, mozilla::dom::Animation* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
58 :
59 : template <class T>
60 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
61 : {
62 0 : JS::Rooted<JSObject*> reflector(aCx);
63 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
64 : }
65 :
66 : // We declare this as an array so that retrieving a pointer to this
67 : // binding's property hooks only requires compile/link-time resolvable
68 : // address arithmetic. Declaring it as a pointer instead would require
69 : // doing a run-time load to fetch a pointer to this binding's property
70 : // hooks. And then structures which embedded a pointer to this structure
71 : // would require a run-time load for proper initialization, which would
72 : // then induce static constructors. Lots of static constructors.
73 : extern const NativePropertyHooks sNativePropertyHooks[];
74 :
75 : void
76 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
77 :
78 : JS::Handle<JSObject*>
79 : GetProtoObjectHandle(JSContext* aCx);
80 :
81 : JSObject*
82 : GetProtoObject(JSContext* aCx);
83 :
84 : JS::Handle<JSObject*>
85 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
86 :
87 : JSObject*
88 : GetConstructorObject(JSContext* aCx);
89 :
90 : } // namespace AnimationBinding
91 :
92 :
93 :
94 : } // namespace dom
95 : } // namespace mozilla
96 :
97 : #endif // mozilla_dom_AnimationBinding_h
|