web_sys/features/
gen_GpuColorDict.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 = GPUColorDict)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuColorDict` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"]
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 GpuColorDict;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `a` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "a")]
25 pub fn get_a(this: &GpuColorDict) -> f64;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `a` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"]
30 #[doc = ""]
31 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "a")]
34 pub fn set_a(this: &GpuColorDict, val: f64);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `b` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, getter = "b")]
43 pub fn get_b(this: &GpuColorDict) -> f64;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `b` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 #[wasm_bindgen(method, setter = "b")]
52 pub fn set_b(this: &GpuColorDict, val: f64);
53 #[cfg(web_sys_unstable_apis)]
54 #[doc = "Get the `g` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"]
57 #[doc = ""]
58 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
59 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
60 #[wasm_bindgen(method, getter = "g")]
61 pub fn get_g(this: &GpuColorDict) -> f64;
62 #[cfg(web_sys_unstable_apis)]
63 #[doc = "Change the `g` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"]
66 #[doc = ""]
67 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
68 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
69 #[wasm_bindgen(method, setter = "g")]
70 pub fn set_g(this: &GpuColorDict, val: f64);
71 #[cfg(web_sys_unstable_apis)]
72 #[doc = "Get the `r` field of this object."]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"]
75 #[doc = ""]
76 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
77 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
78 #[wasm_bindgen(method, getter = "r")]
79 pub fn get_r(this: &GpuColorDict) -> f64;
80 #[cfg(web_sys_unstable_apis)]
81 #[doc = "Change the `r` field of this object."]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"]
84 #[doc = ""]
85 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
86 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
87 #[wasm_bindgen(method, setter = "r")]
88 pub fn set_r(this: &GpuColorDict, val: f64);
89}
90#[cfg(web_sys_unstable_apis)]
91impl GpuColorDict {
92 #[doc = "Construct a new `GpuColorDict`."]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"]
95 #[doc = ""]
96 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
97 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
98 pub fn new(a: f64, b: f64, g: f64, r: f64) -> Self {
99 #[allow(unused_mut)]
100 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
101 ret.set_a(a);
102 ret.set_b(b);
103 ret.set_g(g);
104 ret.set_r(r);
105 ret
106 }
107 #[cfg(web_sys_unstable_apis)]
108 #[deprecated = "Use `set_a()` instead."]
109 pub fn a(&mut self, val: f64) -> &mut Self {
110 self.set_a(val);
111 self
112 }
113 #[cfg(web_sys_unstable_apis)]
114 #[deprecated = "Use `set_b()` instead."]
115 pub fn b(&mut self, val: f64) -> &mut Self {
116 self.set_b(val);
117 self
118 }
119 #[cfg(web_sys_unstable_apis)]
120 #[deprecated = "Use `set_g()` instead."]
121 pub fn g(&mut self, val: f64) -> &mut Self {
122 self.set_g(val);
123 self
124 }
125 #[cfg(web_sys_unstable_apis)]
126 #[deprecated = "Use `set_r()` instead."]
127 pub fn r(&mut self, val: f64) -> &mut Self {
128 self.set_r(val);
129 self
130 }
131}