web_sys/features/
gen_GpuCopyExternalImageDestInfo.rs1#![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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "origin")]
72 pub fn set_origin(this: &GpuCopyExternalImageDestInfo, val: &[::js_sys::Number]);
73 #[cfg(web_sys_unstable_apis)]
74 #[cfg(feature = "GpuOrigin3dDict")]
75 #[doc = "Change the `origin` field of this object."]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
81 #[wasm_bindgen(method, setter = "origin")]
82 pub fn set_origin_gpu_origin_3d_dict(
83 this: &GpuCopyExternalImageDestInfo,
84 val: &GpuOrigin3dDict,
85 );
86 #[cfg(web_sys_unstable_apis)]
87 #[cfg(feature = "GpuTexture")]
88 #[doc = "Get the `texture` field of this object."]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`, `GpuTexture`*"]
91 #[doc = ""]
92 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
93 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
94 #[wasm_bindgen(method, getter = "texture")]
95 pub fn get_texture(this: &GpuCopyExternalImageDestInfo) -> GpuTexture;
96 #[cfg(web_sys_unstable_apis)]
97 #[cfg(feature = "GpuTexture")]
98 #[doc = "Change the `texture` field of this object."]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`, `GpuTexture`*"]
101 #[doc = ""]
102 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
103 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
104 #[wasm_bindgen(method, setter = "texture")]
105 pub fn set_texture(this: &GpuCopyExternalImageDestInfo, val: &GpuTexture);
106 #[cfg(web_sys_unstable_apis)]
107 #[doc = "Get the `premultipliedAlpha` field of this object."]
108 #[doc = ""]
109 #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`*"]
110 #[doc = ""]
111 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
112 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
113 #[wasm_bindgen(method, getter = "premultipliedAlpha")]
114 pub fn get_premultiplied_alpha(this: &GpuCopyExternalImageDestInfo) -> Option<bool>;
115 #[cfg(web_sys_unstable_apis)]
116 #[doc = "Change the `premultipliedAlpha` field of this object."]
117 #[doc = ""]
118 #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`*"]
119 #[doc = ""]
120 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
121 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
122 #[wasm_bindgen(method, setter = "premultipliedAlpha")]
123 pub fn set_premultiplied_alpha(this: &GpuCopyExternalImageDestInfo, val: bool);
124}
125#[cfg(web_sys_unstable_apis)]
126impl GpuCopyExternalImageDestInfo {
127 #[cfg(feature = "GpuTexture")]
128 #[doc = "Construct a new `GpuCopyExternalImageDestInfo`."]
129 #[doc = ""]
130 #[doc = "*This API requires the following crate features to be activated: `GpuCopyExternalImageDestInfo`, `GpuTexture`*"]
131 #[doc = ""]
132 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
133 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
134 pub fn new(texture: &GpuTexture) -> Self {
135 #[allow(unused_mut)]
136 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
137 ret.set_texture(texture);
138 ret
139 }
140 #[cfg(web_sys_unstable_apis)]
141 #[cfg(feature = "GpuTextureAspect")]
142 #[deprecated = "Use `set_aspect()` instead."]
143 pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self {
144 self.set_aspect(val);
145 self
146 }
147 #[cfg(web_sys_unstable_apis)]
148 #[deprecated = "Use `set_mip_level()` instead."]
149 pub fn mip_level(&mut self, val: u32) -> &mut Self {
150 self.set_mip_level(val);
151 self
152 }
153 #[cfg(web_sys_unstable_apis)]
154 #[deprecated = "Use `set_origin()` instead."]
155 pub fn origin(&mut self, val: &[::js_sys::Number]) -> &mut Self {
156 self.set_origin(val);
157 self
158 }
159 #[cfg(web_sys_unstable_apis)]
160 #[cfg(feature = "GpuTexture")]
161 #[deprecated = "Use `set_texture()` instead."]
162 pub fn texture(&mut self, val: &GpuTexture) -> &mut Self {
163 self.set_texture(val);
164 self
165 }
166 #[cfg(web_sys_unstable_apis)]
167 #[deprecated = "Use `set_premultiplied_alpha()` instead."]
168 pub fn premultiplied_alpha(&mut self, val: bool) -> &mut Self {
169 self.set_premultiplied_alpha(val);
170 self
171 }
172}