maxcountryman_web_sys/features/
gen_VttCue.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6    # [wasm_bindgen (extends = TextTrackCue , extends = EventTarget , extends = :: js_sys :: Object , js_name = VTTCue , typescript_type = "VTTCue")]
7    #[derive(Debug, Clone, PartialEq, Eq)]
8    #[doc = "The `VttCue` class."]
9    #[doc = ""]
10    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue)"]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
13    pub type VttCue;
14    #[cfg(feature = "VttRegion")]
15    # [wasm_bindgen (structural , method , getter , js_class = "VTTCue" , js_name = region)]
16    #[doc = "Getter for the `region` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/region)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `VttCue`, `VttRegion`*"]
21    pub fn region(this: &VttCue) -> Option<VttRegion>;
22    #[cfg(feature = "VttRegion")]
23    # [wasm_bindgen (structural , method , setter , js_class = "VTTCue" , js_name = region)]
24    #[doc = "Setter for the `region` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/region)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `VttCue`, `VttRegion`*"]
29    pub fn set_region(this: &VttCue, value: Option<&VttRegion>);
30    #[cfg(feature = "DirectionSetting")]
31    # [wasm_bindgen (structural , method , getter , js_class = "VTTCue" , js_name = vertical)]
32    #[doc = "Getter for the `vertical` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/vertical)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `DirectionSetting`, `VttCue`*"]
37    pub fn vertical(this: &VttCue) -> DirectionSetting;
38    #[cfg(feature = "DirectionSetting")]
39    # [wasm_bindgen (structural , method , setter , js_class = "VTTCue" , js_name = vertical)]
40    #[doc = "Setter for the `vertical` field of this object."]
41    #[doc = ""]
42    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/vertical)"]
43    #[doc = ""]
44    #[doc = "*This API requires the following crate features to be activated: `DirectionSetting`, `VttCue`*"]
45    pub fn set_vertical(this: &VttCue, value: DirectionSetting);
46    # [wasm_bindgen (structural , method , getter , js_class = "VTTCue" , js_name = snapToLines)]
47    #[doc = "Getter for the `snapToLines` field of this object."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/snapToLines)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
52    pub fn snap_to_lines(this: &VttCue) -> bool;
53    # [wasm_bindgen (structural , method , setter , js_class = "VTTCue" , js_name = snapToLines)]
54    #[doc = "Setter for the `snapToLines` field of this object."]
55    #[doc = ""]
56    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/snapToLines)"]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
59    pub fn set_snap_to_lines(this: &VttCue, value: bool);
60    # [wasm_bindgen (structural , method , getter , js_class = "VTTCue" , js_name = line)]
61    #[doc = "Getter for the `line` field of this object."]
62    #[doc = ""]
63    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/line)"]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
66    pub fn line(this: &VttCue) -> ::wasm_bindgen::JsValue;
67    # [wasm_bindgen (structural , method , setter , js_class = "VTTCue" , js_name = line)]
68    #[doc = "Setter for the `line` field of this object."]
69    #[doc = ""]
70    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/line)"]
71    #[doc = ""]
72    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
73    pub fn set_line(this: &VttCue, value: &::wasm_bindgen::JsValue);
74    #[cfg(feature = "LineAlignSetting")]
75    # [wasm_bindgen (structural , method , getter , js_class = "VTTCue" , js_name = lineAlign)]
76    #[doc = "Getter for the `lineAlign` field of this object."]
77    #[doc = ""]
78    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/lineAlign)"]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `LineAlignSetting`, `VttCue`*"]
81    pub fn line_align(this: &VttCue) -> LineAlignSetting;
82    #[cfg(feature = "LineAlignSetting")]
83    # [wasm_bindgen (structural , method , setter , js_class = "VTTCue" , js_name = lineAlign)]
84    #[doc = "Setter for the `lineAlign` field of this object."]
85    #[doc = ""]
86    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/lineAlign)"]
87    #[doc = ""]
88    #[doc = "*This API requires the following crate features to be activated: `LineAlignSetting`, `VttCue`*"]
89    pub fn set_line_align(this: &VttCue, value: LineAlignSetting);
90    # [wasm_bindgen (structural , method , getter , js_class = "VTTCue" , js_name = position)]
91    #[doc = "Getter for the `position` field of this object."]
92    #[doc = ""]
93    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/position)"]
94    #[doc = ""]
95    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
96    pub fn position(this: &VttCue) -> ::wasm_bindgen::JsValue;
97    # [wasm_bindgen (structural , method , setter , js_class = "VTTCue" , js_name = position)]
98    #[doc = "Setter for the `position` field of this object."]
99    #[doc = ""]
100    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/position)"]
101    #[doc = ""]
102    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
103    pub fn set_position(this: &VttCue, value: &::wasm_bindgen::JsValue);
104    #[cfg(feature = "PositionAlignSetting")]
105    # [wasm_bindgen (structural , method , getter , js_class = "VTTCue" , js_name = positionAlign)]
106    #[doc = "Getter for the `positionAlign` field of this object."]
107    #[doc = ""]
108    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/positionAlign)"]
109    #[doc = ""]
110    #[doc = "*This API requires the following crate features to be activated: `PositionAlignSetting`, `VttCue`*"]
111    pub fn position_align(this: &VttCue) -> PositionAlignSetting;
112    #[cfg(feature = "PositionAlignSetting")]
113    # [wasm_bindgen (structural , method , setter , js_class = "VTTCue" , js_name = positionAlign)]
114    #[doc = "Setter for the `positionAlign` field of this object."]
115    #[doc = ""]
116    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/positionAlign)"]
117    #[doc = ""]
118    #[doc = "*This API requires the following crate features to be activated: `PositionAlignSetting`, `VttCue`*"]
119    pub fn set_position_align(this: &VttCue, value: PositionAlignSetting);
120    # [wasm_bindgen (structural , method , getter , js_class = "VTTCue" , js_name = size)]
121    #[doc = "Getter for the `size` field of this object."]
122    #[doc = ""]
123    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/size)"]
124    #[doc = ""]
125    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
126    pub fn size(this: &VttCue) -> f64;
127    # [wasm_bindgen (structural , method , setter , js_class = "VTTCue" , js_name = size)]
128    #[doc = "Setter for the `size` field of this object."]
129    #[doc = ""]
130    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/size)"]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
133    pub fn set_size(this: &VttCue, value: f64);
134    #[cfg(feature = "AlignSetting")]
135    # [wasm_bindgen (structural , method , getter , js_class = "VTTCue" , js_name = align)]
136    #[doc = "Getter for the `align` field of this object."]
137    #[doc = ""]
138    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/align)"]
139    #[doc = ""]
140    #[doc = "*This API requires the following crate features to be activated: `AlignSetting`, `VttCue`*"]
141    pub fn align(this: &VttCue) -> AlignSetting;
142    #[cfg(feature = "AlignSetting")]
143    # [wasm_bindgen (structural , method , setter , js_class = "VTTCue" , js_name = align)]
144    #[doc = "Setter for the `align` field of this object."]
145    #[doc = ""]
146    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/align)"]
147    #[doc = ""]
148    #[doc = "*This API requires the following crate features to be activated: `AlignSetting`, `VttCue`*"]
149    pub fn set_align(this: &VttCue, value: AlignSetting);
150    # [wasm_bindgen (structural , method , getter , js_class = "VTTCue" , js_name = text)]
151    #[doc = "Getter for the `text` field of this object."]
152    #[doc = ""]
153    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/text)"]
154    #[doc = ""]
155    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
156    pub fn text(this: &VttCue) -> String;
157    # [wasm_bindgen (structural , method , setter , js_class = "VTTCue" , js_name = text)]
158    #[doc = "Setter for the `text` field of this object."]
159    #[doc = ""]
160    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/text)"]
161    #[doc = ""]
162    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
163    pub fn set_text(this: &VttCue, value: &str);
164    #[wasm_bindgen(catch, constructor, js_class = "VTTCue")]
165    #[doc = "The `new VttCue(..)` constructor, creating a new instance of `VttCue`."]
166    #[doc = ""]
167    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/VTTCue)"]
168    #[doc = ""]
169    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
170    pub fn new(start_time: f64, end_time: f64, text: &str) -> Result<VttCue, JsValue>;
171    #[cfg(feature = "DocumentFragment")]
172    # [wasm_bindgen (method , structural , js_class = "VTTCue" , js_name = getCueAsHTML)]
173    #[doc = "The `getCueAsHTML()` method."]
174    #[doc = ""]
175    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/getCueAsHTML)"]
176    #[doc = ""]
177    #[doc = "*This API requires the following crate features to be activated: `DocumentFragment`, `VttCue`*"]
178    pub fn get_cue_as_html(this: &VttCue) -> DocumentFragment;
179}