Skip to main content

web_sys/features/
gen_VttRegion.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "::js_sys::Object",
9        js_name = "VTTRegion",
10        typescript_type = "VTTRegion"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `VttRegion` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
18    pub type VttRegion;
19    #[wasm_bindgen(method, getter, js_class = "VTTRegion", js_name = "id")]
20    #[doc = "Getter for the `id` field of this object."]
21    #[doc = ""]
22    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/id)"]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
25    pub fn id(this: &VttRegion) -> ::alloc::string::String;
26    #[wasm_bindgen(method, setter, js_class = "VTTRegion", js_name = "id")]
27    #[doc = "Setter for the `id` field of this object."]
28    #[doc = ""]
29    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/id)"]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
32    pub fn set_id(this: &VttRegion, value: &str);
33    #[wasm_bindgen(method, getter, js_class = "VTTRegion", js_name = "width")]
34    #[doc = "Getter for the `width` field of this object."]
35    #[doc = ""]
36    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/width)"]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
39    pub fn width(this: &VttRegion) -> f64;
40    #[wasm_bindgen(method, setter, js_class = "VTTRegion", js_name = "width")]
41    #[doc = "Setter for the `width` field of this object."]
42    #[doc = ""]
43    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/width)"]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
46    pub fn set_width(this: &VttRegion, value: f64);
47    #[wasm_bindgen(method, getter, js_class = "VTTRegion", js_name = "lines")]
48    #[doc = "Getter for the `lines` field of this object."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/lines)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
53    pub fn lines(this: &VttRegion) -> i32;
54    #[wasm_bindgen(method, setter, js_class = "VTTRegion", js_name = "lines")]
55    #[doc = "Setter for the `lines` field of this object."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/lines)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
60    pub fn set_lines(this: &VttRegion, value: i32);
61    #[wasm_bindgen(method, getter, js_class = "VTTRegion", js_name = "regionAnchorX")]
62    #[doc = "Getter for the `regionAnchorX` field of this object."]
63    #[doc = ""]
64    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/regionAnchorX)"]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
67    pub fn region_anchor_x(this: &VttRegion) -> f64;
68    #[wasm_bindgen(method, setter, js_class = "VTTRegion", js_name = "regionAnchorX")]
69    #[doc = "Setter for the `regionAnchorX` field of this object."]
70    #[doc = ""]
71    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/regionAnchorX)"]
72    #[doc = ""]
73    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
74    pub fn set_region_anchor_x(this: &VttRegion, value: f64);
75    #[wasm_bindgen(method, getter, js_class = "VTTRegion", js_name = "regionAnchorY")]
76    #[doc = "Getter for the `regionAnchorY` field of this object."]
77    #[doc = ""]
78    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/regionAnchorY)"]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
81    pub fn region_anchor_y(this: &VttRegion) -> f64;
82    #[wasm_bindgen(method, setter, js_class = "VTTRegion", js_name = "regionAnchorY")]
83    #[doc = "Setter for the `regionAnchorY` field of this object."]
84    #[doc = ""]
85    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/regionAnchorY)"]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
88    pub fn set_region_anchor_y(this: &VttRegion, value: f64);
89    #[wasm_bindgen(method, getter, js_class = "VTTRegion", js_name = "viewportAnchorX")]
90    #[doc = "Getter for the `viewportAnchorX` field of this object."]
91    #[doc = ""]
92    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/viewportAnchorX)"]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
95    pub fn viewport_anchor_x(this: &VttRegion) -> f64;
96    #[wasm_bindgen(method, setter, js_class = "VTTRegion", js_name = "viewportAnchorX")]
97    #[doc = "Setter for the `viewportAnchorX` field of this object."]
98    #[doc = ""]
99    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/viewportAnchorX)"]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
102    pub fn set_viewport_anchor_x(this: &VttRegion, value: f64);
103    #[wasm_bindgen(method, getter, js_class = "VTTRegion", js_name = "viewportAnchorY")]
104    #[doc = "Getter for the `viewportAnchorY` field of this object."]
105    #[doc = ""]
106    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/viewportAnchorY)"]
107    #[doc = ""]
108    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
109    pub fn viewport_anchor_y(this: &VttRegion) -> f64;
110    #[wasm_bindgen(method, setter, js_class = "VTTRegion", js_name = "viewportAnchorY")]
111    #[doc = "Setter for the `viewportAnchorY` field of this object."]
112    #[doc = ""]
113    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/viewportAnchorY)"]
114    #[doc = ""]
115    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
116    pub fn set_viewport_anchor_y(this: &VttRegion, value: f64);
117    #[cfg(feature = "ScrollSetting")]
118    #[wasm_bindgen(method, getter, js_class = "VTTRegion", js_name = "scroll")]
119    #[doc = "Getter for the `scroll` field of this object."]
120    #[doc = ""]
121    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/scroll)"]
122    #[doc = ""]
123    #[doc = "*This API requires the following crate features to be activated: `ScrollSetting`, `VttRegion`*"]
124    pub fn scroll(this: &VttRegion) -> ScrollSetting;
125    #[cfg(feature = "ScrollSetting")]
126    #[wasm_bindgen(method, setter, js_class = "VTTRegion", js_name = "scroll")]
127    #[doc = "Setter for the `scroll` field of this object."]
128    #[doc = ""]
129    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/scroll)"]
130    #[doc = ""]
131    #[doc = "*This API requires the following crate features to be activated: `ScrollSetting`, `VttRegion`*"]
132    pub fn set_scroll(this: &VttRegion, value: ScrollSetting);
133    #[wasm_bindgen(catch, constructor, js_class = "VTTRegion")]
134    #[doc = "The `new VttRegion(..)` constructor, creating a new instance of `VttRegion`."]
135    #[doc = ""]
136    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTRegion/VTTRegion)"]
137    #[doc = ""]
138    #[doc = "*This API requires the following crate features to be activated: `VttRegion`*"]
139    pub fn new() -> Result<VttRegion, JsValue>;
140}