Struct xpcom::interfaces::nsIWebVTTParserWrapper
[−]
[src]
#[repr(C)]pub struct nsIWebVTTParserWrapper { /* fields omitted */ }
interface nsIWebVTTParserWrapper : nsISupports
/**
* Interface for a wrapper of a JS WebVTT parser (vtt.js).
*/
Methods
impl nsIWebVTTParserWrapper
[src]
pub fn coerce<T: nsIWebVTTParserWrapperCoerce>(&self) -> &T
[src]
Cast this nsIWebVTTParserWrapper
to one of its base interfaces.
impl nsIWebVTTParserWrapper
[src]
pub unsafe fn LoadParser(&self, window: *const mozIDOMWindow) -> nsresult
[src]
/**
* Loads the JS WebVTTParser and sets it to use the passed window to create
* VTTRegions and VTTCues. This function must be called before calling
* parse, flush, or watch.
*
* @param window The window that the parser will use to create VTTCues and
* VTTRegions.
*
*/
void loadParser (in mozIDOMWindow window);
pub unsafe fn Parse(&self, data: &nsACString) -> nsresult
[src]
/**
* Attempts to parse the stream's data as WebVTT format. When it successfully
* parses a WebVTT region or WebVTT cue it will create a VTTRegion or VTTCue
* object and pass it back to the callee through its callbacks.
*
* @param data The buffer that contains the WebVTT data received by the
* Necko consumer so far.
*/
void parse (in ACString data);
pub unsafe fn Flush(&self) -> nsresult
[src]
/**
* Flush indicates that no more data is expected from the stream. As such the
* parser should try to parse any kind of partial data it has.
*/
void flush ();
pub unsafe fn Watch(&self, callback: *const nsIWebVTTListener) -> nsresult
[src]
/**
* Set this parser object to use an nsIWebVTTListener object for its onCue
* and onRegion callbacks.
*
* @param callback The nsIWebVTTListener object that exposes onCue and
* onRegion callbacks for the parser.
*/
void watch (in nsIWebVTTListener callback);
pub unsafe fn ConvertCueToDOMTree(
&self,
window: *const mozIDOMWindow,
cue: *const nsISupports,
_retval: *mut *const nsIDOMDocumentFragment
) -> nsresult
[src]
&self,
window: *const mozIDOMWindow,
cue: *const nsISupports,
_retval: *mut *const nsIDOMDocumentFragment
) -> nsresult
/**
* Convert the text content of a WebVTT cue to a document fragment so that
* we can display it on the page.
*
* @param window A window object with which the document fragment will be
* created.
* @param cue The cue whose content will be converted to a document
* fragment.
*/
nsIDOMDocumentFragment convertCueToDOMTree (in mozIDOMWindow window, in nsISupports cue);
pub unsafe fn ProcessCues(
&self,
window: *const mozIDOMWindow,
cues: *const nsIVariant,
overlay: *const nsISupports,
controls: *const nsISupports
) -> nsresult
[src]
&self,
window: *const mozIDOMWindow,
cues: *const nsIVariant,
overlay: *const nsISupports,
controls: *const nsISupports
) -> nsresult
/**
* Compute the display state of the VTTCues in cues along with any VTTRegions
* that they might be in. First, it computes the positioning and styling of
* the cues and regions passed and converts them into a DOM tree rooted at
* a containing HTMLDivElement. It then adjusts those computed divs for
* overlap avoidance using the dimensions of 'overlay'. Finally, it adds the
* computed divs to the VTTCues display state property for use later.
*
* @param window A window object with which it will create the DOM tree
* and containing div element.
* @param cues An array of VTTCues who need there display state to be
* computed.
* @param overlay The HTMLElement that the cues will be displayed within.
* @param controls The video control element that will affect cues position.
*/
void processCues (in mozIDOMWindow window, in nsIVariant cues, in nsISupports overlay, in nsISupports controls);
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 nsIWebVTTParserWrapper
[src]
const IID: nsIID
IID: nsIID = nsID(2382233966, 5889, 17944, [159, 94, 154, 97, 84, 232, 83, 240])
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 nsIWebVTTParserWrapper
[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 nsIWebVTTParserWrapper
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.