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 = "DragEvent",
13 typescript_type = "DragEvent"
14 )]
15 #[derive(Debug, Clone, PartialEq, Eq)]
16 #[doc = "The `DragEvent` class."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `DragEvent`*"]
21 pub type DragEvent;
22 #[cfg(feature = "DataTransfer")]
23 #[wasm_bindgen(method, getter, js_class = "DragEvent", js_name = "dataTransfer")]
24 #[doc = "Getter for the `dataTransfer` field of this object."]
25 #[doc = ""]
26 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/dataTransfer)"]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DragEvent`*"]
29 pub fn data_transfer(this: &DragEvent) -> Option<DataTransfer>;
30 #[wasm_bindgen(catch, constructor, js_class = "DragEvent")]
31 #[doc = "The `new DragEvent(..)` constructor, creating a new instance of `DragEvent`."]
32 #[doc = ""]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)"]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `DragEvent`*"]
36 pub fn new(type_: &str) -> Result<DragEvent, JsValue>;
37 #[cfg(feature = "DragEventInit")]
38 #[wasm_bindgen(catch, constructor, js_class = "DragEvent")]
39 #[doc = "The `new DragEvent(..)` constructor, creating a new instance of `DragEvent`."]
40 #[doc = ""]
41 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)"]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `DragEventInit`*"]
44 pub fn new_with_event_init_dict(
45 type_: &str,
46 event_init_dict: &DragEventInit,
47 ) -> Result<DragEvent, JsValue>;
48 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
49 #[doc = "The `initDragEvent()` method."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `DragEvent`*"]
54 pub fn init_drag_event(this: &DragEvent, type_: &str);
55 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
56 #[doc = "The `initDragEvent()` method."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `DragEvent`*"]
61 pub fn init_drag_event_with_can_bubble(this: &DragEvent, type_: &str, can_bubble: bool);
62 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
63 #[doc = "The `initDragEvent()` method."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `DragEvent`*"]
68 pub fn init_drag_event_with_can_bubble_and_cancelable(
69 this: &DragEvent,
70 type_: &str,
71 can_bubble: bool,
72 cancelable: bool,
73 );
74 #[cfg(feature = "Window")]
75 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
76 #[doc = "The `initDragEvent()` method."]
77 #[doc = ""]
78 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
81 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view(
82 this: &DragEvent,
83 type_: &str,
84 can_bubble: bool,
85 cancelable: bool,
86 a_view: Option<&Window>,
87 );
88 #[cfg(feature = "Window")]
89 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
90 #[doc = "The `initDragEvent()` method."]
91 #[doc = ""]
92 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
95 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail(
96 this: &DragEvent,
97 type_: &str,
98 can_bubble: bool,
99 cancelable: bool,
100 a_view: Option<&Window>,
101 a_detail: i32,
102 );
103 #[cfg(feature = "Window")]
104 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
105 #[doc = "The `initDragEvent()` method."]
106 #[doc = ""]
107 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
108 #[doc = ""]
109 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
110 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x(
111 this: &DragEvent,
112 type_: &str,
113 can_bubble: bool,
114 cancelable: bool,
115 a_view: Option<&Window>,
116 a_detail: i32,
117 a_screen_x: i32,
118 );
119 #[cfg(feature = "Window")]
120 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
121 #[doc = "The `initDragEvent()` method."]
122 #[doc = ""]
123 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
124 #[doc = ""]
125 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
126 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y(
127 this: &DragEvent,
128 type_: &str,
129 can_bubble: bool,
130 cancelable: bool,
131 a_view: Option<&Window>,
132 a_detail: i32,
133 a_screen_x: i32,
134 a_screen_y: i32,
135 );
136 #[cfg(feature = "Window")]
137 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
138 #[doc = "The `initDragEvent()` method."]
139 #[doc = ""]
140 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
141 #[doc = ""]
142 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
143 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x(
144 this: &DragEvent,
145 type_: &str,
146 can_bubble: bool,
147 cancelable: bool,
148 a_view: Option<&Window>,
149 a_detail: i32,
150 a_screen_x: i32,
151 a_screen_y: i32,
152 a_client_x: i32,
153 );
154 #[cfg(feature = "Window")]
155 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
156 #[doc = "The `initDragEvent()` method."]
157 #[doc = ""]
158 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
159 #[doc = ""]
160 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
161 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y(
162 this: &DragEvent,
163 type_: &str,
164 can_bubble: bool,
165 cancelable: bool,
166 a_view: Option<&Window>,
167 a_detail: i32,
168 a_screen_x: i32,
169 a_screen_y: i32,
170 a_client_x: i32,
171 a_client_y: i32,
172 );
173 #[cfg(feature = "Window")]
174 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
175 #[doc = "The `initDragEvent()` method."]
176 #[doc = ""]
177 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
178 #[doc = ""]
179 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
180 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key(
181 this: &DragEvent,
182 type_: &str,
183 can_bubble: bool,
184 cancelable: bool,
185 a_view: Option<&Window>,
186 a_detail: i32,
187 a_screen_x: i32,
188 a_screen_y: i32,
189 a_client_x: i32,
190 a_client_y: i32,
191 a_ctrl_key: bool,
192 );
193 #[cfg(feature = "Window")]
194 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
195 #[doc = "The `initDragEvent()` method."]
196 #[doc = ""]
197 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
198 #[doc = ""]
199 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
200 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key_and_a_alt_key(
201 this: &DragEvent,
202 type_: &str,
203 can_bubble: bool,
204 cancelable: bool,
205 a_view: Option<&Window>,
206 a_detail: i32,
207 a_screen_x: i32,
208 a_screen_y: i32,
209 a_client_x: i32,
210 a_client_y: i32,
211 a_ctrl_key: bool,
212 a_alt_key: bool,
213 );
214 #[cfg(feature = "Window")]
215 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
216 #[doc = "The `initDragEvent()` method."]
217 #[doc = ""]
218 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
219 #[doc = ""]
220 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
221 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key_and_a_alt_key_and_a_shift_key(
222 this: &DragEvent,
223 type_: &str,
224 can_bubble: bool,
225 cancelable: bool,
226 a_view: Option<&Window>,
227 a_detail: i32,
228 a_screen_x: i32,
229 a_screen_y: i32,
230 a_client_x: i32,
231 a_client_y: i32,
232 a_ctrl_key: bool,
233 a_alt_key: bool,
234 a_shift_key: bool,
235 );
236 #[cfg(feature = "Window")]
237 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
238 #[doc = "The `initDragEvent()` method."]
239 #[doc = ""]
240 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
241 #[doc = ""]
242 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
243 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key_and_a_alt_key_and_a_shift_key_and_a_meta_key(
244 this: &DragEvent,
245 type_: &str,
246 can_bubble: bool,
247 cancelable: bool,
248 a_view: Option<&Window>,
249 a_detail: i32,
250 a_screen_x: i32,
251 a_screen_y: i32,
252 a_client_x: i32,
253 a_client_y: i32,
254 a_ctrl_key: bool,
255 a_alt_key: bool,
256 a_shift_key: bool,
257 a_meta_key: bool,
258 );
259 #[cfg(feature = "Window")]
260 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
261 #[doc = "The `initDragEvent()` method."]
262 #[doc = ""]
263 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
264 #[doc = ""]
265 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
266 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key_and_a_alt_key_and_a_shift_key_and_a_meta_key_and_a_button(
267 this: &DragEvent,
268 type_: &str,
269 can_bubble: bool,
270 cancelable: bool,
271 a_view: Option<&Window>,
272 a_detail: i32,
273 a_screen_x: i32,
274 a_screen_y: i32,
275 a_client_x: i32,
276 a_client_y: i32,
277 a_ctrl_key: bool,
278 a_alt_key: bool,
279 a_shift_key: bool,
280 a_meta_key: bool,
281 a_button: u16,
282 );
283 #[cfg(all(feature = "EventTarget", feature = "Window",))]
284 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
285 #[doc = "The `initDragEvent()` method."]
286 #[doc = ""]
287 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
288 #[doc = ""]
289 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `EventTarget`, `Window`*"]
290 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key_and_a_alt_key_and_a_shift_key_and_a_meta_key_and_a_button_and_a_related_target(
291 this: &DragEvent,
292 type_: &str,
293 can_bubble: bool,
294 cancelable: bool,
295 a_view: Option<&Window>,
296 a_detail: i32,
297 a_screen_x: i32,
298 a_screen_y: i32,
299 a_client_x: i32,
300 a_client_y: i32,
301 a_ctrl_key: bool,
302 a_alt_key: bool,
303 a_shift_key: bool,
304 a_meta_key: bool,
305 a_button: u16,
306 a_related_target: Option<&EventTarget>,
307 );
308 #[cfg(all(feature = "DataTransfer", feature = "EventTarget", feature = "Window",))]
309 #[wasm_bindgen(method, js_class = "DragEvent", js_name = "initDragEvent")]
310 #[doc = "The `initDragEvent()` method."]
311 #[doc = ""]
312 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
313 #[doc = ""]
314 #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DragEvent`, `EventTarget`, `Window`*"]
315 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key_and_a_alt_key_and_a_shift_key_and_a_meta_key_and_a_button_and_a_related_target_and_a_data_transfer(
316 this: &DragEvent,
317 type_: &str,
318 can_bubble: bool,
319 cancelable: bool,
320 a_view: Option<&Window>,
321 a_detail: i32,
322 a_screen_x: i32,
323 a_screen_y: i32,
324 a_client_x: i32,
325 a_client_y: i32,
326 a_ctrl_key: bool,
327 a_alt_key: bool,
328 a_shift_key: bool,
329 a_meta_key: bool,
330 a_button: u16,
331 a_related_target: Option<&EventTarget>,
332 a_data_transfer: Option<&DataTransfer>,
333 );
334}