1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "MouseEvent",
9 extends = "UiEvent",
10 extends = "Event",
11 extends = "::js_sys::Object",
12 js_name = "MouseScrollEvent",
13 typescript_type = "MouseScrollEvent"
14 )]
15 #[derive(Debug, Clone, PartialEq, Eq)]
16 #[doc = "The `MouseScrollEvent` class."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`*"]
21 pub type MouseScrollEvent;
22 #[wasm_bindgen(method, getter, js_class = "MouseScrollEvent", js_name = "axis")]
23 #[doc = "Getter for the `axis` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/axis)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`*"]
28 pub fn axis(this: &MouseScrollEvent) -> i32;
29 #[wasm_bindgen(
30 method,
31 js_class = "MouseScrollEvent",
32 js_name = "initMouseScrollEvent"
33 )]
34 #[doc = "The `initMouseScrollEvent()` method."]
35 #[doc = ""]
36 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`*"]
39 pub fn init_mouse_scroll_event(this: &MouseScrollEvent, type_: &str);
40 #[wasm_bindgen(
41 method,
42 js_class = "MouseScrollEvent",
43 js_name = "initMouseScrollEvent"
44 )]
45 #[doc = "The `initMouseScrollEvent()` method."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`*"]
50 pub fn init_mouse_scroll_event_with_can_bubble(
51 this: &MouseScrollEvent,
52 type_: &str,
53 can_bubble: bool,
54 );
55 #[wasm_bindgen(
56 method,
57 js_class = "MouseScrollEvent",
58 js_name = "initMouseScrollEvent"
59 )]
60 #[doc = "The `initMouseScrollEvent()` method."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`*"]
65 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable(
66 this: &MouseScrollEvent,
67 type_: &str,
68 can_bubble: bool,
69 cancelable: bool,
70 );
71 #[cfg(feature = "Window")]
72 #[wasm_bindgen(
73 method,
74 js_class = "MouseScrollEvent",
75 js_name = "initMouseScrollEvent"
76 )]
77 #[doc = "The `initMouseScrollEvent()` method."]
78 #[doc = ""]
79 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`, `Window`*"]
82 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view(
83 this: &MouseScrollEvent,
84 type_: &str,
85 can_bubble: bool,
86 cancelable: bool,
87 view: Option<&Window>,
88 );
89 #[cfg(feature = "Window")]
90 #[wasm_bindgen(
91 method,
92 js_class = "MouseScrollEvent",
93 js_name = "initMouseScrollEvent"
94 )]
95 #[doc = "The `initMouseScrollEvent()` method."]
96 #[doc = ""]
97 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`, `Window`*"]
100 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view_and_detail(
101 this: &MouseScrollEvent,
102 type_: &str,
103 can_bubble: bool,
104 cancelable: bool,
105 view: Option<&Window>,
106 detail: i32,
107 );
108 #[cfg(feature = "Window")]
109 #[wasm_bindgen(
110 method,
111 js_class = "MouseScrollEvent",
112 js_name = "initMouseScrollEvent"
113 )]
114 #[doc = "The `initMouseScrollEvent()` method."]
115 #[doc = ""]
116 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
117 #[doc = ""]
118 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`, `Window`*"]
119 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view_and_detail_and_screen_x(
120 this: &MouseScrollEvent,
121 type_: &str,
122 can_bubble: bool,
123 cancelable: bool,
124 view: Option<&Window>,
125 detail: i32,
126 screen_x: i32,
127 );
128 #[cfg(feature = "Window")]
129 #[wasm_bindgen(
130 method,
131 js_class = "MouseScrollEvent",
132 js_name = "initMouseScrollEvent"
133 )]
134 #[doc = "The `initMouseScrollEvent()` method."]
135 #[doc = ""]
136 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`, `Window`*"]
139 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view_and_detail_and_screen_x_and_screen_y(
140 this: &MouseScrollEvent,
141 type_: &str,
142 can_bubble: bool,
143 cancelable: bool,
144 view: Option<&Window>,
145 detail: i32,
146 screen_x: i32,
147 screen_y: i32,
148 );
149 #[cfg(feature = "Window")]
150 #[wasm_bindgen(
151 method,
152 js_class = "MouseScrollEvent",
153 js_name = "initMouseScrollEvent"
154 )]
155 #[doc = "The `initMouseScrollEvent()` method."]
156 #[doc = ""]
157 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
158 #[doc = ""]
159 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`, `Window`*"]
160 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view_and_detail_and_screen_x_and_screen_y_and_client_x(
161 this: &MouseScrollEvent,
162 type_: &str,
163 can_bubble: bool,
164 cancelable: bool,
165 view: Option<&Window>,
166 detail: i32,
167 screen_x: i32,
168 screen_y: i32,
169 client_x: i32,
170 );
171 #[cfg(feature = "Window")]
172 #[wasm_bindgen(
173 method,
174 js_class = "MouseScrollEvent",
175 js_name = "initMouseScrollEvent"
176 )]
177 #[doc = "The `initMouseScrollEvent()` method."]
178 #[doc = ""]
179 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
180 #[doc = ""]
181 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`, `Window`*"]
182 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view_and_detail_and_screen_x_and_screen_y_and_client_x_and_client_y(
183 this: &MouseScrollEvent,
184 type_: &str,
185 can_bubble: bool,
186 cancelable: bool,
187 view: Option<&Window>,
188 detail: i32,
189 screen_x: i32,
190 screen_y: i32,
191 client_x: i32,
192 client_y: i32,
193 );
194 #[cfg(feature = "Window")]
195 #[wasm_bindgen(
196 method,
197 js_class = "MouseScrollEvent",
198 js_name = "initMouseScrollEvent"
199 )]
200 #[doc = "The `initMouseScrollEvent()` method."]
201 #[doc = ""]
202 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
203 #[doc = ""]
204 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`, `Window`*"]
205 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view_and_detail_and_screen_x_and_screen_y_and_client_x_and_client_y_and_ctrl_key(
206 this: &MouseScrollEvent,
207 type_: &str,
208 can_bubble: bool,
209 cancelable: bool,
210 view: Option<&Window>,
211 detail: i32,
212 screen_x: i32,
213 screen_y: i32,
214 client_x: i32,
215 client_y: i32,
216 ctrl_key: bool,
217 );
218 #[cfg(feature = "Window")]
219 #[wasm_bindgen(
220 method,
221 js_class = "MouseScrollEvent",
222 js_name = "initMouseScrollEvent"
223 )]
224 #[doc = "The `initMouseScrollEvent()` method."]
225 #[doc = ""]
226 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
227 #[doc = ""]
228 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`, `Window`*"]
229 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view_and_detail_and_screen_x_and_screen_y_and_client_x_and_client_y_and_ctrl_key_and_alt_key(
230 this: &MouseScrollEvent,
231 type_: &str,
232 can_bubble: bool,
233 cancelable: bool,
234 view: Option<&Window>,
235 detail: i32,
236 screen_x: i32,
237 screen_y: i32,
238 client_x: i32,
239 client_y: i32,
240 ctrl_key: bool,
241 alt_key: bool,
242 );
243 #[cfg(feature = "Window")]
244 #[wasm_bindgen(
245 method,
246 js_class = "MouseScrollEvent",
247 js_name = "initMouseScrollEvent"
248 )]
249 #[doc = "The `initMouseScrollEvent()` method."]
250 #[doc = ""]
251 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
252 #[doc = ""]
253 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`, `Window`*"]
254 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view_and_detail_and_screen_x_and_screen_y_and_client_x_and_client_y_and_ctrl_key_and_alt_key_and_shift_key(
255 this: &MouseScrollEvent,
256 type_: &str,
257 can_bubble: bool,
258 cancelable: bool,
259 view: Option<&Window>,
260 detail: i32,
261 screen_x: i32,
262 screen_y: i32,
263 client_x: i32,
264 client_y: i32,
265 ctrl_key: bool,
266 alt_key: bool,
267 shift_key: bool,
268 );
269 #[cfg(feature = "Window")]
270 #[wasm_bindgen(
271 method,
272 js_class = "MouseScrollEvent",
273 js_name = "initMouseScrollEvent"
274 )]
275 #[doc = "The `initMouseScrollEvent()` method."]
276 #[doc = ""]
277 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
278 #[doc = ""]
279 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`, `Window`*"]
280 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view_and_detail_and_screen_x_and_screen_y_and_client_x_and_client_y_and_ctrl_key_and_alt_key_and_shift_key_and_meta_key(
281 this: &MouseScrollEvent,
282 type_: &str,
283 can_bubble: bool,
284 cancelable: bool,
285 view: Option<&Window>,
286 detail: i32,
287 screen_x: i32,
288 screen_y: i32,
289 client_x: i32,
290 client_y: i32,
291 ctrl_key: bool,
292 alt_key: bool,
293 shift_key: bool,
294 meta_key: bool,
295 );
296 #[cfg(feature = "Window")]
297 #[wasm_bindgen(
298 method,
299 js_class = "MouseScrollEvent",
300 js_name = "initMouseScrollEvent"
301 )]
302 #[doc = "The `initMouseScrollEvent()` method."]
303 #[doc = ""]
304 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
305 #[doc = ""]
306 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`, `Window`*"]
307 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view_and_detail_and_screen_x_and_screen_y_and_client_x_and_client_y_and_ctrl_key_and_alt_key_and_shift_key_and_meta_key_and_button(
308 this: &MouseScrollEvent,
309 type_: &str,
310 can_bubble: bool,
311 cancelable: bool,
312 view: Option<&Window>,
313 detail: i32,
314 screen_x: i32,
315 screen_y: i32,
316 client_x: i32,
317 client_y: i32,
318 ctrl_key: bool,
319 alt_key: bool,
320 shift_key: bool,
321 meta_key: bool,
322 button: i16,
323 );
324 #[cfg(all(feature = "EventTarget", feature = "Window",))]
325 #[wasm_bindgen(
326 method,
327 js_class = "MouseScrollEvent",
328 js_name = "initMouseScrollEvent"
329 )]
330 #[doc = "The `initMouseScrollEvent()` method."]
331 #[doc = ""]
332 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
333 #[doc = ""]
334 #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `MouseScrollEvent`, `Window`*"]
335 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view_and_detail_and_screen_x_and_screen_y_and_client_x_and_client_y_and_ctrl_key_and_alt_key_and_shift_key_and_meta_key_and_button_and_related_target(
336 this: &MouseScrollEvent,
337 type_: &str,
338 can_bubble: bool,
339 cancelable: bool,
340 view: Option<&Window>,
341 detail: i32,
342 screen_x: i32,
343 screen_y: i32,
344 client_x: i32,
345 client_y: i32,
346 ctrl_key: bool,
347 alt_key: bool,
348 shift_key: bool,
349 meta_key: bool,
350 button: i16,
351 related_target: Option<&EventTarget>,
352 );
353 #[cfg(all(feature = "EventTarget", feature = "Window",))]
354 #[wasm_bindgen(
355 method,
356 js_class = "MouseScrollEvent",
357 js_name = "initMouseScrollEvent"
358 )]
359 #[doc = "The `initMouseScrollEvent()` method."]
360 #[doc = ""]
361 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MouseScrollEvent/initMouseScrollEvent)"]
362 #[doc = ""]
363 #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `MouseScrollEvent`, `Window`*"]
364 pub fn init_mouse_scroll_event_with_can_bubble_and_cancelable_and_view_and_detail_and_screen_x_and_screen_y_and_client_x_and_client_y_and_ctrl_key_and_alt_key_and_shift_key_and_meta_key_and_button_and_related_target_and_axis(
365 this: &MouseScrollEvent,
366 type_: &str,
367 can_bubble: bool,
368 cancelable: bool,
369 view: Option<&Window>,
370 detail: i32,
371 screen_x: i32,
372 screen_y: i32,
373 client_x: i32,
374 client_y: i32,
375 ctrl_key: bool,
376 alt_key: bool,
377 shift_key: bool,
378 meta_key: bool,
379 button: i16,
380 related_target: Option<&EventTarget>,
381 axis: i32,
382 );
383}
384impl MouseScrollEvent {
385 #[doc = "The `MouseScrollEvent.HORIZONTAL_AXIS` const."]
386 #[doc = ""]
387 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`*"]
388 pub const HORIZONTAL_AXIS: i32 = 1u64 as i32;
389 #[doc = "The `MouseScrollEvent.VERTICAL_AXIS` const."]
390 #[doc = ""]
391 #[doc = "*This API requires the following crate features to be activated: `MouseScrollEvent`*"]
392 pub const VERTICAL_AXIS: i32 = 2u64 as i32;
393}