web_sys/features/
gen_GpuTexelCopyTextureInfo.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 = GPUTexelCopyTextureInfo)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuTexelCopyTextureInfo` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`*"]
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 GpuTexelCopyTextureInfo;
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: `GpuTexelCopyTextureInfo`, `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: &GpuTexelCopyTextureInfo) -> 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: `GpuTexelCopyTextureInfo`, `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: &GpuTexelCopyTextureInfo, 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: `GpuTexelCopyTextureInfo`*"]
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: &GpuTexelCopyTextureInfo) -> 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: `GpuTexelCopyTextureInfo`*"]
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: &GpuTexelCopyTextureInfo, 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: `GpuTexelCopyTextureInfo`*"]
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: &GpuTexelCopyTextureInfo) -> ::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: `GpuTexelCopyTextureInfo`*"]
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: &GpuTexelCopyTextureInfo, 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: `GpuTexelCopyTextureInfo`*"]
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(this: &GpuTexelCopyTextureInfo, val: &GpuOrigin3dDict);
83 #[cfg(web_sys_unstable_apis)]
84 #[cfg(feature = "GpuTexture")]
85 #[doc = "Get the `texture` field of this object."]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`, `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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
91 #[wasm_bindgen(method, getter = "texture")]
92 pub fn get_texture(this: &GpuTexelCopyTextureInfo) -> GpuTexture;
93 #[cfg(web_sys_unstable_apis)]
94 #[cfg(feature = "GpuTexture")]
95 #[doc = "Change the `texture` field of this object."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`, `GpuTexture`*"]
98 #[doc = ""]
99 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
100 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
101 #[wasm_bindgen(method, setter = "texture")]
102 pub fn set_texture(this: &GpuTexelCopyTextureInfo, val: &GpuTexture);
103}
104#[cfg(web_sys_unstable_apis)]
105impl GpuTexelCopyTextureInfo {
106 #[cfg(feature = "GpuTexture")]
107 #[doc = "Construct a new `GpuTexelCopyTextureInfo`."]
108 #[doc = ""]
109 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`, `GpuTexture`*"]
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 pub fn new(texture: &GpuTexture) -> Self {
114 #[allow(unused_mut)]
115 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
116 ret.set_texture(texture);
117 ret
118 }
119 #[cfg(web_sys_unstable_apis)]
120 #[cfg(feature = "GpuTextureAspect")]
121 #[deprecated = "Use `set_aspect()` instead."]
122 pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self {
123 self.set_aspect(val);
124 self
125 }
126 #[cfg(web_sys_unstable_apis)]
127 #[deprecated = "Use `set_mip_level()` instead."]
128 pub fn mip_level(&mut self, val: u32) -> &mut Self {
129 self.set_mip_level(val);
130 self
131 }
132 #[cfg(web_sys_unstable_apis)]
133 #[deprecated = "Use `set_origin()` instead."]
134 pub fn origin(&mut self, val: &[::js_sys::Number]) -> &mut Self {
135 self.set_origin(val);
136 self
137 }
138 #[cfg(web_sys_unstable_apis)]
139 #[cfg(feature = "GpuTexture")]
140 #[deprecated = "Use `set_texture()` instead."]
141 pub fn texture(&mut self, val: &GpuTexture) -> &mut Self {
142 self.set_texture(val);
143 self
144 }
145}