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 = ImageData , typescript_type = "ImageData" )] |
8 | #[derive (Debug, Clone, PartialEq, Eq)] |
9 | #[doc = "The `ImageData` class." ] |
10 | #[doc = "" ] |
11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageData)" ] |
12 | #[doc = "" ] |
13 | #[doc = "*This API requires the following crate features to be activated: `ImageData`*" ] |
14 | pub type ImageData; |
15 | # [wasm_bindgen (structural , method , getter , js_class = "ImageData" , js_name = width)] |
16 | #[doc = "Getter for the `width` field of this object." ] |
17 | #[doc = "" ] |
18 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageData/width)" ] |
19 | #[doc = "" ] |
20 | #[doc = "*This API requires the following crate features to be activated: `ImageData`*" ] |
21 | pub fn width(this: &ImageData) -> u32; |
22 | # [wasm_bindgen (structural , method , getter , js_class = "ImageData" , js_name = height)] |
23 | #[doc = "Getter for the `height` field of this object." ] |
24 | #[doc = "" ] |
25 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageData/height)" ] |
26 | #[doc = "" ] |
27 | #[doc = "*This API requires the following crate features to be activated: `ImageData`*" ] |
28 | pub fn height(this: &ImageData) -> u32; |
29 | # [wasm_bindgen (structural , method , getter , js_class = "ImageData" , js_name = data)] |
30 | #[doc = "Getter for the `data` field of this object." ] |
31 | #[doc = "" ] |
32 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageData/data)" ] |
33 | #[doc = "" ] |
34 | #[doc = "*This API requires the following crate features to be activated: `ImageData`*" ] |
35 | pub fn data(this: &ImageData) -> ::wasm_bindgen::Clamped<Vec<u8>>; |
36 | #[wasm_bindgen (catch, constructor, js_class = "ImageData" )] |
37 | #[doc = "The `new ImageData(..)` constructor, creating a new instance of `ImageData`." ] |
38 | #[doc = "" ] |
39 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageData/ImageData)" ] |
40 | #[doc = "" ] |
41 | #[doc = "*This API requires the following crate features to be activated: `ImageData`*" ] |
42 | pub fn new_with_sw(sw: u32, sh: u32) -> Result<ImageData, JsValue>; |
43 | #[wasm_bindgen (catch, constructor, js_class = "ImageData" )] |
44 | #[doc = "The `new ImageData(..)` constructor, creating a new instance of `ImageData`." ] |
45 | #[doc = "" ] |
46 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageData/ImageData)" ] |
47 | #[doc = "" ] |
48 | #[doc = "*This API requires the following crate features to be activated: `ImageData`*" ] |
49 | pub fn new_with_u8_clamped_array( |
50 | data: ::wasm_bindgen::Clamped<&[u8]>, |
51 | sw: u32, |
52 | ) -> Result<ImageData, JsValue>; |
53 | #[wasm_bindgen (catch, constructor, js_class = "ImageData" )] |
54 | #[doc = "The `new ImageData(..)` constructor, creating a new instance of `ImageData`." ] |
55 | #[doc = "" ] |
56 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageData/ImageData)" ] |
57 | #[doc = "" ] |
58 | #[doc = "*This API requires the following crate features to be activated: `ImageData`*" ] |
59 | pub fn new_with_u8_clamped_array_and_sh( |
60 | data: ::wasm_bindgen::Clamped<&[u8]>, |
61 | sw: u32, |
62 | sh: u32, |
63 | ) -> Result<ImageData, JsValue>; |
64 | } |
65 | |