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