Skip to main content

web_sys/features/
gen_SpeechSynthesis.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 = "EventTarget",
9        extends = "::js_sys::Object",
10        js_name = "SpeechSynthesis",
11        typescript_type = "SpeechSynthesis"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `SpeechSynthesis` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
19    pub type SpeechSynthesis;
20    #[wasm_bindgen(method, getter, js_class = "SpeechSynthesis", js_name = "pending")]
21    #[doc = "Getter for the `pending` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/pending)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
26    pub fn pending(this: &SpeechSynthesis) -> bool;
27    #[wasm_bindgen(method, getter, js_class = "SpeechSynthesis", js_name = "speaking")]
28    #[doc = "Getter for the `speaking` field of this object."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/speaking)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
33    pub fn speaking(this: &SpeechSynthesis) -> bool;
34    #[wasm_bindgen(method, getter, js_class = "SpeechSynthesis", js_name = "paused")]
35    #[doc = "Getter for the `paused` field of this object."]
36    #[doc = ""]
37    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/paused)"]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
40    pub fn paused(this: &SpeechSynthesis) -> bool;
41    #[wasm_bindgen(
42        method,
43        getter,
44        js_class = "SpeechSynthesis",
45        js_name = "onvoiceschanged"
46    )]
47    #[doc = "Getter for the `onvoiceschanged` field of this object."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/onvoiceschanged)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
52    pub fn onvoiceschanged(this: &SpeechSynthesis) -> Option<::js_sys::Function>;
53    #[wasm_bindgen(
54        method,
55        setter,
56        js_class = "SpeechSynthesis",
57        js_name = "onvoiceschanged"
58    )]
59    #[doc = "Setter for the `onvoiceschanged` field of this object."]
60    #[doc = ""]
61    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/onvoiceschanged)"]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
64    pub fn set_onvoiceschanged(this: &SpeechSynthesis, value: Option<&::js_sys::Function>);
65    #[wasm_bindgen(method, js_class = "SpeechSynthesis")]
66    #[doc = "The `cancel()` method."]
67    #[doc = ""]
68    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/cancel)"]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
71    pub fn cancel(this: &SpeechSynthesis);
72    #[wasm_bindgen(method, js_class = "SpeechSynthesis", js_name = "getVoices")]
73    #[doc = "The `getVoices()` method."]
74    #[doc = ""]
75    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/getVoices)"]
76    #[doc = ""]
77    #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
78    pub fn get_voices(this: &SpeechSynthesis) -> ::js_sys::Array;
79    #[wasm_bindgen(method, js_class = "SpeechSynthesis")]
80    #[doc = "The `pause()` method."]
81    #[doc = ""]
82    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/pause)"]
83    #[doc = ""]
84    #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
85    pub fn pause(this: &SpeechSynthesis);
86    #[wasm_bindgen(method, js_class = "SpeechSynthesis")]
87    #[doc = "The `resume()` method."]
88    #[doc = ""]
89    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/resume)"]
90    #[doc = ""]
91    #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
92    pub fn resume(this: &SpeechSynthesis);
93    #[cfg(feature = "SpeechSynthesisUtterance")]
94    #[wasm_bindgen(method, js_class = "SpeechSynthesis")]
95    #[doc = "The `speak()` method."]
96    #[doc = ""]
97    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/speak)"]
98    #[doc = ""]
99    #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`, `SpeechSynthesisUtterance`*"]
100    pub fn speak(this: &SpeechSynthesis, utterance: &SpeechSynthesisUtterance);
101}