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/. */
5 [Pref="dom.gamepad.test.enabled",
7 interface GamepadServiceTest
9 readonly attribute GamepadMappingType noMapping;
10 readonly attribute GamepadMappingType standardMapping;
11 readonly attribute GamepadHand noHand;
12 readonly attribute GamepadHand leftHand;
13 readonly attribute GamepadHand rightHand;
16 Promise<unsigned long> addGamepad(DOMString id,
17 GamepadMappingType mapping,
19 unsigned long numButtons,
20 unsigned long numAxes,
21 unsigned long numHaptics,
22 unsigned long numLightIndicator,
23 unsigned long numTouchEvents);
26 Promise<unsigned long> removeGamepad(unsigned long index);
29 Promise<unsigned long> newButtonEvent(unsigned long index,
35 Promise<unsigned long> newButtonValueEvent(unsigned long index,
42 Promise<unsigned long> newAxisMoveEvent(unsigned long index,
46 Promise<unsigned long> newPoseMove(unsigned long index,
49 Float32Array? angVelocity,
50 Float32Array? angAcceleration,
51 Float32Array? linVelocity,
52 Float32Array? linAcceleration);
55 Promise<unsigned long> newTouch(unsigned long index, unsigned long aTouchArrayIndex,
56 unsigned long touchId, octet surfaceId,
57 Float32Array position, Float32Array? surfaceDimension);