@@ -26,6 +26,20 @@ extern "C" {
26
26
#[ doc = "" ]
27
27
#[ doc = "*This API requires the following crate features to be activated: `Gamepad`*" ]
28
28
pub fn index ( this : & Gamepad ) -> u32 ;
29
+ # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = connected) ]
30
+ #[ doc = "Getter for the `connected` field of this object." ]
31
+ #[ doc = "" ]
32
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/connected)" ]
33
+ #[ doc = "" ]
34
+ #[ doc = "*This API requires the following crate features to be activated: `Gamepad`*" ]
35
+ pub fn connected ( this : & Gamepad ) -> bool ;
36
+ # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = timestamp) ]
37
+ #[ doc = "Getter for the `timestamp` field of this object." ]
38
+ #[ doc = "" ]
39
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/timestamp)" ]
40
+ #[ doc = "" ]
41
+ #[ doc = "*This API requires the following crate features to be activated: `Gamepad`*" ]
42
+ pub fn timestamp ( this : & Gamepad ) -> f64 ;
29
43
#[ cfg( feature = "GamepadMappingType" ) ]
30
44
# [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = mapping) ]
31
45
#[ doc = "Getter for the `mapping` field of this object." ]
@@ -34,49 +48,43 @@ extern "C" {
34
48
#[ doc = "" ]
35
49
#[ doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadMappingType`*" ]
36
50
pub fn mapping ( this : & Gamepad ) -> GamepadMappingType ;
37
- #[ cfg( feature = "GamepadHand" ) ]
38
- # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = hand) ]
39
- #[ doc = "Getter for the `hand` field of this object." ]
40
- #[ doc = "" ]
41
- #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/hand)" ]
42
- #[ doc = "" ]
43
- #[ doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadHand`*" ]
44
- pub fn hand ( this : & Gamepad ) -> GamepadHand ;
45
- # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = displayId) ]
46
- #[ doc = "Getter for the `displayId` field of this object." ]
47
- #[ doc = "" ]
48
- #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/displayId)" ]
49
- #[ doc = "" ]
50
- #[ doc = "*This API requires the following crate features to be activated: `Gamepad`*" ]
51
- pub fn display_id ( this : & Gamepad ) -> u32 ;
52
- # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = connected) ]
53
- #[ doc = "Getter for the `connected` field of this object." ]
51
+ # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = axes) ]
52
+ #[ doc = "Getter for the `axes` field of this object." ]
54
53
#[ doc = "" ]
55
- #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/connected )" ]
54
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/axes )" ]
56
55
#[ doc = "" ]
57
56
#[ doc = "*This API requires the following crate features to be activated: `Gamepad`*" ]
58
- pub fn connected ( this : & Gamepad ) -> bool ;
57
+ pub fn axes ( this : & Gamepad ) -> :: js_sys :: Array ;
59
58
# [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = buttons) ]
60
59
#[ doc = "Getter for the `buttons` field of this object." ]
61
60
#[ doc = "" ]
62
61
#[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/buttons)" ]
63
62
#[ doc = "" ]
64
63
#[ doc = "*This API requires the following crate features to be activated: `Gamepad`*" ]
65
64
pub fn buttons ( this : & Gamepad ) -> :: js_sys:: Array ;
66
- # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = axes ) ]
67
- #[ doc = "Getter for the `axes ` field of this object." ]
65
+ # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = displayId ) ]
66
+ #[ doc = "Getter for the `displayId ` field of this object." ]
68
67
#[ doc = "" ]
69
- #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/axes )" ]
68
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/displayId )" ]
70
69
#[ doc = "" ]
71
70
#[ doc = "*This API requires the following crate features to be activated: `Gamepad`*" ]
72
- pub fn axes ( this : & Gamepad ) -> :: js_sys:: Array ;
73
- # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = timestamp) ]
74
- #[ doc = "Getter for the `timestamp` field of this object." ]
71
+ #[ deprecated]
72
+ pub fn display_id ( this : & Gamepad ) -> u32 ;
73
+ #[ cfg( feature = "GamepadHand" ) ]
74
+ # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = hand) ]
75
+ #[ doc = "Getter for the `hand` field of this object." ]
75
76
#[ doc = "" ]
76
- #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/timestamp)" ]
77
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/hand)" ]
78
+ #[ doc = "" ]
79
+ #[ doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadHand`*" ]
80
+ pub fn hand ( this : & Gamepad ) -> GamepadHand ;
81
+ # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = hapticActuators) ]
82
+ #[ doc = "Getter for the `hapticActuators` field of this object." ]
83
+ #[ doc = "" ]
84
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/hapticActuators)" ]
77
85
#[ doc = "" ]
78
86
#[ doc = "*This API requires the following crate features to be activated: `Gamepad`*" ]
79
- pub fn timestamp ( this : & Gamepad ) -> f64 ;
87
+ pub fn haptic_actuators ( this : & Gamepad ) -> :: js_sys :: Array ;
80
88
#[ cfg( feature = "GamepadPose" ) ]
81
89
# [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = pose) ]
82
90
#[ doc = "Getter for the `pose` field of this object." ]
@@ -85,11 +93,27 @@ extern "C" {
85
93
#[ doc = "" ]
86
94
#[ doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadPose`*" ]
87
95
pub fn pose ( this : & Gamepad ) -> Option < GamepadPose > ;
88
- # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = hapticActuators) ]
89
- #[ doc = "Getter for the `hapticActuators` field of this object." ]
96
+ #[ cfg( web_sys_unstable_apis) ]
97
+ #[ cfg( feature = "GamepadHapticActuator" ) ]
98
+ # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = vibrationActuator) ]
99
+ #[ doc = "Getter for the `vibrationActuator` field of this object." ]
90
100
#[ doc = "" ]
91
- #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/hapticActuators)" ]
101
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/vibrationActuator)" ]
102
+ #[ doc = "" ]
103
+ #[ doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadHapticActuator`*" ]
104
+ #[ doc = "" ]
105
+ #[ doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ]
106
+ #[ doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ]
107
+ pub fn vibration_actuator ( this : & Gamepad ) -> GamepadHapticActuator ;
108
+ #[ cfg( web_sys_unstable_apis) ]
109
+ # [ wasm_bindgen ( structural , method , getter , js_class = "Gamepad" , js_name = touchEvents) ]
110
+ #[ doc = "Getter for the `touchEvents` field of this object." ]
111
+ #[ doc = "" ]
112
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/touchEvents)" ]
92
113
#[ doc = "" ]
93
114
#[ doc = "*This API requires the following crate features to be activated: `Gamepad`*" ]
94
- pub fn haptic_actuators ( this : & Gamepad ) -> :: js_sys:: Array ;
115
+ #[ doc = "" ]
116
+ #[ doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ]
117
+ #[ doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ]
118
+ pub fn touch_events ( this : & Gamepad ) -> Option < :: js_sys:: Array > ;
95
119
}
0 commit comments