maxcountryman_web_sys/features/
gen_ImageData.rs

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