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