Struct xpcom::interfaces::nsISpeechService
[−]
[src]
#[repr(C)]pub struct nsISpeechService { /* fields omitted */ }
interface nsISpeechService : nsISupports
/**
* The main interface of a speech synthesis service.
*
* A service is responsible for outputting audio.
* The service dispatches events, starting with dispatchStart() and ending with
* dispatchEnd or dispatchError().
* A service must also respond with the currect actions and events in response
* to implemented callback methods.
*/
Methods
impl nsISpeechService
[src]
pub fn coerce<T: nsISpeechServiceCoerce>(&self) -> &T
[src]
Cast this nsISpeechService
to one of its base interfaces.
impl nsISpeechService
[src]
pub unsafe fn Speak(
&self,
aText: &nsAString,
aUri: &nsAString,
aVolume: c_float,
aRate: c_float,
aPitch: c_float,
aTask: *const nsISpeechTask
) -> nsresult
[src]
&self,
aText: &nsAString,
aUri: &nsAString,
aVolume: c_float,
aRate: c_float,
aPitch: c_float,
aTask: *const nsISpeechTask
) -> nsresult
/**
* Speak the given text using the voice identified byu the given uri. See
* W3C Speech API spec for information about pitch and rate.
* https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#utterance-attributes
*
* @param aText text to utter.
* @param aUri unique voice identifier.
* @param aVolume volume to speak voice in. Only relevant for indirect audio.
* @param aRate rate to speak voice in.
* @param aPitch pitch to speak voice in.
* @param aTask task instance for utterance, used for sending events or audio
* data back to browser.
*/
void speak (in DOMString aText, in DOMString aUri, in float aVolume, in float aRate, in float aPitch, in nsISpeechTask aTask);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsISpeechService
[src]
const IID: nsIID
IID: nsIID = nsID(2608683483, 35071, 17360, [182, 238, 159, 99, 208, 66, 208, 143])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsISpeechService
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsISpeechService
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.