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