summaryrefslogtreecommitdiffstats
path: root/dom/webidl/GamepadServiceTest.webidl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /dom/webidl/GamepadServiceTest.webidl
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--dom/webidl/GamepadServiceTest.webidl52
1 files changed, 52 insertions, 0 deletions
diff --git a/dom/webidl/GamepadServiceTest.webidl b/dom/webidl/GamepadServiceTest.webidl
new file mode 100644
index 0000000000..fa21b88b73
--- /dev/null
+++ b/dom/webidl/GamepadServiceTest.webidl
@@ -0,0 +1,52 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+[Pref="dom.gamepad.test.enabled",
+ Exposed=Window]
+interface GamepadServiceTest
+{
+ readonly attribute GamepadMappingType noMapping;
+ readonly attribute GamepadMappingType standardMapping;
+ readonly attribute GamepadHand noHand;
+ readonly attribute GamepadHand leftHand;
+ readonly attribute GamepadHand rightHand;
+
+ [Throws]
+ Promise<unsigned long> addGamepad(DOMString id,
+ GamepadMappingType mapping,
+ GamepadHand hand,
+ unsigned long numButtons,
+ unsigned long numAxes,
+ unsigned long numHaptics,
+ unsigned long numLightIndicator,
+ unsigned long numTouchEvents);
+
+ void removeGamepad(unsigned long index);
+
+ void newButtonEvent(unsigned long index,
+ unsigned long button,
+ boolean pressed,
+ boolean touched);
+
+ void newButtonValueEvent(unsigned long index,
+ unsigned long button,
+ boolean pressed,
+ boolean touched,
+ double value);
+
+ void newAxisMoveEvent(unsigned long index,
+ unsigned long axis,
+ double value);
+ void newPoseMove(unsigned long index,
+ Float32Array? orient,
+ Float32Array? pos,
+ Float32Array? angVelocity,
+ Float32Array? angAcceleration,
+ Float32Array? linVelocity,
+ Float32Array? linAcceleration);
+
+ void newTouch(unsigned long index, unsigned long aTouchArrayIndex,
+ unsigned long touchId, octet surfaceId,
+ Float32Array position, Float32Array? surfaceDimension);
+}; \ No newline at end of file