1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = UiEvent , extends = Event , extends = :: js_sys :: Object , js_name = TouchEvent , typescript_type = "TouchEvent")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `TouchEvent` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`*"]
14 pub type TouchEvent;
15 #[cfg(feature = "TouchList")]
16 # [wasm_bindgen (structural , method , getter , js_class = "TouchEvent" , js_name = touches)]
17 #[doc = "Getter for the `touches` field of this object."]
18 #[doc = ""]
19 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/touches)"]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `TouchList`*"]
22 pub fn touches(this: &TouchEvent) -> TouchList;
23 #[cfg(feature = "TouchList")]
24 # [wasm_bindgen (structural , method , getter , js_class = "TouchEvent" , js_name = targetTouches)]
25 #[doc = "Getter for the `targetTouches` field of this object."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/targetTouches)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `TouchList`*"]
30 pub fn target_touches(this: &TouchEvent) -> TouchList;
31 #[cfg(feature = "TouchList")]
32 # [wasm_bindgen (structural , method , getter , js_class = "TouchEvent" , js_name = changedTouches)]
33 #[doc = "Getter for the `changedTouches` field of this object."]
34 #[doc = ""]
35 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/changedTouches)"]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `TouchList`*"]
38 pub fn changed_touches(this: &TouchEvent) -> TouchList;
39 # [wasm_bindgen (structural , method , getter , js_class = "TouchEvent" , js_name = altKey)]
40 #[doc = "Getter for the `altKey` field of this object."]
41 #[doc = ""]
42 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/altKey)"]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`*"]
45 pub fn alt_key(this: &TouchEvent) -> bool;
46 # [wasm_bindgen (structural , method , getter , js_class = "TouchEvent" , js_name = metaKey)]
47 #[doc = "Getter for the `metaKey` field of this object."]
48 #[doc = ""]
49 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/metaKey)"]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`*"]
52 pub fn meta_key(this: &TouchEvent) -> bool;
53 # [wasm_bindgen (structural , method , getter , js_class = "TouchEvent" , js_name = ctrlKey)]
54 #[doc = "Getter for the `ctrlKey` field of this object."]
55 #[doc = ""]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/ctrlKey)"]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`*"]
59 pub fn ctrl_key(this: &TouchEvent) -> bool;
60 # [wasm_bindgen (structural , method , getter , js_class = "TouchEvent" , js_name = shiftKey)]
61 #[doc = "Getter for the `shiftKey` field of this object."]
62 #[doc = ""]
63 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/shiftKey)"]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`*"]
66 pub fn shift_key(this: &TouchEvent) -> bool;
67 #[wasm_bindgen(catch, constructor, js_class = "TouchEvent")]
68 #[doc = "The `new TouchEvent(..)` constructor, creating a new instance of `TouchEvent`."]
69 #[doc = ""]
70 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)"]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`*"]
73 pub fn new(type_: &str) -> Result<TouchEvent, JsValue>;
74 #[cfg(feature = "TouchEventInit")]
75 #[wasm_bindgen(catch, constructor, js_class = "TouchEvent")]
76 #[doc = "The `new TouchEvent(..)` constructor, creating a new instance of `TouchEvent`."]
77 #[doc = ""]
78 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)"]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `TouchEventInit`*"]
81 pub fn new_with_event_init_dict(
82 type_: &str,
83 event_init_dict: &TouchEventInit,
84 ) -> Result<TouchEvent, JsValue>;
85 # [wasm_bindgen (method , structural , js_class = "TouchEvent" , js_name = initTouchEvent)]
86 #[doc = "The `initTouchEvent()` method."]
87 #[doc = ""]
88 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/initTouchEvent)"]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`*"]
91 pub fn init_touch_event(this: &TouchEvent, type_: &str);
92 # [wasm_bindgen (method , structural , js_class = "TouchEvent" , js_name = initTouchEvent)]
93 #[doc = "The `initTouchEvent()` method."]
94 #[doc = ""]
95 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/initTouchEvent)"]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`*"]
98 pub fn init_touch_event_with_can_bubble(this: &TouchEvent, type_: &str, can_bubble: bool);
99 # [wasm_bindgen (method , structural , js_class = "TouchEvent" , js_name = initTouchEvent)]
100 #[doc = "The `initTouchEvent()` method."]
101 #[doc = ""]
102 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/initTouchEvent)"]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`*"]
105 pub fn init_touch_event_with_can_bubble_and_cancelable(
106 this: &TouchEvent,
107 type_: &str,
108 can_bubble: bool,
109 cancelable: bool,
110 );
111 #[cfg(feature = "Window")]
112 # [wasm_bindgen (method , structural , js_class = "TouchEvent" , js_name = initTouchEvent)]
113 #[doc = "The `initTouchEvent()` method."]
114 #[doc = ""]
115 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/initTouchEvent)"]
116 #[doc = ""]
117 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `Window`*"]
118 pub fn init_touch_event_with_can_bubble_and_cancelable_and_view(
119 this: &TouchEvent,
120 type_: &str,
121 can_bubble: bool,
122 cancelable: bool,
123 view: Option<&Window>,
124 );
125 #[cfg(feature = "Window")]
126 # [wasm_bindgen (method , structural , js_class = "TouchEvent" , js_name = initTouchEvent)]
127 #[doc = "The `initTouchEvent()` method."]
128 #[doc = ""]
129 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/initTouchEvent)"]
130 #[doc = ""]
131 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `Window`*"]
132 pub fn init_touch_event_with_can_bubble_and_cancelable_and_view_and_detail(
133 this: &TouchEvent,
134 type_: &str,
135 can_bubble: bool,
136 cancelable: bool,
137 view: Option<&Window>,
138 detail: i32,
139 );
140 #[cfg(feature = "Window")]
141 # [wasm_bindgen (method , structural , js_class = "TouchEvent" , js_name = initTouchEvent)]
142 #[doc = "The `initTouchEvent()` method."]
143 #[doc = ""]
144 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/initTouchEvent)"]
145 #[doc = ""]
146 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `Window`*"]
147 pub fn init_touch_event_with_can_bubble_and_cancelable_and_view_and_detail_and_ctrl_key(
148 this: &TouchEvent,
149 type_: &str,
150 can_bubble: bool,
151 cancelable: bool,
152 view: Option<&Window>,
153 detail: i32,
154 ctrl_key: bool,
155 );
156 #[cfg(feature = "Window")]
157 # [wasm_bindgen (method , structural , js_class = "TouchEvent" , js_name = initTouchEvent)]
158 #[doc = "The `initTouchEvent()` method."]
159 #[doc = ""]
160 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/initTouchEvent)"]
161 #[doc = ""]
162 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `Window`*"]
163 pub fn init_touch_event_with_can_bubble_and_cancelable_and_view_and_detail_and_ctrl_key_and_alt_key(
164 this: &TouchEvent,
165 type_: &str,
166 can_bubble: bool,
167 cancelable: bool,
168 view: Option<&Window>,
169 detail: i32,
170 ctrl_key: bool,
171 alt_key: bool,
172 );
173 #[cfg(feature = "Window")]
174 # [wasm_bindgen (method , structural , js_class = "TouchEvent" , js_name = initTouchEvent)]
175 #[doc = "The `initTouchEvent()` method."]
176 #[doc = ""]
177 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/initTouchEvent)"]
178 #[doc = ""]
179 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `Window`*"]
180 pub fn init_touch_event_with_can_bubble_and_cancelable_and_view_and_detail_and_ctrl_key_and_alt_key_and_shift_key(
181 this: &TouchEvent,
182 type_: &str,
183 can_bubble: bool,
184 cancelable: bool,
185 view: Option<&Window>,
186 detail: i32,
187 ctrl_key: bool,
188 alt_key: bool,
189 shift_key: bool,
190 );
191 #[cfg(feature = "Window")]
192 # [wasm_bindgen (method , structural , js_class = "TouchEvent" , js_name = initTouchEvent)]
193 #[doc = "The `initTouchEvent()` method."]
194 #[doc = ""]
195 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/initTouchEvent)"]
196 #[doc = ""]
197 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `Window`*"]
198 pub fn init_touch_event_with_can_bubble_and_cancelable_and_view_and_detail_and_ctrl_key_and_alt_key_and_shift_key_and_meta_key(
199 this: &TouchEvent,
200 type_: &str,
201 can_bubble: bool,
202 cancelable: bool,
203 view: Option<&Window>,
204 detail: i32,
205 ctrl_key: bool,
206 alt_key: bool,
207 shift_key: bool,
208 meta_key: bool,
209 );
210 #[cfg(all(feature = "TouchList", feature = "Window",))]
211 # [wasm_bindgen (method , structural , js_class = "TouchEvent" , js_name = initTouchEvent)]
212 #[doc = "The `initTouchEvent()` method."]
213 #[doc = ""]
214 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/initTouchEvent)"]
215 #[doc = ""]
216 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `TouchList`, `Window`*"]
217 pub fn init_touch_event_with_can_bubble_and_cancelable_and_view_and_detail_and_ctrl_key_and_alt_key_and_shift_key_and_meta_key_and_touches(
218 this: &TouchEvent,
219 type_: &str,
220 can_bubble: bool,
221 cancelable: bool,
222 view: Option<&Window>,
223 detail: i32,
224 ctrl_key: bool,
225 alt_key: bool,
226 shift_key: bool,
227 meta_key: bool,
228 touches: Option<&TouchList>,
229 );
230 #[cfg(all(feature = "TouchList", feature = "Window",))]
231 # [wasm_bindgen (method , structural , js_class = "TouchEvent" , js_name = initTouchEvent)]
232 #[doc = "The `initTouchEvent()` method."]
233 #[doc = ""]
234 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/initTouchEvent)"]
235 #[doc = ""]
236 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `TouchList`, `Window`*"]
237 pub fn init_touch_event_with_can_bubble_and_cancelable_and_view_and_detail_and_ctrl_key_and_alt_key_and_shift_key_and_meta_key_and_touches_and_target_touches(
238 this: &TouchEvent,
239 type_: &str,
240 can_bubble: bool,
241 cancelable: bool,
242 view: Option<&Window>,
243 detail: i32,
244 ctrl_key: bool,
245 alt_key: bool,
246 shift_key: bool,
247 meta_key: bool,
248 touches: Option<&TouchList>,
249 target_touches: Option<&TouchList>,
250 );
251 #[cfg(all(feature = "TouchList", feature = "Window",))]
252 # [wasm_bindgen (method , structural , js_class = "TouchEvent" , js_name = initTouchEvent)]
253 #[doc = "The `initTouchEvent()` method."]
254 #[doc = ""]
255 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/initTouchEvent)"]
256 #[doc = ""]
257 #[doc = "*This API requires the following crate features to be activated: `TouchEvent`, `TouchList`, `Window`*"]
258 pub fn init_touch_event_with_can_bubble_and_cancelable_and_view_and_detail_and_ctrl_key_and_alt_key_and_shift_key_and_meta_key_and_touches_and_target_touches_and_changed_touches(
259 this: &TouchEvent,
260 type_: &str,
261 can_bubble: bool,
262 cancelable: bool,
263 view: Option<&Window>,
264 detail: i32,
265 ctrl_key: bool,
266 alt_key: bool,
267 shift_key: bool,
268 meta_key: bool,
269 touches: Option<&TouchList>,
270 target_touches: Option<&TouchList>,
271 changed_touches: Option<&TouchList>,
272 );
273}