web_sys/features/
gen_GpuBlendComponent.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 = GPUBlendComponent)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuBlendComponent` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`*"]
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 GpuBlendComponent;
17 #[cfg(web_sys_unstable_apis)]
18 #[cfg(feature = "GpuBlendFactor")]
19 #[doc = "Get the `dstFactor` field of this object."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"]
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 = "dstFactor")]
26 pub fn get_dst_factor(this: &GpuBlendComponent) -> Option<GpuBlendFactor>;
27 #[cfg(web_sys_unstable_apis)]
28 #[cfg(feature = "GpuBlendFactor")]
29 #[doc = "Change the `dstFactor` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"]
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 = "dstFactor")]
36 pub fn set_dst_factor(this: &GpuBlendComponent, val: GpuBlendFactor);
37 #[cfg(web_sys_unstable_apis)]
38 #[cfg(feature = "GpuBlendOperation")]
39 #[doc = "Get the `operation` field of this object."]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendOperation`*"]
42 #[doc = ""]
43 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
45 #[wasm_bindgen(method, getter = "operation")]
46 pub fn get_operation(this: &GpuBlendComponent) -> Option<GpuBlendOperation>;
47 #[cfg(web_sys_unstable_apis)]
48 #[cfg(feature = "GpuBlendOperation")]
49 #[doc = "Change the `operation` field of this object."]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendOperation`*"]
52 #[doc = ""]
53 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
55 #[wasm_bindgen(method, setter = "operation")]
56 pub fn set_operation(this: &GpuBlendComponent, val: GpuBlendOperation);
57 #[cfg(web_sys_unstable_apis)]
58 #[cfg(feature = "GpuBlendFactor")]
59 #[doc = "Get the `srcFactor` field of this object."]
60 #[doc = ""]
61 #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"]
62 #[doc = ""]
63 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
64 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
65 #[wasm_bindgen(method, getter = "srcFactor")]
66 pub fn get_src_factor(this: &GpuBlendComponent) -> Option<GpuBlendFactor>;
67 #[cfg(web_sys_unstable_apis)]
68 #[cfg(feature = "GpuBlendFactor")]
69 #[doc = "Change the `srcFactor` field of this object."]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"]
72 #[doc = ""]
73 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
75 #[wasm_bindgen(method, setter = "srcFactor")]
76 pub fn set_src_factor(this: &GpuBlendComponent, val: GpuBlendFactor);
77}
78#[cfg(web_sys_unstable_apis)]
79impl GpuBlendComponent {
80 #[doc = "Construct a new `GpuBlendComponent`."]
81 #[doc = ""]
82 #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`*"]
83 #[doc = ""]
84 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
85 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
86 pub fn new() -> Self {
87 #[allow(unused_mut)]
88 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
89 ret
90 }
91 #[cfg(web_sys_unstable_apis)]
92 #[cfg(feature = "GpuBlendFactor")]
93 #[deprecated = "Use `set_dst_factor()` instead."]
94 pub fn dst_factor(&mut self, val: GpuBlendFactor) -> &mut Self {
95 self.set_dst_factor(val);
96 self
97 }
98 #[cfg(web_sys_unstable_apis)]
99 #[cfg(feature = "GpuBlendOperation")]
100 #[deprecated = "Use `set_operation()` instead."]
101 pub fn operation(&mut self, val: GpuBlendOperation) -> &mut Self {
102 self.set_operation(val);
103 self
104 }
105 #[cfg(web_sys_unstable_apis)]
106 #[cfg(feature = "GpuBlendFactor")]
107 #[deprecated = "Use `set_src_factor()` instead."]
108 pub fn src_factor(&mut self, val: GpuBlendFactor) -> &mut Self {
109 self.set_src_factor(val);
110 self
111 }
112}
113#[cfg(web_sys_unstable_apis)]
114impl Default for GpuBlendComponent {
115 fn default() -> Self {
116 Self::new()
117 }
118}