1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[wasm_bindgen] 5 extern "C" { 6 # [wasm_bindgen (extends = GamepadEvent , extends = Event , extends = :: js_sys :: Object , js_name = GamepadButtonEvent , typescript_type = "GamepadButtonEvent")] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `GamepadButtonEvent` class."] 9 #[doc = ""] 10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadButtonEvent)"] 11 #[doc = ""] 12 #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEvent`*"] 13 pub type GamepadButtonEvent; 14 # [wasm_bindgen (structural , method , getter , js_class = "GamepadButtonEvent" , js_name = button)] 15 #[doc = "Getter for the `button` field of this object."] 16 #[doc = ""] 17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadButtonEvent/button)"] 18 #[doc = ""] 19 #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEvent`*"] button(this: &GamepadButtonEvent) -> u3220 pub fn button(this: &GamepadButtonEvent) -> u32; 21 #[wasm_bindgen(catch, constructor, js_class = "GamepadButtonEvent")] 22 #[doc = "The `new GamepadButtonEvent(..)` constructor, creating a new instance of `GamepadButtonEvent`."] 23 #[doc = ""] 24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadButtonEvent/GamepadButtonEvent)"] 25 #[doc = ""] 26 #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEvent`*"] new(type_: &str) -> Result<GamepadButtonEvent, JsValue>27 pub fn new(type_: &str) -> Result<GamepadButtonEvent, JsValue>; 28 #[cfg(feature = "GamepadButtonEventInit")] 29 #[wasm_bindgen(catch, constructor, js_class = "GamepadButtonEvent")] 30 #[doc = "The `new GamepadButtonEvent(..)` constructor, creating a new instance of `GamepadButtonEvent`."] 31 #[doc = ""] 32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadButtonEvent/GamepadButtonEvent)"] 33 #[doc = ""] 34 #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEvent`, `GamepadButtonEventInit`*"] new_with_event_init_dict( type_: &str, event_init_dict: &GamepadButtonEventInit, ) -> Result<GamepadButtonEvent, JsValue>35 pub fn new_with_event_init_dict( 36 type_: &str, 37 event_init_dict: &GamepadButtonEventInit, 38 ) -> Result<GamepadButtonEvent, JsValue>; 39 } 40