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 = XrLayer , extends = EventTarget , extends = :: js_sys :: Object , js_name = XRWebGLLayer , typescript_type = "XRWebGLLayer")]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `XrWebGlLayer` class."]
11 #[doc = ""]
12 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer)"]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayer`*"]
15 #[doc = ""]
16 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
17 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
18 pub type XrWebGlLayer;
19 #[cfg(web_sys_unstable_apis)]
20 # [wasm_bindgen (structural , method , getter , js_class = "XRWebGLLayer" , js_name = antialias)]
21 #[doc = "Getter for the `antialias` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/antialias)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayer`*"]
26 #[doc = ""]
27 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
28 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
29 pub fn antialias(this: &XrWebGlLayer) -> bool;
30 #[cfg(web_sys_unstable_apis)]
31 # [wasm_bindgen (structural , method , getter , js_class = "XRWebGLLayer" , js_name = ignoreDepthValues)]
32 #[doc = "Getter for the `ignoreDepthValues` field of this object."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/ignoreDepthValues)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayer`*"]
37 #[doc = ""]
38 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
39 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
40 pub fn ignore_depth_values(this: &XrWebGlLayer) -> bool;
41 #[cfg(web_sys_unstable_apis)]
42 # [wasm_bindgen (structural , method , getter , js_class = "XRWebGLLayer" , js_name = fixedFoveation)]
43 #[doc = "Getter for the `fixedFoveation` field of this object."]
44 #[doc = ""]
45 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/fixedFoveation)"]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayer`*"]
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 pub fn fixed_foveation(this: &XrWebGlLayer) -> Option<f32>;
52 #[cfg(web_sys_unstable_apis)]
53 # [wasm_bindgen (structural , method , setter , js_class = "XRWebGLLayer" , js_name = fixedFoveation)]
54 #[doc = "Setter for the `fixedFoveation` field of this object."]
55 #[doc = ""]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/fixedFoveation)"]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayer`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 pub fn set_fixed_foveation(this: &XrWebGlLayer, value: Option<f32>);
63 #[cfg(web_sys_unstable_apis)]
64 #[cfg(feature = "WebGlFramebuffer")]
65 # [wasm_bindgen (structural , method , getter , js_class = "XRWebGLLayer" , js_name = framebuffer)]
66 #[doc = "Getter for the `framebuffer` field of this object."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/framebuffer)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `WebGlFramebuffer`, `XrWebGlLayer`*"]
71 #[doc = ""]
72 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
73 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
74 pub fn framebuffer(this: &XrWebGlLayer) -> Option<WebGlFramebuffer>;
75 #[cfg(web_sys_unstable_apis)]
76 # [wasm_bindgen (structural , method , getter , js_class = "XRWebGLLayer" , js_name = framebufferWidth)]
77 #[doc = "Getter for the `framebufferWidth` field of this object."]
78 #[doc = ""]
79 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/framebufferWidth)"]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayer`*"]
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 pub fn framebuffer_width(this: &XrWebGlLayer) -> u32;
86 #[cfg(web_sys_unstable_apis)]
87 # [wasm_bindgen (structural , method , getter , js_class = "XRWebGLLayer" , js_name = framebufferHeight)]
88 #[doc = "Getter for the `framebufferHeight` field of this object."]
89 #[doc = ""]
90 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/framebufferHeight)"]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayer`*"]
93 #[doc = ""]
94 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
95 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
96 pub fn framebuffer_height(this: &XrWebGlLayer) -> u32;
97 #[cfg(web_sys_unstable_apis)]
98 #[cfg(all(feature = "WebGlRenderingContext", feature = "XrSession",))]
99 #[wasm_bindgen(catch, constructor, js_class = "XRWebGLLayer")]
100 #[doc = "The `new XrWebGlLayer(..)` constructor, creating a new instance of `XrWebGlLayer`."]
101 #[doc = ""]
102 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/XRWebGLLayer)"]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `WebGlRenderingContext`, `XrSession`, `XrWebGlLayer`*"]
105 #[doc = ""]
106 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
107 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
108 pub fn new_with_web_gl_rendering_context(
109 session: &XrSession,
110 context: &WebGlRenderingContext,
111 ) -> Result<XrWebGlLayer, JsValue>;
112 #[cfg(web_sys_unstable_apis)]
113 #[cfg(all(feature = "WebGl2RenderingContext", feature = "XrSession",))]
114 #[wasm_bindgen(catch, constructor, js_class = "XRWebGLLayer")]
115 #[doc = "The `new XrWebGlLayer(..)` constructor, creating a new instance of `XrWebGlLayer`."]
116 #[doc = ""]
117 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/XRWebGLLayer)"]
118 #[doc = ""]
119 #[doc = "*This API requires the following crate features to be activated: `WebGl2RenderingContext`, `XrSession`, `XrWebGlLayer`*"]
120 #[doc = ""]
121 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
122 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
123 pub fn new_with_web_gl2_rendering_context(
124 session: &XrSession,
125 context: &WebGl2RenderingContext,
126 ) -> Result<XrWebGlLayer, JsValue>;
127 #[cfg(web_sys_unstable_apis)]
128 #[cfg(all(
129 feature = "WebGlRenderingContext",
130 feature = "XrSession",
131 feature = "XrWebGlLayerInit",
132 ))]
133 #[wasm_bindgen(catch, constructor, js_class = "XRWebGLLayer")]
134 #[doc = "The `new XrWebGlLayer(..)` constructor, creating a new instance of `XrWebGlLayer`."]
135 #[doc = ""]
136 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/XRWebGLLayer)"]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `WebGlRenderingContext`, `XrSession`, `XrWebGlLayer`, `XrWebGlLayerInit`*"]
139 #[doc = ""]
140 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
141 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
142 pub fn new_with_web_gl_rendering_context_and_layer_init(
143 session: &XrSession,
144 context: &WebGlRenderingContext,
145 layer_init: &XrWebGlLayerInit,
146 ) -> Result<XrWebGlLayer, JsValue>;
147 #[cfg(web_sys_unstable_apis)]
148 #[cfg(all(
149 feature = "WebGl2RenderingContext",
150 feature = "XrSession",
151 feature = "XrWebGlLayerInit",
152 ))]
153 #[wasm_bindgen(catch, constructor, js_class = "XRWebGLLayer")]
154 #[doc = "The `new XrWebGlLayer(..)` constructor, creating a new instance of `XrWebGlLayer`."]
155 #[doc = ""]
156 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/XRWebGLLayer)"]
157 #[doc = ""]
158 #[doc = "*This API requires the following crate features to be activated: `WebGl2RenderingContext`, `XrSession`, `XrWebGlLayer`, `XrWebGlLayerInit`*"]
159 #[doc = ""]
160 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
161 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
162 pub fn new_with_web_gl2_rendering_context_and_layer_init(
163 session: &XrSession,
164 context: &WebGl2RenderingContext,
165 layer_init: &XrWebGlLayerInit,
166 ) -> Result<XrWebGlLayer, JsValue>;
167 #[cfg(web_sys_unstable_apis)]
168 #[cfg(feature = "XrSession")]
169 # [wasm_bindgen (static_method_of = XrWebGlLayer , js_class = "XRWebGLLayer" , js_name = getNativeFramebufferScaleFactor)]
170 #[doc = "The `getNativeFramebufferScaleFactor()` method."]
171 #[doc = ""]
172 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/getNativeFramebufferScaleFactor_static)"]
173 #[doc = ""]
174 #[doc = "*This API requires the following crate features to be activated: `XrSession`, `XrWebGlLayer`*"]
175 #[doc = ""]
176 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
177 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
178 pub fn get_native_framebuffer_scale_factor(session: &XrSession) -> f64;
179 #[cfg(web_sys_unstable_apis)]
180 #[cfg(all(feature = "XrView", feature = "XrViewport",))]
181 # [wasm_bindgen (method , structural , js_class = "XRWebGLLayer" , js_name = getViewport)]
182 #[doc = "The `getViewport()` method."]
183 #[doc = ""]
184 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/getViewport)"]
185 #[doc = ""]
186 #[doc = "*This API requires the following crate features to be activated: `XrView`, `XrViewport`, `XrWebGlLayer`*"]
187 #[doc = ""]
188 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
189 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
190 pub fn get_viewport(this: &XrWebGlLayer, view: &XrView) -> Option<XrViewport>;
191}