1 | #![allow (unused_imports)] |
2 | #![allow (clippy::all)] |
3 | use super::*; |
4 | use wasm_bindgen::prelude::*; |
5 | #[wasm_bindgen ] |
6 | extern "C" { |
7 | # [wasm_bindgen (extends = :: js_sys :: Object , js_name = DataTransfer , typescript_type = "DataTransfer" )] |
8 | #[derive (Debug, Clone, PartialEq, Eq)] |
9 | #[doc = "The `DataTransfer` class." ] |
10 | #[doc = "" ] |
11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer)" ] |
12 | #[doc = "" ] |
13 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
14 | pub type DataTransfer; |
15 | # [wasm_bindgen (structural , method , getter , js_class = "DataTransfer" , js_name = dropEffect)] |
16 | #[doc = "Getter for the `dropEffect` field of this object." ] |
17 | #[doc = "" ] |
18 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/dropEffect)" ] |
19 | #[doc = "" ] |
20 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
21 | pub fn drop_effect(this: &DataTransfer) -> String; |
22 | # [wasm_bindgen (structural , method , setter , js_class = "DataTransfer" , js_name = dropEffect)] |
23 | #[doc = "Setter for the `dropEffect` field of this object." ] |
24 | #[doc = "" ] |
25 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/dropEffect)" ] |
26 | #[doc = "" ] |
27 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
28 | pub fn set_drop_effect(this: &DataTransfer, value: &str); |
29 | # [wasm_bindgen (structural , method , getter , js_class = "DataTransfer" , js_name = effectAllowed)] |
30 | #[doc = "Getter for the `effectAllowed` field of this object." ] |
31 | #[doc = "" ] |
32 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/effectAllowed)" ] |
33 | #[doc = "" ] |
34 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
35 | pub fn effect_allowed(this: &DataTransfer) -> String; |
36 | # [wasm_bindgen (structural , method , setter , js_class = "DataTransfer" , js_name = effectAllowed)] |
37 | #[doc = "Setter for the `effectAllowed` field of this object." ] |
38 | #[doc = "" ] |
39 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/effectAllowed)" ] |
40 | #[doc = "" ] |
41 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
42 | pub fn set_effect_allowed(this: &DataTransfer, value: &str); |
43 | #[cfg (feature = "DataTransferItemList" )] |
44 | # [wasm_bindgen (structural , method , getter , js_class = "DataTransfer" , js_name = items)] |
45 | #[doc = "Getter for the `items` field of this object." ] |
46 | #[doc = "" ] |
47 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/items)" ] |
48 | #[doc = "" ] |
49 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DataTransferItemList`*" ] |
50 | pub fn items(this: &DataTransfer) -> DataTransferItemList; |
51 | # [wasm_bindgen (structural , method , getter , js_class = "DataTransfer" , js_name = types)] |
52 | #[doc = "Getter for the `types` field of this object." ] |
53 | #[doc = "" ] |
54 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/types)" ] |
55 | #[doc = "" ] |
56 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
57 | pub fn types(this: &DataTransfer) -> ::js_sys::Array; |
58 | #[cfg (feature = "FileList" )] |
59 | # [wasm_bindgen (structural , method , getter , js_class = "DataTransfer" , js_name = files)] |
60 | #[doc = "Getter for the `files` field of this object." ] |
61 | #[doc = "" ] |
62 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/files)" ] |
63 | #[doc = "" ] |
64 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `FileList`*" ] |
65 | pub fn files(this: &DataTransfer) -> Option<FileList>; |
66 | #[wasm_bindgen (catch, constructor, js_class = "DataTransfer" )] |
67 | #[doc = "The `new DataTransfer(..)` constructor, creating a new instance of `DataTransfer`." ] |
68 | #[doc = "" ] |
69 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/DataTransfer)" ] |
70 | #[doc = "" ] |
71 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
72 | pub fn new() -> Result<DataTransfer, JsValue>; |
73 | # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = clearData)] |
74 | #[doc = "The `clearData()` method." ] |
75 | #[doc = "" ] |
76 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/clearData)" ] |
77 | #[doc = "" ] |
78 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
79 | pub fn clear_data(this: &DataTransfer) -> Result<(), JsValue>; |
80 | # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = clearData)] |
81 | #[doc = "The `clearData()` method." ] |
82 | #[doc = "" ] |
83 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/clearData)" ] |
84 | #[doc = "" ] |
85 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
86 | pub fn clear_data_with_format(this: &DataTransfer, format: &str) -> Result<(), JsValue>; |
87 | # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = getData)] |
88 | #[doc = "The `getData()` method." ] |
89 | #[doc = "" ] |
90 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/getData)" ] |
91 | #[doc = "" ] |
92 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
93 | pub fn get_data(this: &DataTransfer, format: &str) -> Result<String, JsValue>; |
94 | # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = getFiles)] |
95 | #[doc = "The `getFiles()` method." ] |
96 | #[doc = "" ] |
97 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/getFiles)" ] |
98 | #[doc = "" ] |
99 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
100 | pub fn get_files(this: &DataTransfer) -> Result<::js_sys::Promise, JsValue>; |
101 | # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = getFiles)] |
102 | #[doc = "The `getFiles()` method." ] |
103 | #[doc = "" ] |
104 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/getFiles)" ] |
105 | #[doc = "" ] |
106 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
107 | pub fn get_files_with_recursive_flag( |
108 | this: &DataTransfer, |
109 | recursive_flag: bool, |
110 | ) -> Result<::js_sys::Promise, JsValue>; |
111 | # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = getFilesAndDirectories)] |
112 | #[doc = "The `getFilesAndDirectories()` method." ] |
113 | #[doc = "" ] |
114 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/getFilesAndDirectories)" ] |
115 | #[doc = "" ] |
116 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
117 | pub fn get_files_and_directories(this: &DataTransfer) -> Result<::js_sys::Promise, JsValue>; |
118 | # [wasm_bindgen (catch , method , structural , js_class = "DataTransfer" , js_name = setData)] |
119 | #[doc = "The `setData()` method." ] |
120 | #[doc = "" ] |
121 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setData)" ] |
122 | #[doc = "" ] |
123 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`*" ] |
124 | pub fn set_data(this: &DataTransfer, format: &str, data: &str) -> Result<(), JsValue>; |
125 | #[cfg (feature = "Element" )] |
126 | # [wasm_bindgen (method , structural , js_class = "DataTransfer" , js_name = setDragImage)] |
127 | #[doc = "The `setDragImage()` method." ] |
128 | #[doc = "" ] |
129 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setDragImage)" ] |
130 | #[doc = "" ] |
131 | #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `Element`*" ] |
132 | pub fn set_drag_image(this: &DataTransfer, image: &Element, x: i32, y: i32); |
133 | } |
134 | |