web_sys/features/
gen_GpuStencilFaceState.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 = GPUStencilFaceState)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `GpuStencilFaceState` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`*"]
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 GpuStencilFaceState;
17    #[cfg(web_sys_unstable_apis)]
18    #[cfg(feature = "GpuCompareFunction")]
19    #[doc = "Get the `compare` field of this object."]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuStencilFaceState`*"]
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 = "compare")]
26    pub fn get_compare(this: &GpuStencilFaceState) -> Option<GpuCompareFunction>;
27    #[cfg(web_sys_unstable_apis)]
28    #[cfg(feature = "GpuCompareFunction")]
29    #[doc = "Change the `compare` field of this object."]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuStencilFaceState`*"]
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 = "compare")]
36    pub fn set_compare(this: &GpuStencilFaceState, val: GpuCompareFunction);
37    #[cfg(web_sys_unstable_apis)]
38    #[cfg(feature = "GpuStencilOperation")]
39    #[doc = "Get the `depthFailOp` field of this object."]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"]
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 = "depthFailOp")]
46    pub fn get_depth_fail_op(this: &GpuStencilFaceState) -> Option<GpuStencilOperation>;
47    #[cfg(web_sys_unstable_apis)]
48    #[cfg(feature = "GpuStencilOperation")]
49    #[doc = "Change the `depthFailOp` field of this object."]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"]
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 = "depthFailOp")]
56    pub fn set_depth_fail_op(this: &GpuStencilFaceState, val: GpuStencilOperation);
57    #[cfg(web_sys_unstable_apis)]
58    #[cfg(feature = "GpuStencilOperation")]
59    #[doc = "Get the `failOp` field of this object."]
60    #[doc = ""]
61    #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"]
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 = "failOp")]
66    pub fn get_fail_op(this: &GpuStencilFaceState) -> Option<GpuStencilOperation>;
67    #[cfg(web_sys_unstable_apis)]
68    #[cfg(feature = "GpuStencilOperation")]
69    #[doc = "Change the `failOp` field of this object."]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"]
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 = "failOp")]
76    pub fn set_fail_op(this: &GpuStencilFaceState, val: GpuStencilOperation);
77    #[cfg(web_sys_unstable_apis)]
78    #[cfg(feature = "GpuStencilOperation")]
79    #[doc = "Get the `passOp` field of this object."]
80    #[doc = ""]
81    #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"]
82    #[doc = ""]
83    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
85    #[wasm_bindgen(method, getter = "passOp")]
86    pub fn get_pass_op(this: &GpuStencilFaceState) -> Option<GpuStencilOperation>;
87    #[cfg(web_sys_unstable_apis)]
88    #[cfg(feature = "GpuStencilOperation")]
89    #[doc = "Change the `passOp` field of this object."]
90    #[doc = ""]
91    #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"]
92    #[doc = ""]
93    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
94    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
95    #[wasm_bindgen(method, setter = "passOp")]
96    pub fn set_pass_op(this: &GpuStencilFaceState, val: GpuStencilOperation);
97}
98#[cfg(web_sys_unstable_apis)]
99impl GpuStencilFaceState {
100    #[doc = "Construct a new `GpuStencilFaceState`."]
101    #[doc = ""]
102    #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`*"]
103    #[doc = ""]
104    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
105    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
106    pub fn new() -> Self {
107        #[allow(unused_mut)]
108        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
109        ret
110    }
111    #[cfg(web_sys_unstable_apis)]
112    #[cfg(feature = "GpuCompareFunction")]
113    #[deprecated = "Use `set_compare()` instead."]
114    pub fn compare(&mut self, val: GpuCompareFunction) -> &mut Self {
115        self.set_compare(val);
116        self
117    }
118    #[cfg(web_sys_unstable_apis)]
119    #[cfg(feature = "GpuStencilOperation")]
120    #[deprecated = "Use `set_depth_fail_op()` instead."]
121    pub fn depth_fail_op(&mut self, val: GpuStencilOperation) -> &mut Self {
122        self.set_depth_fail_op(val);
123        self
124    }
125    #[cfg(web_sys_unstable_apis)]
126    #[cfg(feature = "GpuStencilOperation")]
127    #[deprecated = "Use `set_fail_op()` instead."]
128    pub fn fail_op(&mut self, val: GpuStencilOperation) -> &mut Self {
129        self.set_fail_op(val);
130        self
131    }
132    #[cfg(web_sys_unstable_apis)]
133    #[cfg(feature = "GpuStencilOperation")]
134    #[deprecated = "Use `set_pass_op()` instead."]
135    pub fn pass_op(&mut self, val: GpuStencilOperation) -> &mut Self {
136        self.set_pass_op(val);
137        self
138    }
139}
140#[cfg(web_sys_unstable_apis)]
141impl Default for GpuStencilFaceState {
142    fn default() -> Self {
143        Self::new()
144    }
145}