gecko-dev/dom/webidl/GamepadServiceTest.webidl
Daosheng Mu 755ed03e79 Bug 1315896 - Part 1: Remove MOZ_GAMEPAD in DOM API; r=qdot
MozReview-Commit-ID: IgvMuXlE5BS

--HG--
extra : rebase_source : 6c04c83c583193bb3d4b75c33398411626fffe8e
2016-12-08 12:59:06 -10:00

31 lines
1.1 KiB
Plaintext

/* 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"]
interface GamepadServiceTest
{
readonly attribute GamepadMappingType noMapping;
readonly attribute GamepadMappingType standardMapping;
[Throws]
Promise<unsigned long> addGamepad(DOMString id,
GamepadMappingType mapping,
unsigned long numButtons,
unsigned long numAxes);
void removeGamepad(unsigned long index);
void newButtonEvent(unsigned long index,
unsigned long button,
boolean pressed);
void newButtonValueEvent(unsigned long index,
unsigned long button,
boolean pressed,
double value);
void newAxisMoveEvent(unsigned long index,
unsigned long axis,
double value);
};