mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 00:49:46 +00:00
30 lines
976 B
Text
30 lines
976 B
Text
#import <HighResolutionTime/DOMHighResTimeStamp.idl>
|
|
#import <Gamepad/GamepadButton.idl>
|
|
#import <Gamepad/GamepadHapticActuator.idl>
|
|
|
|
// https://w3c.github.io/gamepad/#dom-gamepadmappingtype
|
|
enum GamepadMappingType {
|
|
"",
|
|
"standard",
|
|
"xr-standard",
|
|
};
|
|
|
|
// https://w3c.github.io/gamepad/#dom-gamepad
|
|
[Exposed=Window]
|
|
interface Gamepad {
|
|
readonly attribute Utf16DOMString id;
|
|
readonly attribute long index;
|
|
readonly attribute boolean connected;
|
|
readonly attribute DOMHighResTimeStamp timestamp;
|
|
readonly attribute GamepadMappingType mapping;
|
|
readonly attribute FrozenArray<double> axes;
|
|
readonly attribute FrozenArray<GamepadButton> buttons;
|
|
[FIXME] readonly attribute FrozenArray<GamepadTouch> touches;
|
|
[SameObject] readonly attribute GamepadHapticActuator vibrationActuator;
|
|
};
|
|
|
|
// https://w3c.github.io/gamepad/#idl-def-navigator-partial-1
|
|
[Exposed=Window]
|
|
partial interface Navigator {
|
|
sequence<Gamepad?> getGamepads();
|
|
};
|