Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM AnimationEffectReadOnly.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_AnimationEffectReadOnlyBinding_h
4 : #define mozilla_dom_AnimationEffectReadOnlyBinding_h
5 :
6 : #include "AnimationEffectReadOnlyBinding.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/UnionTypes.h"
13 :
14 : namespace mozilla {
15 : namespace dom {
16 :
17 : class AnimationEffectReadOnly;
18 : struct AnimationEffectReadOnlyAtoms;
19 : struct AnimationEffectTimingPropertiesAtoms;
20 : struct ComputedTimingPropertiesAtoms;
21 : struct NativePropertyHooks;
22 : class OwningUnrestrictedDoubleOrString;
23 : class ProtoAndIfaceCache;
24 : class UnrestrictedDoubleOrString;
25 :
26 : } // namespace dom
27 : } // namespace mozilla
28 :
29 : namespace mozilla {
30 : namespace dom {
31 :
32 : enum class FillMode : uint8_t {
33 : None,
34 : Forwards,
35 : Backwards,
36 : Both,
37 : Auto,
38 : EndGuard_
39 : };
40 :
41 : namespace FillModeValues {
42 : extern const EnumEntry strings[6];
43 : } // namespace FillModeValues
44 :
45 : bool
46 : ToJSValue(JSContext* aCx, FillMode aArgument, JS::MutableHandle<JS::Value> aValue);
47 :
48 :
49 : enum class PlaybackDirection : uint8_t {
50 : Normal,
51 : Reverse,
52 : Alternate,
53 : Alternate_reverse,
54 : EndGuard_
55 : };
56 :
57 : namespace PlaybackDirectionValues {
58 : extern const EnumEntry strings[5];
59 : } // namespace PlaybackDirectionValues
60 :
61 : bool
62 : ToJSValue(JSContext* aCx, PlaybackDirection aArgument, JS::MutableHandle<JS::Value> aValue);
63 :
64 :
65 0 : struct AnimationEffectTimingProperties : public DictionaryBase
66 : {
67 : MOZ_INIT_OUTSIDE_CTOR double mDelay;
68 : MOZ_INIT_OUTSIDE_CTOR PlaybackDirection mDirection;
69 : MOZ_INIT_OUTSIDE_CTOR OwningUnrestrictedDoubleOrString mDuration;
70 : MOZ_INIT_OUTSIDE_CTOR nsString mEasing;
71 : MOZ_INIT_OUTSIDE_CTOR double mEndDelay;
72 : MOZ_INIT_OUTSIDE_CTOR FillMode mFill;
73 : MOZ_INIT_OUTSIDE_CTOR double mIterationStart;
74 : MOZ_INIT_OUTSIDE_CTOR double mIterations;
75 :
76 : AnimationEffectTimingProperties();
77 :
78 0 : explicit inline AnimationEffectTimingProperties(const FastDictionaryInitializer& )
79 0 : {
80 : // Do nothing here; this is used by our "Fast" subclass
81 0 : }
82 :
83 : explicit inline AnimationEffectTimingProperties(const AnimationEffectTimingProperties& aOther)
84 : {
85 : *this = aOther;
86 : }
87 :
88 : bool
89 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
90 :
91 : bool
92 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
93 :
94 : void
95 : TraceDictionary(JSTracer* trc);
96 :
97 : AnimationEffectTimingProperties&
98 : operator=(const AnimationEffectTimingProperties& aOther);
99 :
100 : private:
101 : static bool
102 : InitIds(JSContext* cx, AnimationEffectTimingPropertiesAtoms* atomsCache);
103 : };
104 :
105 : namespace binding_detail {
106 : struct FastAnimationEffectTimingProperties : public AnimationEffectTimingProperties
107 : {
108 : inline FastAnimationEffectTimingProperties()
109 : : AnimationEffectTimingProperties(FastDictionaryInitializer())
110 : {
111 : // Doesn't matter what int we pass to the parent constructor
112 : }
113 : };
114 : } // namespace binding_detail
115 :
116 :
117 0 : struct ComputedTimingProperties : public AnimationEffectTimingProperties
118 : {
119 : MOZ_INIT_OUTSIDE_CTOR double mActiveDuration;
120 : MOZ_INIT_OUTSIDE_CTOR Nullable<double> mCurrentIteration;
121 : MOZ_INIT_OUTSIDE_CTOR double mEndTime;
122 : MOZ_INIT_OUTSIDE_CTOR Nullable<double> mLocalTime;
123 : MOZ_INIT_OUTSIDE_CTOR Nullable<double> mProgress;
124 :
125 : ComputedTimingProperties();
126 :
127 : explicit inline ComputedTimingProperties(const FastDictionaryInitializer& )
128 : : AnimationEffectTimingProperties(FastDictionaryInitializer())
129 : {
130 : // Do nothing here; this is used by our "Fast" subclass
131 : }
132 :
133 : explicit inline ComputedTimingProperties(const ComputedTimingProperties& aOther)
134 : {
135 : *this = aOther;
136 : }
137 :
138 : bool
139 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
140 :
141 : bool
142 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
143 :
144 : void
145 : TraceDictionary(JSTracer* trc);
146 :
147 : ComputedTimingProperties&
148 : operator=(const ComputedTimingProperties& aOther);
149 :
150 : private:
151 : static bool
152 : InitIds(JSContext* cx, ComputedTimingPropertiesAtoms* atomsCache);
153 : };
154 :
155 : namespace binding_detail {
156 : struct FastComputedTimingProperties : public ComputedTimingProperties
157 : {
158 : inline FastComputedTimingProperties()
159 : : ComputedTimingProperties(FastDictionaryInitializer())
160 : {
161 : // Doesn't matter what int we pass to the parent constructor
162 : }
163 : };
164 : } // namespace binding_detail
165 :
166 :
167 : namespace AnimationEffectReadOnlyBinding {
168 :
169 : typedef mozilla::dom::AnimationEffectReadOnly NativeType;
170 :
171 : bool
172 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
173 :
174 : JSObject*
175 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
176 :
177 : // We declare this as an array so that retrieving a pointer to this
178 : // binding's property hooks only requires compile/link-time resolvable
179 : // address arithmetic. Declaring it as a pointer instead would require
180 : // doing a run-time load to fetch a pointer to this binding's property
181 : // hooks. And then structures which embedded a pointer to this structure
182 : // would require a run-time load for proper initialization, which would
183 : // then induce static constructors. Lots of static constructors.
184 : extern const NativePropertyHooks sNativePropertyHooks[];
185 :
186 : void
187 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
188 :
189 : JS::Handle<JSObject*>
190 : GetProtoObjectHandle(JSContext* aCx);
191 :
192 : JSObject*
193 : GetProtoObject(JSContext* aCx);
194 :
195 : JS::Handle<JSObject*>
196 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
197 :
198 : JSObject*
199 : GetConstructorObject(JSContext* aCx);
200 :
201 : } // namespace AnimationEffectReadOnlyBinding
202 :
203 :
204 :
205 : } // namespace dom
206 : } // namespace mozilla
207 :
208 : #endif // mozilla_dom_AnimationEffectReadOnlyBinding_h
|