web_sys/features/
gen_VrLayer.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = VRLayer)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `VrLayer` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"]
12 pub type VrLayer;
13 #[doc = "Get the `leftBounds` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"]
16 #[wasm_bindgen(method, getter = "leftBounds")]
17 pub fn get_left_bounds(this: &VrLayer) -> Option<::js_sys::Array>;
18 #[doc = "Change the `leftBounds` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"]
21 #[wasm_bindgen(method, setter = "leftBounds")]
22 pub fn set_left_bounds(this: &VrLayer, val: &::wasm_bindgen::JsValue);
23 #[doc = "Get the `rightBounds` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"]
26 #[wasm_bindgen(method, getter = "rightBounds")]
27 pub fn get_right_bounds(this: &VrLayer) -> Option<::js_sys::Array>;
28 #[doc = "Change the `rightBounds` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"]
31 #[wasm_bindgen(method, setter = "rightBounds")]
32 pub fn set_right_bounds(this: &VrLayer, val: &::wasm_bindgen::JsValue);
33 #[cfg(feature = "HtmlCanvasElement")]
34 #[doc = "Get the `source` field of this object."]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VrLayer`*"]
37 #[wasm_bindgen(method, getter = "source")]
38 pub fn get_source(this: &VrLayer) -> Option<HtmlCanvasElement>;
39 #[cfg(feature = "HtmlCanvasElement")]
40 #[doc = "Change the `source` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VrLayer`*"]
43 #[wasm_bindgen(method, setter = "source")]
44 pub fn set_source(this: &VrLayer, val: Option<&HtmlCanvasElement>);
45}
46impl VrLayer {
47 #[doc = "Construct a new `VrLayer`."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"]
50 pub fn new() -> Self {
51 #[allow(unused_mut)]
52 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
53 ret
54 }
55 #[deprecated = "Use `set_left_bounds()` instead."]
56 pub fn left_bounds(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
57 self.set_left_bounds(val);
58 self
59 }
60 #[deprecated = "Use `set_right_bounds()` instead."]
61 pub fn right_bounds(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
62 self.set_right_bounds(val);
63 self
64 }
65 #[cfg(feature = "HtmlCanvasElement")]
66 #[deprecated = "Use `set_source()` instead."]
67 pub fn source(&mut self, val: Option<&HtmlCanvasElement>) -> &mut Self {
68 self.set_source(val);
69 self
70 }
71}
72impl Default for VrLayer {
73 fn default() -> Self {
74 Self::new()
75 }
76}