1/* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 3 * You can obtain one at http://mozilla.org/MPL/2.0/. 4 * 5 * This WebIDL is just for WebVR testing. 6 */ 7 8[Pref="dom.vr.test.enabled", 9 HeaderFile="mozilla/dom/VRServiceTest.h"] 10interface VRMockDisplay { 11 undefined setEyeResolution(unsigned long aRenderWidth, unsigned long aRenderHeight); 12 undefined setEyeParameter(VREye eye, double offsetX, double offsetY, double offsetZ, 13 double upDegree, double rightDegree, 14 double downDegree, double leftDegree); 15 undefined setPose(Float32Array? position, Float32Array? linearVelocity, 16 Float32Array? linearAcceleration, Float32Array? orientation, 17 Float32Array? angularVelocity, Float32Array? angularAcceleration); 18 undefined setMountState(boolean isMounted); 19 undefined update(); 20}; 21 22[Pref="dom.vr.test.enabled", 23 HeaderFile="mozilla/dom/VRServiceTest.h"] 24interface VRMockController { 25 undefined newButtonEvent(unsigned long button, boolean pressed); 26 undefined newAxisMoveEvent(unsigned long axis, double value); 27 undefined newPoseMove(Float32Array? position, Float32Array? linearVelocity, 28 Float32Array? linearAcceleration, Float32Array? orientation, 29 Float32Array? angularVelocity, Float32Array? angularAcceleration); 30}; 31 32[Pref="dom.vr.test.enabled", 33 HeaderFile="mozilla/dom/VRServiceTest.h"] 34interface VRServiceTest { 35 [Throws, NewObject] 36 Promise<VRMockDisplay> attachVRDisplay(DOMString id); 37 [Throws, NewObject] 38 Promise<VRMockController> attachVRController(DOMString id); 39}; 40