1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[wasm_bindgen]
5 extern "C" {
6     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ImageBitmap , typescript_type = "ImageBitmap")]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `ImageBitmap` class."]
9     #[doc = ""]
10     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap)"]
11     #[doc = ""]
12     #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`*"]
13     pub type ImageBitmap;
14     # [wasm_bindgen (structural , method , getter , js_class = "ImageBitmap" , 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/ImageBitmap/width)"]
18     #[doc = ""]
19     #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`*"]
width(this: &ImageBitmap) -> u3220     pub fn width(this: &ImageBitmap) -> u32;
21     # [wasm_bindgen (structural , method , getter , js_class = "ImageBitmap" , 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/ImageBitmap/height)"]
25     #[doc = ""]
26     #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`*"]
height(this: &ImageBitmap) -> u3227     pub fn height(this: &ImageBitmap) -> u32;
28     # [wasm_bindgen (method , structural , js_class = "ImageBitmap" , js_name = close)]
29     #[doc = "The `close()` method."]
30     #[doc = ""]
31     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap/close)"]
32     #[doc = ""]
33     #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`*"]
close(this: &ImageBitmap)34     pub fn close(this: &ImageBitmap);
35     #[cfg(feature = "ImageBitmapFormat")]
36     # [wasm_bindgen (catch , method , structural , js_class = "ImageBitmap" , js_name = findOptimalFormat)]
37     #[doc = "The `findOptimalFormat()` method."]
38     #[doc = ""]
39     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap/findOptimalFormat)"]
40     #[doc = ""]
41     #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `ImageBitmapFormat`*"]
find_optimal_format(this: &ImageBitmap) -> Result<ImageBitmapFormat, JsValue>42     pub fn find_optimal_format(this: &ImageBitmap) -> Result<ImageBitmapFormat, JsValue>;
43     #[cfg(feature = "ImageBitmapFormat")]
44     # [wasm_bindgen (catch , method , structural , js_class = "ImageBitmap" , js_name = findOptimalFormat)]
45     #[doc = "The `findOptimalFormat()` method."]
46     #[doc = ""]
47     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap/findOptimalFormat)"]
48     #[doc = ""]
49     #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `ImageBitmapFormat`*"]
find_optimal_format_with_a_possible_formats( this: &ImageBitmap, a_possible_formats: &::wasm_bindgen::JsValue, ) -> Result<ImageBitmapFormat, JsValue>50     pub fn find_optimal_format_with_a_possible_formats(
51         this: &ImageBitmap,
52         a_possible_formats: &::wasm_bindgen::JsValue,
53     ) -> Result<ImageBitmapFormat, JsValue>;
54     #[cfg(feature = "ImageBitmapFormat")]
55     # [wasm_bindgen (catch , method , structural , js_class = "ImageBitmap" , js_name = mapDataInto)]
56     #[doc = "The `mapDataInto()` method."]
57     #[doc = ""]
58     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap/mapDataInto)"]
59     #[doc = ""]
60     #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `ImageBitmapFormat`*"]
map_data_into_with_buffer_source( this: &ImageBitmap, a_format: ImageBitmapFormat, a_buffer: &::js_sys::Object, a_offset: i32, ) -> Result<::js_sys::Promise, JsValue>61     pub fn map_data_into_with_buffer_source(
62         this: &ImageBitmap,
63         a_format: ImageBitmapFormat,
64         a_buffer: &::js_sys::Object,
65         a_offset: i32,
66     ) -> Result<::js_sys::Promise, JsValue>;
67     #[cfg(feature = "ImageBitmapFormat")]
68     # [wasm_bindgen (catch , method , structural , js_class = "ImageBitmap" , js_name = mapDataInto)]
69     #[doc = "The `mapDataInto()` method."]
70     #[doc = ""]
71     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap/mapDataInto)"]
72     #[doc = ""]
73     #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `ImageBitmapFormat`*"]
map_data_into_with_u8_array( this: &ImageBitmap, a_format: ImageBitmapFormat, a_buffer: &mut [u8], a_offset: i32, ) -> Result<::js_sys::Promise, JsValue>74     pub fn map_data_into_with_u8_array(
75         this: &ImageBitmap,
76         a_format: ImageBitmapFormat,
77         a_buffer: &mut [u8],
78         a_offset: i32,
79     ) -> Result<::js_sys::Promise, JsValue>;
80     #[cfg(feature = "ImageBitmapFormat")]
81     # [wasm_bindgen (catch , method , structural , js_class = "ImageBitmap" , js_name = mappedDataLength)]
82     #[doc = "The `mappedDataLength()` method."]
83     #[doc = ""]
84     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap/mappedDataLength)"]
85     #[doc = ""]
86     #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `ImageBitmapFormat`*"]
mapped_data_length( this: &ImageBitmap, a_format: ImageBitmapFormat, ) -> Result<i32, JsValue>87     pub fn mapped_data_length(
88         this: &ImageBitmap,
89         a_format: ImageBitmapFormat,
90     ) -> Result<i32, JsValue>;
91 }
92