tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

GamepadServiceTest.webidl (2371B)


      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 [Pref="dom.gamepad.test.enabled",
      6 Exposed=Window]
      7 interface GamepadServiceTest
      8 {
      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;
     14 
     15  [NewObject]
     16  Promise<unsigned long> addGamepad(DOMString id,
     17                                    GamepadMappingType mapping,
     18                                    GamepadHand hand,
     19                                    unsigned long numButtons,
     20                                    unsigned long numAxes,
     21                                    unsigned long numHaptics,
     22                                    unsigned long numLightIndicator,
     23                                    unsigned long numTouchEvents);
     24 
     25  [NewObject]
     26  Promise<unsigned long> removeGamepad(unsigned long index);
     27 
     28  [NewObject]
     29  Promise<unsigned long> newButtonEvent(unsigned long index,
     30                      unsigned long button,
     31                      boolean pressed,
     32                      boolean touched);
     33 
     34  [NewObject]
     35  Promise<unsigned long> newButtonValueEvent(unsigned long index,
     36                                             unsigned long button,
     37                                             boolean pressed,
     38                                             boolean touched,
     39                                             double value);
     40 
     41  [NewObject]
     42  Promise<unsigned long> newAxisMoveEvent(unsigned long index,
     43                        unsigned long axis,
     44                        double value);
     45  [NewObject]
     46  Promise<unsigned long> newPoseMove(unsigned long index,
     47                   Float32Array? orient,
     48                   Float32Array? pos,
     49                   Float32Array? angVelocity,
     50                   Float32Array? angAcceleration,
     51                   Float32Array? linVelocity,
     52                   Float32Array? linAcceleration);
     53 
     54  [NewObject]
     55  Promise<unsigned long> newTouch(unsigned long index, unsigned long aTouchArrayIndex,
     56                unsigned long touchId, octet surfaceId,
     57                Float32Array position, Float32Array? surfaceDimension);
     58 };