maxcountryman_web_sys/features/
gen_GamepadServiceTest.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GamepadServiceTest , typescript_type = "GamepadServiceTest")]
7    #[derive(Debug, Clone, PartialEq, Eq)]
8    #[doc = "The `GamepadServiceTest` class."]
9    #[doc = ""]
10    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadServiceTest)"]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `GamepadServiceTest`*"]
13    pub type GamepadServiceTest;
14    #[cfg(feature = "GamepadMappingType")]
15    # [wasm_bindgen (structural , method , getter , js_class = "GamepadServiceTest" , js_name = noMapping)]
16    #[doc = "Getter for the `noMapping` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadServiceTest/noMapping)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `GamepadMappingType`, `GamepadServiceTest`*"]
21    pub fn no_mapping(this: &GamepadServiceTest) -> GamepadMappingType;
22    #[cfg(feature = "GamepadMappingType")]
23    # [wasm_bindgen (structural , method , getter , js_class = "GamepadServiceTest" , js_name = standardMapping)]
24    #[doc = "Getter for the `standardMapping` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadServiceTest/standardMapping)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `GamepadMappingType`, `GamepadServiceTest`*"]
29    pub fn standard_mapping(this: &GamepadServiceTest) -> GamepadMappingType;
30    #[cfg(feature = "GamepadHand")]
31    # [wasm_bindgen (structural , method , getter , js_class = "GamepadServiceTest" , js_name = noHand)]
32    #[doc = "Getter for the `noHand` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadServiceTest/noHand)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `GamepadHand`, `GamepadServiceTest`*"]
37    pub fn no_hand(this: &GamepadServiceTest) -> GamepadHand;
38    #[cfg(feature = "GamepadHand")]
39    # [wasm_bindgen (structural , method , getter , js_class = "GamepadServiceTest" , js_name = leftHand)]
40    #[doc = "Getter for the `leftHand` field of this object."]
41    #[doc = ""]
42    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadServiceTest/leftHand)"]
43    #[doc = ""]
44    #[doc = "*This API requires the following crate features to be activated: `GamepadHand`, `GamepadServiceTest`*"]
45    pub fn left_hand(this: &GamepadServiceTest) -> GamepadHand;
46    #[cfg(feature = "GamepadHand")]
47    # [wasm_bindgen (structural , method , getter , js_class = "GamepadServiceTest" , js_name = rightHand)]
48    #[doc = "Getter for the `rightHand` field of this object."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadServiceTest/rightHand)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `GamepadHand`, `GamepadServiceTest`*"]
53    pub fn right_hand(this: &GamepadServiceTest) -> GamepadHand;
54    #[cfg(all(feature = "GamepadHand", feature = "GamepadMappingType",))]
55    # [wasm_bindgen (catch , method , structural , js_class = "GamepadServiceTest" , js_name = addGamepad)]
56    #[doc = "The `addGamepad()` method."]
57    #[doc = ""]
58    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadServiceTest/addGamepad)"]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `GamepadHand`, `GamepadMappingType`, `GamepadServiceTest`*"]
61    pub fn add_gamepad(
62        this: &GamepadServiceTest,
63        id: &str,
64        mapping: GamepadMappingType,
65        hand: GamepadHand,
66        num_buttons: u32,
67        num_axes: u32,
68        num_haptics: u32,
69    ) -> Result<::js_sys::Promise, JsValue>;
70    # [wasm_bindgen (method , structural , js_class = "GamepadServiceTest" , js_name = newAxisMoveEvent)]
71    #[doc = "The `newAxisMoveEvent()` method."]
72    #[doc = ""]
73    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadServiceTest/newAxisMoveEvent)"]
74    #[doc = ""]
75    #[doc = "*This API requires the following crate features to be activated: `GamepadServiceTest`*"]
76    pub fn new_axis_move_event(this: &GamepadServiceTest, index: u32, axis: u32, value: f64);
77    # [wasm_bindgen (method , structural , js_class = "GamepadServiceTest" , js_name = newButtonEvent)]
78    #[doc = "The `newButtonEvent()` method."]
79    #[doc = ""]
80    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadServiceTest/newButtonEvent)"]
81    #[doc = ""]
82    #[doc = "*This API requires the following crate features to be activated: `GamepadServiceTest`*"]
83    pub fn new_button_event(
84        this: &GamepadServiceTest,
85        index: u32,
86        button: u32,
87        pressed: bool,
88        touched: bool,
89    );
90    # [wasm_bindgen (method , structural , js_class = "GamepadServiceTest" , js_name = newButtonValueEvent)]
91    #[doc = "The `newButtonValueEvent()` method."]
92    #[doc = ""]
93    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadServiceTest/newButtonValueEvent)"]
94    #[doc = ""]
95    #[doc = "*This API requires the following crate features to be activated: `GamepadServiceTest`*"]
96    pub fn new_button_value_event(
97        this: &GamepadServiceTest,
98        index: u32,
99        button: u32,
100        pressed: bool,
101        touched: bool,
102        value: f64,
103    );
104    # [wasm_bindgen (method , structural , js_class = "GamepadServiceTest" , js_name = newPoseMove)]
105    #[doc = "The `newPoseMove()` method."]
106    #[doc = ""]
107    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadServiceTest/newPoseMove)"]
108    #[doc = ""]
109    #[doc = "*This API requires the following crate features to be activated: `GamepadServiceTest`*"]
110    pub fn new_pose_move(
111        this: &GamepadServiceTest,
112        index: u32,
113        orient: Option<&mut [f32]>,
114        pos: Option<&mut [f32]>,
115        ang_velocity: Option<&mut [f32]>,
116        ang_acceleration: Option<&mut [f32]>,
117        lin_velocity: Option<&mut [f32]>,
118        lin_acceleration: Option<&mut [f32]>,
119    );
120    # [wasm_bindgen (method , structural , js_class = "GamepadServiceTest" , js_name = removeGamepad)]
121    #[doc = "The `removeGamepad()` method."]
122    #[doc = ""]
123    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadServiceTest/removeGamepad)"]
124    #[doc = ""]
125    #[doc = "*This API requires the following crate features to be activated: `GamepadServiceTest`*"]
126    pub fn remove_gamepad(this: &GamepadServiceTest, index: u32);
127}