web_sys/features/
gen_GpuCopyExternalImageDestInfo.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPUCopyExternalImageDestInfo)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `GpuCopyExternalImageDestInfo` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`*"]
13    #[doc = ""]
14    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16    pub type GpuCopyExternalImageDestInfo;
17    #[cfg(web_sys_unstable_apis)]
18    #[cfg(feature = "GpuTextureAspect")]
19    #[doc = "Get the `aspect` field of this object."]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`, `GpuTextureAspect`*"]
22    #[doc = ""]
23    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
25    #[wasm_bindgen(method, getter = "aspect")]
26    pub fn get_aspect(this: &GpuCopyExternalImageDestInfo) -> Option<GpuTextureAspect>;
27    #[cfg(web_sys_unstable_apis)]
28    #[cfg(feature = "GpuTextureAspect")]
29    #[doc = "Change the `aspect` field of this object."]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`, `GpuTextureAspect`*"]
32    #[doc = ""]
33    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
35    #[wasm_bindgen(method, setter = "aspect")]
36    pub fn set_aspect(this: &GpuCopyExternalImageDestInfo, val: GpuTextureAspect);
37    #[cfg(web_sys_unstable_apis)]
38    #[doc = "Get the `mipLevel` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`*"]
41    #[doc = ""]
42    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
43    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
44    #[wasm_bindgen(method, getter = "mipLevel")]
45    pub fn get_mip_level(this: &GpuCopyExternalImageDestInfo) -> Option<u32>;
46    #[cfg(web_sys_unstable_apis)]
47    #[doc = "Change the `mipLevel` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`*"]
50    #[doc = ""]
51    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53    #[wasm_bindgen(method, setter = "mipLevel")]
54    pub fn set_mip_level(this: &GpuCopyExternalImageDestInfo, val: u32);
55    #[cfg(web_sys_unstable_apis)]
56    #[doc = "Get the `origin` field of this object."]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`*"]
59    #[doc = ""]
60    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
62    #[wasm_bindgen(method, getter = "origin")]
63    pub fn get_origin(this: &GpuCopyExternalImageDestInfo) -> ::wasm_bindgen::JsValue;
64    #[cfg(web_sys_unstable_apis)]
65    #[doc = "Change the `origin` field of this object."]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`*"]
68    #[doc = ""]
69    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
70    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
71    #[wasm_bindgen(method, setter = "origin")]
72    pub fn set_origin(this: &GpuCopyExternalImageDestInfo, val: &::wasm_bindgen::JsValue);
73    #[cfg(web_sys_unstable_apis)]
74    #[cfg(feature = "GpuTexture")]
75    #[doc = "Get the `texture` field of this object."]
76    #[doc = ""]
77    #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`, `GpuTexture`*"]
78    #[doc = ""]
79    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
80    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
81    #[wasm_bindgen(method, getter = "texture")]
82    pub fn get_texture(this: &GpuCopyExternalImageDestInfo) -> GpuTexture;
83    #[cfg(web_sys_unstable_apis)]
84    #[cfg(feature = "GpuTexture")]
85    #[doc = "Change the `texture` field of this object."]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`, `GpuTexture`*"]
88    #[doc = ""]
89    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
90    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
91    #[wasm_bindgen(method, setter = "texture")]
92    pub fn set_texture(this: &GpuCopyExternalImageDestInfo, val: &GpuTexture);
93    #[cfg(web_sys_unstable_apis)]
94    #[doc = "Get the `premultipliedAlpha` field of this object."]
95    #[doc = ""]
96    #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`*"]
97    #[doc = ""]
98    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
99    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
100    #[wasm_bindgen(method, getter = "premultipliedAlpha")]
101    pub fn get_premultiplied_alpha(this: &GpuCopyExternalImageDestInfo) -> Option<bool>;
102    #[cfg(web_sys_unstable_apis)]
103    #[doc = "Change the `premultipliedAlpha` field of this object."]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`*"]
106    #[doc = ""]
107    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
108    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
109    #[wasm_bindgen(method, setter = "premultipliedAlpha")]
110    pub fn set_premultiplied_alpha(this: &GpuCopyExternalImageDestInfo, val: bool);
111}
112#[cfg(web_sys_unstable_apis)]
113impl GpuCopyExternalImageDestInfo {
114    #[cfg(feature = "GpuTexture")]
115    #[doc = "Construct a new `GpuCopyExternalImageDestInfo`."]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`, `GpuTexture`*"]
118    #[doc = ""]
119    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
120    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
121    pub fn new(texture: &GpuTexture) -> Self {
122        #[allow(unused_mut)]
123        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
124        ret.set_texture(texture);
125        ret
126    }
127    #[cfg(web_sys_unstable_apis)]
128    #[cfg(feature = "GpuTextureAspect")]
129    #[deprecated = "Use `set_aspect()` instead."]
130    pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self {
131        self.set_aspect(val);
132        self
133    }
134    #[cfg(web_sys_unstable_apis)]
135    #[deprecated = "Use `set_mip_level()` instead."]
136    pub fn mip_level(&mut self, val: u32) -> &mut Self {
137        self.set_mip_level(val);
138        self
139    }
140    #[cfg(web_sys_unstable_apis)]
141    #[deprecated = "Use `set_origin()` instead."]
142    pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
143        self.set_origin(val);
144        self
145    }
146    #[cfg(web_sys_unstable_apis)]
147    #[cfg(feature = "GpuTexture")]
148    #[deprecated = "Use `set_texture()` instead."]
149    pub fn texture(&mut self, val: &GpuTexture) -> &mut Self {
150        self.set_texture(val);
151        self
152    }
153    #[cfg(web_sys_unstable_apis)]
154    #[deprecated = "Use `set_premultiplied_alpha()` instead."]
155    pub fn premultiplied_alpha(&mut self, val: bool) -> &mut Self {
156        self.set_premultiplied_alpha(val);
157        self
158    }
159}