maxcountryman_web_sys/features/
gen_ImageBitmap.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "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`*"]
20 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`*"]
27 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`*"]
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`*"]
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`*"]
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`*"]
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`*"]
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`*"]
87 pub fn mapped_data_length(
88 this: &ImageBitmap,
89 a_format: ImageBitmapFormat,
90 ) -> Result<i32, JsValue>;
91}