web_sys/features/
gen_GamepadButton.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "GamepadButton",
10 typescript_type = "GamepadButton"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `GamepadButton` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadButton)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `GamepadButton`*"]
18 pub type GamepadButton;
19 #[wasm_bindgen(method, getter, js_class = "GamepadButton", js_name = "pressed")]
20 #[doc = "Getter for the `pressed` field of this object."]
21 #[doc = ""]
22 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadButton/pressed)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `GamepadButton`*"]
25 pub fn pressed(this: &GamepadButton) -> bool;
26 #[wasm_bindgen(method, getter, js_class = "GamepadButton", js_name = "touched")]
27 #[doc = "Getter for the `touched` field of this object."]
28 #[doc = ""]
29 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadButton/touched)"]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `GamepadButton`*"]
32 pub fn touched(this: &GamepadButton) -> bool;
33 #[wasm_bindgen(method, getter, js_class = "GamepadButton", js_name = "value")]
34 #[doc = "Getter for the `value` field of this object."]
35 #[doc = ""]
36 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadButton/value)"]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `GamepadButton`*"]
39 pub fn value(this: &GamepadButton) -> f64;
40}