web_sys/features/
gen_VrDisplay.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = VRDisplay , typescript_type = "VRDisplay")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `VrDisplay` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
14    pub type VrDisplay;
15    # [wasm_bindgen (structural , method , getter , js_class = "VRDisplay" , js_name = isConnected)]
16    #[doc = "Getter for the `isConnected` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/isConnected)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
21    pub fn is_connected(this: &VrDisplay) -> bool;
22    # [wasm_bindgen (structural , method , getter , js_class = "VRDisplay" , js_name = isPresenting)]
23    #[doc = "Getter for the `isPresenting` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/isPresenting)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
28    pub fn is_presenting(this: &VrDisplay) -> bool;
29    #[cfg(feature = "VrDisplayCapabilities")]
30    # [wasm_bindgen (structural , method , getter , js_class = "VRDisplay" , js_name = capabilities)]
31    #[doc = "Getter for the `capabilities` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/capabilities)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`, `VrDisplayCapabilities`*"]
36    pub fn capabilities(this: &VrDisplay) -> VrDisplayCapabilities;
37    #[cfg(feature = "VrStageParameters")]
38    # [wasm_bindgen (structural , method , getter , js_class = "VRDisplay" , js_name = stageParameters)]
39    #[doc = "Getter for the `stageParameters` field of this object."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/stageParameters)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`, `VrStageParameters`*"]
44    pub fn stage_parameters(this: &VrDisplay) -> Option<VrStageParameters>;
45    # [wasm_bindgen (structural , method , getter , js_class = "VRDisplay" , js_name = displayId)]
46    #[doc = "Getter for the `displayId` field of this object."]
47    #[doc = ""]
48    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/displayId)"]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
51    pub fn display_id(this: &VrDisplay) -> u32;
52    # [wasm_bindgen (structural , method , getter , js_class = "VRDisplay" , js_name = displayName)]
53    #[doc = "Getter for the `displayName` field of this object."]
54    #[doc = ""]
55    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/displayName)"]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
58    pub fn display_name(this: &VrDisplay) -> ::alloc::string::String;
59    # [wasm_bindgen (structural , method , getter , js_class = "VRDisplay" , js_name = depthNear)]
60    #[doc = "Getter for the `depthNear` field of this object."]
61    #[doc = ""]
62    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/depthNear)"]
63    #[doc = ""]
64    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
65    pub fn depth_near(this: &VrDisplay) -> f64;
66    # [wasm_bindgen (structural , method , setter , js_class = "VRDisplay" , js_name = depthNear)]
67    #[doc = "Setter for the `depthNear` field of this object."]
68    #[doc = ""]
69    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/depthNear)"]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
72    pub fn set_depth_near(this: &VrDisplay, value: f64);
73    # [wasm_bindgen (structural , method , getter , js_class = "VRDisplay" , js_name = depthFar)]
74    #[doc = "Getter for the `depthFar` field of this object."]
75    #[doc = ""]
76    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/depthFar)"]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
79    pub fn depth_far(this: &VrDisplay) -> f64;
80    # [wasm_bindgen (structural , method , setter , js_class = "VRDisplay" , js_name = depthFar)]
81    #[doc = "Setter for the `depthFar` field of this object."]
82    #[doc = ""]
83    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/depthFar)"]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
86    pub fn set_depth_far(this: &VrDisplay, value: f64);
87    # [wasm_bindgen (catch , method , structural , js_class = "VRDisplay" , js_name = cancelAnimationFrame)]
88    #[doc = "The `cancelAnimationFrame()` method."]
89    #[doc = ""]
90    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/cancelAnimationFrame)"]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
93    pub fn cancel_animation_frame(this: &VrDisplay, handle: i32) -> Result<(), JsValue>;
94    # [wasm_bindgen (catch , method , structural , js_class = "VRDisplay" , js_name = exitPresent)]
95    #[doc = "The `exitPresent()` method."]
96    #[doc = ""]
97    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/exitPresent)"]
98    #[doc = ""]
99    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
100    pub fn exit_present(this: &VrDisplay) -> Result<::js_sys::Promise, JsValue>;
101    #[cfg(all(feature = "VrEye", feature = "VrEyeParameters",))]
102    # [wasm_bindgen (method , structural , js_class = "VRDisplay" , js_name = getEyeParameters)]
103    #[doc = "The `getEyeParameters()` method."]
104    #[doc = ""]
105    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/getEyeParameters)"]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`, `VrEye`, `VrEyeParameters`*"]
108    pub fn get_eye_parameters(this: &VrDisplay, which_eye: VrEye) -> VrEyeParameters;
109    #[cfg(feature = "VrFrameData")]
110    # [wasm_bindgen (method , structural , js_class = "VRDisplay" , js_name = getFrameData)]
111    #[doc = "The `getFrameData()` method."]
112    #[doc = ""]
113    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/getFrameData)"]
114    #[doc = ""]
115    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`, `VrFrameData`*"]
116    pub fn get_frame_data(this: &VrDisplay, frame_data: &VrFrameData) -> bool;
117    # [wasm_bindgen (method , structural , js_class = "VRDisplay" , js_name = getLayers)]
118    #[doc = "The `getLayers()` method."]
119    #[doc = ""]
120    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/getLayers)"]
121    #[doc = ""]
122    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
123    pub fn get_layers(this: &VrDisplay) -> ::js_sys::Array;
124    #[cfg(feature = "VrPose")]
125    # [wasm_bindgen (method , structural , js_class = "VRDisplay" , js_name = getPose)]
126    #[doc = "The `getPose()` method."]
127    #[doc = ""]
128    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/getPose)"]
129    #[doc = ""]
130    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`, `VrPose`*"]
131    pub fn get_pose(this: &VrDisplay) -> VrPose;
132    #[cfg(feature = "VrSubmitFrameResult")]
133    # [wasm_bindgen (method , structural , js_class = "VRDisplay" , js_name = getSubmitFrameResult)]
134    #[doc = "The `getSubmitFrameResult()` method."]
135    #[doc = ""]
136    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/getSubmitFrameResult)"]
137    #[doc = ""]
138    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`, `VrSubmitFrameResult`*"]
139    pub fn get_submit_frame_result(this: &VrDisplay, result: &VrSubmitFrameResult) -> bool;
140    # [wasm_bindgen (catch , method , structural , js_class = "VRDisplay" , js_name = requestAnimationFrame)]
141    #[doc = "The `requestAnimationFrame()` method."]
142    #[doc = ""]
143    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/requestAnimationFrame)"]
144    #[doc = ""]
145    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
146    pub fn request_animation_frame(
147        this: &VrDisplay,
148        callback: &::js_sys::Function,
149    ) -> Result<i32, JsValue>;
150    # [wasm_bindgen (catch , method , structural , js_class = "VRDisplay" , js_name = requestPresent)]
151    #[doc = "The `requestPresent()` method."]
152    #[doc = ""]
153    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/requestPresent)"]
154    #[doc = ""]
155    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
156    pub fn request_present(
157        this: &VrDisplay,
158        layers: &::wasm_bindgen::JsValue,
159    ) -> Result<::js_sys::Promise, JsValue>;
160    # [wasm_bindgen (method , structural , js_class = "VRDisplay" , js_name = resetPose)]
161    #[doc = "The `resetPose()` method."]
162    #[doc = ""]
163    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/resetPose)"]
164    #[doc = ""]
165    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
166    pub fn reset_pose(this: &VrDisplay);
167    # [wasm_bindgen (method , structural , js_class = "VRDisplay" , js_name = submitFrame)]
168    #[doc = "The `submitFrame()` method."]
169    #[doc = ""]
170    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/submitFrame)"]
171    #[doc = ""]
172    #[doc = "*This API requires the following crate features to be activated: `VrDisplay`*"]
173    pub fn submit_frame(this: &VrDisplay);
174}