Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM VRDisplay.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_VRDisplayBinding_h
4 : #define mozilla_dom_VRDisplayBinding_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/HTMLCanvasElement.h"
11 : #include "mozilla/dom/Nullable.h"
12 :
13 : namespace mozilla {
14 : namespace dom {
15 :
16 : class HTMLCanvasElement;
17 : struct NativePropertyHooks;
18 : class ProtoAndIfaceCache;
19 : class VRDisplay;
20 : struct VRDisplayAtoms;
21 : class VRDisplayCapabilities;
22 : struct VRDisplayCapabilitiesAtoms;
23 : class VREyeParameters;
24 : struct VREyeParametersAtoms;
25 : class VRFieldOfView;
26 : struct VRFieldOfViewAtoms;
27 : class VRFrameData;
28 : struct VRFrameDataAtoms;
29 : struct VRLayerAtoms;
30 : class VRPose;
31 : struct VRPoseAtoms;
32 : class VRStageParameters;
33 : struct VRStageParametersAtoms;
34 : class VRSubmitFrameResult;
35 : struct VRSubmitFrameResultAtoms;
36 :
37 : } // namespace dom
38 : } // namespace mozilla
39 :
40 : namespace mozilla {
41 : namespace dom {
42 :
43 : enum class VREye : uint8_t {
44 : Left,
45 : Right,
46 : EndGuard_
47 : };
48 :
49 : namespace VREyeValues {
50 : extern const EnumEntry strings[3];
51 : } // namespace VREyeValues
52 :
53 : bool
54 : ToJSValue(JSContext* aCx, VREye aArgument, JS::MutableHandle<JS::Value> aValue);
55 :
56 :
57 0 : struct VRLayer : public DictionaryBase
58 : {
59 : MOZ_INIT_OUTSIDE_CTOR Sequence<float> mLeftBounds;
60 : MOZ_INIT_OUTSIDE_CTOR Sequence<float> mRightBounds;
61 : MOZ_INIT_OUTSIDE_CTOR RefPtr<mozilla::dom::HTMLCanvasElement> mSource;
62 :
63 : VRLayer();
64 :
65 : explicit inline VRLayer(const FastDictionaryInitializer& )
66 : {
67 : // Do nothing here; this is used by our "Fast" subclass
68 : }
69 :
70 0 : explicit inline VRLayer(const VRLayer& aOther)
71 0 : {
72 0 : *this = aOther;
73 0 : }
74 :
75 : bool
76 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
77 :
78 : bool
79 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
80 :
81 : void
82 : TraceDictionary(JSTracer* trc);
83 :
84 : VRLayer&
85 : operator=(const VRLayer& aOther);
86 :
87 : private:
88 : static bool
89 : InitIds(JSContext* cx, VRLayerAtoms* atomsCache);
90 : };
91 :
92 : namespace binding_detail {
93 : struct FastVRLayer : public VRLayer
94 : {
95 : inline FastVRLayer()
96 : : VRLayer(FastDictionaryInitializer())
97 : {
98 : // Doesn't matter what int we pass to the parent constructor
99 : }
100 : };
101 : } // namespace binding_detail
102 :
103 :
104 : namespace VRDisplayBinding {
105 :
106 : typedef mozilla::dom::VRDisplay NativeType;
107 :
108 : bool
109 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
110 :
111 : JSObject*
112 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
113 :
114 : const JSClass*
115 : GetJSClass();
116 :
117 : bool
118 : Wrap(JSContext* aCx, mozilla::dom::VRDisplay* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
119 :
120 : template <class T>
121 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
122 : {
123 0 : JS::Rooted<JSObject*> reflector(aCx);
124 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
125 : }
126 :
127 : // We declare this as an array so that retrieving a pointer to this
128 : // binding's property hooks only requires compile/link-time resolvable
129 : // address arithmetic. Declaring it as a pointer instead would require
130 : // doing a run-time load to fetch a pointer to this binding's property
131 : // hooks. And then structures which embedded a pointer to this structure
132 : // would require a run-time load for proper initialization, which would
133 : // then induce static constructors. Lots of static constructors.
134 : extern const NativePropertyHooks sNativePropertyHooks[];
135 :
136 : void
137 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
138 :
139 : JS::Handle<JSObject*>
140 : GetProtoObjectHandle(JSContext* aCx);
141 :
142 : JS::Handle<JSObject*>
143 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
144 :
145 : JSObject*
146 : GetConstructorObject(JSContext* aCx);
147 :
148 : } // namespace VRDisplayBinding
149 :
150 :
151 :
152 : namespace VRDisplayCapabilitiesBinding {
153 :
154 : typedef mozilla::dom::VRDisplayCapabilities NativeType;
155 :
156 : bool
157 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
158 :
159 : JSObject*
160 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
161 :
162 : const JSClass*
163 : GetJSClass();
164 :
165 : bool
166 : Wrap(JSContext* aCx, mozilla::dom::VRDisplayCapabilities* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
167 :
168 : template <class T>
169 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
170 : {
171 0 : JS::Rooted<JSObject*> reflector(aCx);
172 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
173 : }
174 :
175 : // We declare this as an array so that retrieving a pointer to this
176 : // binding's property hooks only requires compile/link-time resolvable
177 : // address arithmetic. Declaring it as a pointer instead would require
178 : // doing a run-time load to fetch a pointer to this binding's property
179 : // hooks. And then structures which embedded a pointer to this structure
180 : // would require a run-time load for proper initialization, which would
181 : // then induce static constructors. Lots of static constructors.
182 : extern const NativePropertyHooks sNativePropertyHooks[];
183 :
184 : void
185 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
186 :
187 : JS::Handle<JSObject*>
188 : GetProtoObjectHandle(JSContext* aCx);
189 :
190 : JS::Handle<JSObject*>
191 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
192 :
193 : JSObject*
194 : GetConstructorObject(JSContext* aCx);
195 :
196 : } // namespace VRDisplayCapabilitiesBinding
197 :
198 :
199 :
200 : namespace VREyeParametersBinding {
201 :
202 : typedef mozilla::dom::VREyeParameters NativeType;
203 :
204 : bool
205 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
206 :
207 : JSObject*
208 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
209 :
210 : const JSClass*
211 : GetJSClass();
212 :
213 : bool
214 : Wrap(JSContext* aCx, mozilla::dom::VREyeParameters* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
215 :
216 : template <class T>
217 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
218 : {
219 0 : JS::Rooted<JSObject*> reflector(aCx);
220 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
221 : }
222 :
223 : // We declare this as an array so that retrieving a pointer to this
224 : // binding's property hooks only requires compile/link-time resolvable
225 : // address arithmetic. Declaring it as a pointer instead would require
226 : // doing a run-time load to fetch a pointer to this binding's property
227 : // hooks. And then structures which embedded a pointer to this structure
228 : // would require a run-time load for proper initialization, which would
229 : // then induce static constructors. Lots of static constructors.
230 : extern const NativePropertyHooks sNativePropertyHooks[];
231 :
232 : void
233 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
234 :
235 : JS::Handle<JSObject*>
236 : GetProtoObjectHandle(JSContext* aCx);
237 :
238 : JS::Handle<JSObject*>
239 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
240 :
241 : JSObject*
242 : GetConstructorObject(JSContext* aCx);
243 :
244 : } // namespace VREyeParametersBinding
245 :
246 :
247 :
248 : namespace VRFieldOfViewBinding {
249 :
250 : typedef mozilla::dom::VRFieldOfView NativeType;
251 :
252 : bool
253 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
254 :
255 : JSObject*
256 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
257 :
258 : const JSClass*
259 : GetJSClass();
260 :
261 : bool
262 : Wrap(JSContext* aCx, mozilla::dom::VRFieldOfView* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
263 :
264 : template <class T>
265 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
266 : {
267 0 : JS::Rooted<JSObject*> reflector(aCx);
268 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
269 : }
270 :
271 : // We declare this as an array so that retrieving a pointer to this
272 : // binding's property hooks only requires compile/link-time resolvable
273 : // address arithmetic. Declaring it as a pointer instead would require
274 : // doing a run-time load to fetch a pointer to this binding's property
275 : // hooks. And then structures which embedded a pointer to this structure
276 : // would require a run-time load for proper initialization, which would
277 : // then induce static constructors. Lots of static constructors.
278 : extern const NativePropertyHooks sNativePropertyHooks[];
279 :
280 : void
281 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
282 :
283 : JS::Handle<JSObject*>
284 : GetProtoObjectHandle(JSContext* aCx);
285 :
286 : JS::Handle<JSObject*>
287 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
288 :
289 : JSObject*
290 : GetConstructorObject(JSContext* aCx);
291 :
292 : } // namespace VRFieldOfViewBinding
293 :
294 :
295 :
296 : namespace VRFrameDataBinding {
297 :
298 : typedef mozilla::dom::VRFrameData NativeType;
299 :
300 : bool
301 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
302 :
303 : JSObject*
304 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
305 :
306 : const JSClass*
307 : GetJSClass();
308 :
309 : bool
310 : Wrap(JSContext* aCx, mozilla::dom::VRFrameData* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
311 :
312 : template <class T>
313 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
314 : {
315 0 : JS::Rooted<JSObject*> reflector(aCx);
316 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
317 : }
318 :
319 : // We declare this as an array so that retrieving a pointer to this
320 : // binding's property hooks only requires compile/link-time resolvable
321 : // address arithmetic. Declaring it as a pointer instead would require
322 : // doing a run-time load to fetch a pointer to this binding's property
323 : // hooks. And then structures which embedded a pointer to this structure
324 : // would require a run-time load for proper initialization, which would
325 : // then induce static constructors. Lots of static constructors.
326 : extern const NativePropertyHooks sNativePropertyHooks[];
327 :
328 : void
329 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
330 :
331 : JS::Handle<JSObject*>
332 : GetProtoObjectHandle(JSContext* aCx);
333 :
334 : JS::Handle<JSObject*>
335 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
336 :
337 : JSObject*
338 : GetConstructorObject(JSContext* aCx);
339 :
340 : } // namespace VRFrameDataBinding
341 :
342 :
343 :
344 : namespace VRPoseBinding {
345 :
346 : typedef mozilla::dom::VRPose NativeType;
347 :
348 : bool
349 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
350 :
351 : JSObject*
352 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
353 :
354 : const JSClass*
355 : GetJSClass();
356 :
357 : bool
358 : Wrap(JSContext* aCx, mozilla::dom::VRPose* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
359 :
360 : template <class T>
361 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
362 : {
363 0 : JS::Rooted<JSObject*> reflector(aCx);
364 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
365 : }
366 :
367 : // We declare this as an array so that retrieving a pointer to this
368 : // binding's property hooks only requires compile/link-time resolvable
369 : // address arithmetic. Declaring it as a pointer instead would require
370 : // doing a run-time load to fetch a pointer to this binding's property
371 : // hooks. And then structures which embedded a pointer to this structure
372 : // would require a run-time load for proper initialization, which would
373 : // then induce static constructors. Lots of static constructors.
374 : extern const NativePropertyHooks sNativePropertyHooks[];
375 :
376 : void
377 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
378 :
379 : JS::Handle<JSObject*>
380 : GetProtoObjectHandle(JSContext* aCx);
381 :
382 : JS::Handle<JSObject*>
383 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
384 :
385 : JSObject*
386 : GetConstructorObject(JSContext* aCx);
387 :
388 : } // namespace VRPoseBinding
389 :
390 :
391 :
392 : namespace VRStageParametersBinding {
393 :
394 : typedef mozilla::dom::VRStageParameters NativeType;
395 :
396 : bool
397 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
398 :
399 : JSObject*
400 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
401 :
402 : const JSClass*
403 : GetJSClass();
404 :
405 : bool
406 : Wrap(JSContext* aCx, mozilla::dom::VRStageParameters* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
407 :
408 : template <class T>
409 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
410 : {
411 0 : JS::Rooted<JSObject*> reflector(aCx);
412 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
413 : }
414 :
415 : // We declare this as an array so that retrieving a pointer to this
416 : // binding's property hooks only requires compile/link-time resolvable
417 : // address arithmetic. Declaring it as a pointer instead would require
418 : // doing a run-time load to fetch a pointer to this binding's property
419 : // hooks. And then structures which embedded a pointer to this structure
420 : // would require a run-time load for proper initialization, which would
421 : // then induce static constructors. Lots of static constructors.
422 : extern const NativePropertyHooks sNativePropertyHooks[];
423 :
424 : void
425 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
426 :
427 : JS::Handle<JSObject*>
428 : GetProtoObjectHandle(JSContext* aCx);
429 :
430 : JS::Handle<JSObject*>
431 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
432 :
433 : JSObject*
434 : GetConstructorObject(JSContext* aCx);
435 :
436 : } // namespace VRStageParametersBinding
437 :
438 :
439 :
440 : namespace VRSubmitFrameResultBinding {
441 :
442 : typedef mozilla::dom::VRSubmitFrameResult NativeType;
443 :
444 : bool
445 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
446 :
447 : JSObject*
448 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
449 :
450 : const JSClass*
451 : GetJSClass();
452 :
453 : bool
454 : Wrap(JSContext* aCx, mozilla::dom::VRSubmitFrameResult* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
455 :
456 : template <class T>
457 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
458 : {
459 0 : JS::Rooted<JSObject*> reflector(aCx);
460 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
461 : }
462 :
463 : // We declare this as an array so that retrieving a pointer to this
464 : // binding's property hooks only requires compile/link-time resolvable
465 : // address arithmetic. Declaring it as a pointer instead would require
466 : // doing a run-time load to fetch a pointer to this binding's property
467 : // hooks. And then structures which embedded a pointer to this structure
468 : // would require a run-time load for proper initialization, which would
469 : // then induce static constructors. Lots of static constructors.
470 : extern const NativePropertyHooks sNativePropertyHooks[];
471 :
472 : void
473 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
474 :
475 : JS::Handle<JSObject*>
476 : GetProtoObjectHandle(JSContext* aCx);
477 :
478 : JS::Handle<JSObject*>
479 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
480 :
481 : JSObject*
482 : GetConstructorObject(JSContext* aCx);
483 :
484 : } // namespace VRSubmitFrameResultBinding
485 :
486 :
487 :
488 : } // namespace dom
489 : } // namespace mozilla
490 :
491 : #endif // mozilla_dom_VRDisplayBinding_h
|