web_sys/features/
gen_Touch.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 = "Touch",
10 typescript_type = "Touch"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `Touch` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `Touch`*"]
18 pub type Touch;
19 #[wasm_bindgen(method, getter, js_class = "Touch", js_name = "identifier")]
20 #[doc = "Getter for the `identifier` field of this object."]
21 #[doc = ""]
22 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/identifier)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `Touch`*"]
25 pub fn identifier(this: &Touch) -> i32;
26 #[cfg(feature = "EventTarget")]
27 #[wasm_bindgen(method, getter, js_class = "Touch", js_name = "target")]
28 #[doc = "Getter for the `target` field of this object."]
29 #[doc = ""]
30 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/target)"]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `Touch`*"]
33 pub fn target(this: &Touch) -> Option<EventTarget>;
34 #[wasm_bindgen(method, getter, js_class = "Touch", js_name = "screenX")]
35 #[doc = "Getter for the `screenX` field of this object."]
36 #[doc = ""]
37 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/screenX)"]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `Touch`*"]
40 pub fn screen_x(this: &Touch) -> i32;
41 #[wasm_bindgen(method, getter, js_class = "Touch", js_name = "screenY")]
42 #[doc = "Getter for the `screenY` field of this object."]
43 #[doc = ""]
44 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/screenY)"]
45 #[doc = ""]
46 #[doc = "*This API requires the following crate features to be activated: `Touch`*"]
47 pub fn screen_y(this: &Touch) -> i32;
48 #[wasm_bindgen(method, getter, js_class = "Touch", js_name = "clientX")]
49 #[doc = "Getter for the `clientX` field of this object."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/clientX)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `Touch`*"]
54 pub fn client_x(this: &Touch) -> i32;
55 #[wasm_bindgen(method, getter, js_class = "Touch", js_name = "clientY")]
56 #[doc = "Getter for the `clientY` field of this object."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/clientY)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `Touch`*"]
61 pub fn client_y(this: &Touch) -> i32;
62 #[wasm_bindgen(method, getter, js_class = "Touch", js_name = "pageX")]
63 #[doc = "Getter for the `pageX` field of this object."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/pageX)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `Touch`*"]
68 pub fn page_x(this: &Touch) -> i32;
69 #[wasm_bindgen(method, getter, js_class = "Touch", js_name = "pageY")]
70 #[doc = "Getter for the `pageY` field of this object."]
71 #[doc = ""]
72 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/pageY)"]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `Touch`*"]
75 pub fn page_y(this: &Touch) -> i32;
76 #[wasm_bindgen(method, getter, js_class = "Touch", js_name = "radiusX")]
77 #[doc = "Getter for the `radiusX` field of this object."]
78 #[doc = ""]
79 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/radiusX)"]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `Touch`*"]
82 pub fn radius_x(this: &Touch) -> i32;
83 #[wasm_bindgen(method, getter, js_class = "Touch", js_name = "radiusY")]
84 #[doc = "Getter for the `radiusY` field of this object."]
85 #[doc = ""]
86 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/radiusY)"]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `Touch`*"]
89 pub fn radius_y(this: &Touch) -> i32;
90 #[wasm_bindgen(method, getter, js_class = "Touch", js_name = "rotationAngle")]
91 #[doc = "Getter for the `rotationAngle` field of this object."]
92 #[doc = ""]
93 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle)"]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `Touch`*"]
96 pub fn rotation_angle(this: &Touch) -> f32;
97 #[wasm_bindgen(method, getter, js_class = "Touch", js_name = "force")]
98 #[doc = "Getter for the `force` field of this object."]
99 #[doc = ""]
100 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/force)"]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `Touch`*"]
103 pub fn force(this: &Touch) -> f32;
104 #[cfg(feature = "TouchInit")]
105 #[wasm_bindgen(catch, constructor, js_class = "Touch")]
106 #[doc = "The `new Touch(..)` constructor, creating a new instance of `Touch`."]
107 #[doc = ""]
108 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Touch/Touch)"]
109 #[doc = ""]
110 #[doc = "*This API requires the following crate features to be activated: `Touch`, `TouchInit`*"]
111 pub fn new(touch_init_dict: &TouchInit) -> Result<Touch, JsValue>;
112}