Skip to main content

web_sys/features/
gen_VttCue.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 = "TextTrackCue",
9        extends = "EventTarget",
10        extends = "::js_sys::Object",
11        js_name = "VTTCue",
12        typescript_type = "VTTCue"
13    )]
14    #[derive(Debug, Clone, PartialEq, Eq)]
15    #[doc = "The `VttCue` class."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
20    pub type VttCue;
21    #[cfg(feature = "VttRegion")]
22    #[wasm_bindgen(method, getter, js_class = "VTTCue", js_name = "region")]
23    #[doc = "Getter for the `region` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/region)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `VttCue`, `VttRegion`*"]
28    pub fn region(this: &VttCue) -> Option<VttRegion>;
29    #[cfg(feature = "VttRegion")]
30    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "region")]
31    #[doc = "Setter for the `region` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/region)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `VttCue`, `VttRegion`*"]
36    pub fn set_region(this: &VttCue, value: Option<&VttRegion>);
37    #[cfg(feature = "DirectionSetting")]
38    #[wasm_bindgen(method, getter, js_class = "VTTCue", js_name = "vertical")]
39    #[doc = "Getter for the `vertical` field of this object."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/vertical)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `DirectionSetting`, `VttCue`*"]
44    pub fn vertical(this: &VttCue) -> DirectionSetting;
45    #[cfg(feature = "DirectionSetting")]
46    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "vertical")]
47    #[doc = "Setter for the `vertical` field of this object."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/vertical)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `DirectionSetting`, `VttCue`*"]
52    pub fn set_vertical(this: &VttCue, value: DirectionSetting);
53    #[wasm_bindgen(method, getter, js_class = "VTTCue", js_name = "snapToLines")]
54    #[doc = "Getter 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 snap_to_lines(this: &VttCue) -> bool;
60    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "snapToLines")]
61    #[doc = "Setter for the `snapToLines` field of this object."]
62    #[doc = ""]
63    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/snapToLines)"]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
66    pub fn set_snap_to_lines(this: &VttCue, value: bool);
67    #[wasm_bindgen(method, getter, js_class = "VTTCue", js_name = "line")]
68    #[doc = "Getter 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 line(this: &VttCue) -> ::wasm_bindgen::JsValue;
74    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "line")]
75    #[doc = "Setter for the `line` field of this object."]
76    #[doc = ""]
77    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/line)"]
78    #[doc = ""]
79    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
80    #[deprecated]
81    pub fn set_line(this: &VttCue, value: &::wasm_bindgen::JsValue);
82    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "line")]
83    #[doc = "Setter for the `line` field of this object."]
84    #[doc = ""]
85    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/line)"]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
88    pub fn set_line_f64(this: &VttCue, value: f64);
89    #[cfg(feature = "AutoKeyword")]
90    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "line")]
91    #[doc = "Setter for the `line` field of this object."]
92    #[doc = ""]
93    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/line)"]
94    #[doc = ""]
95    #[doc = "*This API requires the following crate features to be activated: `AutoKeyword`, `VttCue`*"]
96    pub fn set_line_auto_keyword(this: &VttCue, value: AutoKeyword);
97    #[cfg(feature = "LineAlignSetting")]
98    #[wasm_bindgen(method, getter, js_class = "VTTCue", js_name = "lineAlign")]
99    #[doc = "Getter for the `lineAlign` field of this object."]
100    #[doc = ""]
101    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/lineAlign)"]
102    #[doc = ""]
103    #[doc = "*This API requires the following crate features to be activated: `LineAlignSetting`, `VttCue`*"]
104    pub fn line_align(this: &VttCue) -> LineAlignSetting;
105    #[cfg(feature = "LineAlignSetting")]
106    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "lineAlign")]
107    #[doc = "Setter for the `lineAlign` field of this object."]
108    #[doc = ""]
109    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/lineAlign)"]
110    #[doc = ""]
111    #[doc = "*This API requires the following crate features to be activated: `LineAlignSetting`, `VttCue`*"]
112    pub fn set_line_align(this: &VttCue, value: LineAlignSetting);
113    #[wasm_bindgen(method, getter, js_class = "VTTCue", js_name = "position")]
114    #[doc = "Getter for the `position` field of this object."]
115    #[doc = ""]
116    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/position)"]
117    #[doc = ""]
118    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
119    pub fn position(this: &VttCue) -> ::wasm_bindgen::JsValue;
120    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "position")]
121    #[doc = "Setter for the `position` field of this object."]
122    #[doc = ""]
123    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/position)"]
124    #[doc = ""]
125    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
126    #[deprecated]
127    pub fn set_position(this: &VttCue, value: &::wasm_bindgen::JsValue);
128    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "position")]
129    #[doc = "Setter for the `position` field of this object."]
130    #[doc = ""]
131    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/position)"]
132    #[doc = ""]
133    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
134    pub fn set_position_f64(this: &VttCue, value: f64);
135    #[cfg(feature = "AutoKeyword")]
136    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "position")]
137    #[doc = "Setter for the `position` field of this object."]
138    #[doc = ""]
139    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/position)"]
140    #[doc = ""]
141    #[doc = "*This API requires the following crate features to be activated: `AutoKeyword`, `VttCue`*"]
142    pub fn set_position_auto_keyword(this: &VttCue, value: AutoKeyword);
143    #[cfg(feature = "PositionAlignSetting")]
144    #[wasm_bindgen(method, getter, js_class = "VTTCue", js_name = "positionAlign")]
145    #[doc = "Getter for the `positionAlign` field of this object."]
146    #[doc = ""]
147    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/positionAlign)"]
148    #[doc = ""]
149    #[doc = "*This API requires the following crate features to be activated: `PositionAlignSetting`, `VttCue`*"]
150    pub fn position_align(this: &VttCue) -> PositionAlignSetting;
151    #[cfg(feature = "PositionAlignSetting")]
152    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "positionAlign")]
153    #[doc = "Setter for the `positionAlign` field of this object."]
154    #[doc = ""]
155    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/positionAlign)"]
156    #[doc = ""]
157    #[doc = "*This API requires the following crate features to be activated: `PositionAlignSetting`, `VttCue`*"]
158    pub fn set_position_align(this: &VttCue, value: PositionAlignSetting);
159    #[wasm_bindgen(method, getter, js_class = "VTTCue", js_name = "size")]
160    #[doc = "Getter for the `size` field of this object."]
161    #[doc = ""]
162    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/size)"]
163    #[doc = ""]
164    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
165    pub fn size(this: &VttCue) -> f64;
166    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "size")]
167    #[doc = "Setter for the `size` field of this object."]
168    #[doc = ""]
169    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/size)"]
170    #[doc = ""]
171    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
172    pub fn set_size(this: &VttCue, value: f64);
173    #[cfg(feature = "AlignSetting")]
174    #[wasm_bindgen(method, getter, js_class = "VTTCue", js_name = "align")]
175    #[doc = "Getter for the `align` field of this object."]
176    #[doc = ""]
177    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/align)"]
178    #[doc = ""]
179    #[doc = "*This API requires the following crate features to be activated: `AlignSetting`, `VttCue`*"]
180    pub fn align(this: &VttCue) -> AlignSetting;
181    #[cfg(feature = "AlignSetting")]
182    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "align")]
183    #[doc = "Setter for the `align` field of this object."]
184    #[doc = ""]
185    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/align)"]
186    #[doc = ""]
187    #[doc = "*This API requires the following crate features to be activated: `AlignSetting`, `VttCue`*"]
188    pub fn set_align(this: &VttCue, value: AlignSetting);
189    #[wasm_bindgen(method, getter, js_class = "VTTCue", js_name = "text")]
190    #[doc = "Getter for the `text` field of this object."]
191    #[doc = ""]
192    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/text)"]
193    #[doc = ""]
194    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
195    pub fn text(this: &VttCue) -> ::alloc::string::String;
196    #[wasm_bindgen(method, setter, js_class = "VTTCue", js_name = "text")]
197    #[doc = "Setter for the `text` field of this object."]
198    #[doc = ""]
199    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/text)"]
200    #[doc = ""]
201    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
202    pub fn set_text(this: &VttCue, value: &str);
203    #[wasm_bindgen(catch, constructor, js_class = "VTTCue")]
204    #[doc = "The `new VttCue(..)` constructor, creating a new instance of `VttCue`."]
205    #[doc = ""]
206    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/VTTCue)"]
207    #[doc = ""]
208    #[doc = "*This API requires the following crate features to be activated: `VttCue`*"]
209    pub fn new(start_time: f64, end_time: f64, text: &str) -> Result<VttCue, JsValue>;
210    #[cfg(feature = "DocumentFragment")]
211    #[wasm_bindgen(method, js_class = "VTTCue", js_name = "getCueAsHTML")]
212    #[doc = "The `getCueAsHTML()` method."]
213    #[doc = ""]
214    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VTTCue/getCueAsHTML)"]
215    #[doc = ""]
216    #[doc = "*This API requires the following crate features to be activated: `DocumentFragment`, `VttCue`*"]
217    pub fn get_cue_as_html(this: &VttCue) -> DocumentFragment;
218}