Struct xpcom::interfaces::mozITXTToHTMLConv
[−]
[src]
#[repr(C)]pub struct mozITXTToHTMLConv { /* fields omitted */ }
interface mozITXTToHTMLConv : nsIStreamConverter
Methods
impl mozITXTToHTMLConv
[src]
pub fn coerce<T: mozITXTToHTMLConvCoerce>(&self) -> &T
[src]
Cast this mozITXTToHTMLConv
to one of its base interfaces.
impl mozITXTToHTMLConv
[src]
pub const kEntities: i64
kEntities: i64 = 0
pub const kURLs: i64
kURLs: i64 = 2
pub const kGlyphSubstitution: i64
kGlyphSubstitution: i64 = 4
pub const kStructPhrase: i64
kStructPhrase: i64 = 8
pub unsafe fn ScanTXT(
&self,
text: *const int16_t,
whattodo: uint32_t,
_retval: *mut *const int16_t
) -> nsresult
[src]
&self,
text: *const int16_t,
whattodo: uint32_t,
_retval: *mut *const int16_t
) -> nsresult
/**
@param text: plain text to scan. May be a line, paragraph (recommended)
or just a substring.<p>
Must be non-escaped, pure unicode.<p>
<em>Note:</em> ScanTXT(a, o) + ScanTXT(b, o) may be !=
Scan(a + b, o)
@param whattodo: Bitfield describing the modes of operation
@result "<", ">" and "&" are escaped and HTML tags are inserted where
appropriate.
*/
wstring scanTXT (in wstring text, in unsigned long whattodo);
pub unsafe fn ScanHTML(
&self,
text: *const int16_t,
whattodo: uint32_t,
_retval: *mut *const int16_t
) -> nsresult
[src]
&self,
text: *const int16_t,
whattodo: uint32_t,
_retval: *mut *const int16_t
) -> nsresult
/**
Adds additional formatting to user edited text, that the user was too lazy
or "unknowledged" (DELETEME: is that a word?) to make.
<p>
<em>Note:</em> Don't use kGlyphSubstitution with this function. This option
generates tags, that are unuseable for UAs other than Mozilla. This would
be a data loss bug.
@param text: HTML source to scan. May be a line, paragraph (recommended)
or just a substring.<p>
Must be correct HTML. "<", ">" and "&" must be escaped,
other chars must be pure unicode.<p>
<em>Note:</em> ScanTXT(a, o) + ScanTXT(b, o) may be !=
Scan(a + b, o)
@param whattodo: Bitfield describing the modes of operation
@result Additional HTML tags are inserted where appropriate.
*/
wstring scanHTML (in wstring text, in unsigned long whattodo);
pub unsafe fn CiteLevelTXT(
&self,
line: *const int16_t,
logLineStart: *mut uint32_t,
_retval: *mut uint32_t
) -> nsresult
[src]
&self,
line: *const int16_t,
logLineStart: *mut uint32_t,
_retval: *mut uint32_t
) -> nsresult
/**
@param line: line in original msg, possibly starting starting with
txt quote tags like ">"
@param logLineStart: pos in line, where the real content (logical line)
begins, i.e. pos after all txt quote tags.
E.g. position of "t" in "> > text".
Initial value must be 0, unless line is not real line.
@return Cite Level, i.e. number of txt quote tags found, i.e. number of
nested quotes.
*/
unsigned long citeLevelTXT (in wstring line, out unsigned long logLineStart);
pub unsafe fn FindURLInPlaintext(
&self,
text: *const int16_t,
aLength: int32_t,
aPos: int32_t,
aStartPos: *mut int32_t,
aEndPos: *mut int32_t
) -> nsresult
[src]
&self,
text: *const int16_t,
aLength: int32_t,
aPos: int32_t,
aStartPos: *mut int32_t,
aEndPos: *mut int32_t
) -> nsresult
/**
@param a wide string to scan for the presence of a URL.
@param aLength --> the length of the buffer to be scanned
@param aPos --> the position in the buffer to start scanning for a url
aStartPos --> index into the start of a url (-1 if no url found)
aEndPos --> index of the last character in the url (-1 if no url found)
*/
void findURLInPlaintext (in wstring text, in long aLength, in long aPos, out long aStartPos, out long aEndPos);
Methods from Deref<Target = nsIStreamConverter>
pub fn coerce<T: nsIStreamConverterCoerce>(&self) -> &T
[src]
Cast this nsIStreamConverter
to one of its base interfaces.
pub unsafe fn Convert(
&self,
aFromStream: *const nsIInputStream,
aFromType: *const c_char,
aToType: *const c_char,
aCtxt: *const nsISupports,
_retval: *mut *const nsIInputStream
) -> nsresult
[src]
&self,
aFromStream: *const nsIInputStream,
aFromType: *const c_char,
aToType: *const c_char,
aCtxt: *const nsISupports,
_retval: *mut *const nsIInputStream
) -> nsresult
/**
* <b>SYNCRONOUS VERSION</b>
* Converts a stream of one type, to a stream of another type.
*
* Use this method when you have a stream you want to convert.
*
* @param aFromStream The stream representing the original/raw data.
* @param aFromType The MIME type of aFromStream.
* @param aToType The MIME type of the returned stream.
* @param aCtxt Either an opaque context, or a converter specific context
* (implementation specific).
* @return The converted stream. NOTE: The returned stream may not
* already be converted. An efficient stream converter
* implementation will converter data on demand rather than
* buffering the converted data until it is used.
*/
nsIInputStream convert (in nsIInputStream aFromStream, in string aFromType, in string aToType, in nsISupports aCtxt);
pub unsafe fn AsyncConvertData(
&self,
aFromType: *const c_char,
aToType: *const c_char,
aListener: *const nsIStreamListener,
aCtxt: *const nsISupports
) -> nsresult
[src]
&self,
aFromType: *const c_char,
aToType: *const c_char,
aListener: *const nsIStreamListener,
aCtxt: *const nsISupports
) -> nsresult
/**
* <b>ASYNCRONOUS VERSION</b>
* Converts data arriving via the converter's nsIStreamListener::OnDataAvailable()
* method from one type to another, pushing the converted data out to the caller
* via aListener::OnDataAvailable().
*
* Use this method when you want to proxy (and convert) nsIStreamListener callbacks
* asynchronously.
*
* @param aFromType The MIME type of the original/raw data.
* @param aToType The MIME type of the converted data.
* @param aListener The listener who receives the converted data.
* @param aCtxt Either an opaque context, or a converter specific context
* (implementation specific).
*/
void asyncConvertData (in string aFromType, in string aToType, in nsIStreamListener aListener, in nsISupports aCtxt);
Trait Implementations
impl XpCom for mozITXTToHTMLConv
[src]
const IID: nsIID
IID: nsIID = nsID(2009130026, 7634, 4530, [142, 191, 237, 198, 96, 111, 47, 75])
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 mozITXTToHTMLConv
[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 mozITXTToHTMLConv
[src]
type Target = nsIStreamConverter
The resulting type after dereferencing.
fn deref(&self) -> &nsIStreamConverter
[src]
Dereferences the value.