Struct xpcom::interfaces::nsIDocumentEncoder
[−]
[src]
#[repr(C)]pub struct nsIDocumentEncoder { /* fields omitted */ }
interface nsIDocumentEncoder : nsISupports
Methods
impl nsIDocumentEncoder
[src]
pub fn coerce<T: nsIDocumentEncoderCoerce>(&self) -> &T
[src]
Cast this nsIDocumentEncoder
to one of its base interfaces.
impl nsIDocumentEncoder
[src]
pub const OutputSelectionOnly: i64
OutputSelectionOnly: i64 = 1
/**
* Output only the selection (as opposed to the whole document).
*/
pub const OutputFormatted: i64
OutputFormatted: i64 = 2
/** Plaintext output: Convert html to plaintext that looks like the html.
* Implies wrap (except inside <pre>), since html wraps.
* HTML, XHTML and XML output: do prettyprinting, ignoring existing formatting.
* XML output : it doesn't implicitly wrap
*/
pub const OutputRaw: i64
OutputRaw: i64 = 4
/** Don't do prettyprinting. Don't do any wrapping that's not in the existing
* HTML/XML source. This option overrides OutputFormatted if both are set.
* HTML/XHTML output: If neither are set, there won't be prettyprinting too, but
* long lines will be wrapped.
* Supported also in XML and Plaintext output.
* @note This option does not affect entity conversion.
*/
pub const OutputBodyOnly: i64
OutputBodyOnly: i64 = 8
/**
* Do not print html head tags.
* XHTML/HTML output only.
*/
pub const OutputPreformatted: i64
OutputPreformatted: i64 = 16
/**
* Output as though the content is preformatted
* (e.g. maybe it's wrapped in a PRE or PRE_WRAP style tag)
* Plaintext output only.
* XXXbz How does this interact with
* OutputFormatted/OutputRaw/OutputPreformatted/OutputFormatFlowed?
*/
pub const OutputWrap: i64
OutputWrap: i64 = 32
/**
* Wrap even if we're not doing formatted output (e.g. for text fields).
* Supported in XML, XHTML, HTML and Plaintext output.
* Set implicitly in HTML/XHTML output when no OutputRaw.
* Ignored when OutputRaw.
* XXXLJ: set implicitly in HTML/XHTML output, to keep compatible behaviors
* for old callers of this interface
* XXXbz How does this interact with OutputFormatFlowed?
*/
pub const OutputFormatFlowed: i64
OutputFormatFlowed: i64 = 64
/**
* Output for format flowed (RFC 2646). This is used when converting
* to text for mail sending. This differs just slightly
* but in an important way from normal formatted, and that is that
* lines are space stuffed. This can't (correctly) be done later.
* PlainText output only.
* XXXbz How does this interact with
* OutputFormatted/OutputRaw/OutputPreformatted/OutputWrap?
*/
pub const OutputAbsoluteLinks: i64
OutputAbsoluteLinks: i64 = 128
/**
* Convert links, image src, and script src to absolute URLs when possible.
* XHTML/HTML output only.
*/
pub const OutputCRLineBreak: i64
OutputCRLineBreak: i64 = 512
/**
* LineBreak processing: if this flag is set than CR line breaks will
* be written. If neither this nor OutputLFLineBreak is set, then we
* will use platform line breaks. The combination of the two flags will
* cause CRLF line breaks to be written.
*/
pub const OutputLFLineBreak: i64
OutputLFLineBreak: i64 = 1024
/**
* LineBreak processing: if this flag is set than LF line breaks will
* be written. If neither this nor OutputCRLineBreak is set, then we
* will use platform line breaks. The combination of the two flags will
* cause CRLF line breaks to be written.
*/
pub const OutputNoScriptContent: i64
OutputNoScriptContent: i64 = 2048
/**
* Output the content of noscript elements (only for serializing
* to plaintext).
*/
pub const OutputNoFramesContent: i64
OutputNoFramesContent: i64 = 4096
/**
* Output the content of noframes elements (only for serializing
* to plaintext). (Used only internally in the plain text serializer;
* ignored if passed by the caller.)
*/
pub const OutputNoFormattingInPre: i64
OutputNoFormattingInPre: i64 = 8192
/**
* Don't allow any formatting nodes (e.g. <br>, <b>) inside a <pre>.
* This is used primarily by mail. XHTML/HTML output only.
*/
pub const OutputEncodeBasicEntities: i64
OutputEncodeBasicEntities: i64 = 16384
/**
* Encode entities when outputting to a string.
* E.g. If set, we'll output if clear, we'll output 0xa0.
* The basic set is just & < > " for interoperability
* with older products that don't support α and friends.
* HTML output only.
*/
pub const OutputPersistNBSP: i64
OutputPersistNBSP: i64 = 131072
/**
* Normally is replaced with a space character when
* encoding data as plain text, set this flag if that's
* not desired.
* Plaintext output only.
*/
pub const OutputDontRewriteEncodingDeclaration: i64
OutputDontRewriteEncodingDeclaration: i64 = 262144
/**
* Normally when serializing the whole document using the HTML or
* XHTML serializer, the encoding declaration is rewritten to match.
* This flag suppresses that behavior.
*/
pub const SkipInvisibleContent: i64
SkipInvisibleContent: i64 = 524288
/**
* When using the HTML or XHTML serializer, skip elements that are not
* visible when this flag is set. Elements are not visible when they
* have CSS style display:none or visibility:collapse, for example.
*/
pub const OutputFormatDelSp: i64
OutputFormatDelSp: i64 = 1048576
/**
* Output for delsp=yes (RFC 3676). This is used with OutputFormatFlowed
* when converting to text for mail sending.
* PlainText output only.
*/
pub const OutputDropInvisibleBreak: i64
OutputDropInvisibleBreak: i64 = 2097152
/**
* Drop <br> elements considered "invisible" by the editor. OutputPreformatted
* implies this flag.
*/
pub const OutputIgnoreMozDirty: i64
OutputIgnoreMozDirty: i64 = 4194304
/**
* Don't check for _moz_dirty attributes when deciding whether to
* pretty-print if this flag is set (bug 599983).
*/
pub const OutputNonTextContentAsPlaceholder: i64
OutputNonTextContentAsPlaceholder: i64 = 8388608
/**
* Output the content of non-text elements as the placehodler character
* U+FFFC (OBJECT REPLACEMENT CHARACTER, only for serializing to plaintext).
*/
pub const OutputDontRemoveLineEndingSpaces: i64
OutputDontRemoveLineEndingSpaces: i64 = 16777216
/**
* Don't Strip ending spaces from a line (only for serializing to plaintext).
*/
pub const OutputForPlainTextClipboardCopy: i64
OutputForPlainTextClipboardCopy: i64 = 33554432
/**
* Serialize in a way that is suitable for copying a plaintext version of the
* document to the clipboard. This can for example cause line endings to be
* injected at preformatted block element boundaries.
*/
pub const OutputRubyAnnotation: i64
OutputRubyAnnotation: i64 = 67108864
/**
* Include ruby annotations and ruby parentheses in the output.
* PlainText output only.
*/
pub const OutputDisallowLineBreaking: i64
OutputDisallowLineBreaking: i64 = 134217728
/**
* Disallow breaking of long character strings. This is important
* for serializing e-mail which contains CJK strings. These must
* not be broken just as "normal" longs strings aren't broken.
*/
pub const RequiresReinitAfterOutput: i64
RequiresReinitAfterOutput: i64 = 268435456
/**
* Release reference of nsIDocument after using encodeTo* method to recycle
* this encoder without holding nsIDocument. To use this encoder again,
* we have to call init again.
*/
pub unsafe fn Init(
&self,
aDocument: *const nsIDOMDocument,
aMimeType: &nsAString,
aFlags: uint32_t
) -> nsresult
[src]
&self,
aDocument: *const nsIDOMDocument,
aMimeType: &nsAString,
aFlags: uint32_t
) -> nsresult
/**
* Initialize with a pointer to the document and the mime type.
* @param aDocument Document to encode.
* @param aMimeType MimeType to use. May also be set by SetMimeType.
* @param aFlags Flags to use while encoding. May also be set by SetFlags.
*/
void init (in nsIDOMDocument aDocument, in AString aMimeType, in unsigned long aFlags);
pub unsafe fn SetSelection(&self, aSelection: *const nsISelection) -> nsresult
[src]
/**
* If the selection is set to a non-null value, then the
* selection is used for encoding, otherwise the entire
* document is encoded.
* @param aSelection The selection to encode.
*/
void setSelection (in nsISelection aSelection);
pub unsafe fn SetRange(&self, aRange: *const nsIDOMRange) -> nsresult
[src]
/**
* If the range is set to a non-null value, then the
* range is used for encoding, otherwise the entire
* document or selection is encoded.
* @param aRange The range to encode.
*/
void setRange (in nsIDOMRange aRange);
pub unsafe fn SetNode(&self, aNode: *const nsIDOMNode) -> nsresult
[src]
/**
* If the node is set to a non-null value, then the
* node is used for encoding, otherwise the entire
* document or range or selection is encoded.
* @param aNode The node to encode.
*/
void setNode (in nsIDOMNode aNode);
pub unsafe fn SetContainerNode(&self, aContainer: *const nsIDOMNode) -> nsresult
[src]
/**
* If the container is set to a non-null value, then its
* child nodes are used for encoding, otherwise the entire
* document or range or selection or node is encoded.
* @param aContainer The node which child nodes will be encoded.
*/
void setContainerNode (in nsIDOMNode aContainer);
pub unsafe fn SetCharset(&self, aCharset: &nsACString) -> nsresult
[src]
/**
* Documents typically have an intrinsic character set,
* but if no intrinsic value is found, the platform character set
* is used. This function overrides both the intrinisc and platform
* charset.
* @param aCharset Overrides the both the intrinsic or platform
* character set when encoding the document.
*
* Possible result codes: NS_ERROR_NO_CHARSET_CONVERTER
*/
void setCharset (in ACString aCharset);
pub unsafe fn SetWrapColumn(&self, aWrapColumn: uint32_t) -> nsresult
[src]
/**
* Set a wrap column. This may have no effect in some types of encoders.
* @param aWrapColumn Column to which to wrap.
*/
void setWrapColumn (in unsigned long aWrapColumn);
pub unsafe fn GetMimeType(&self, aMimeType: &mut nsAString) -> nsresult
[src]
/**
* The mime type preferred by the encoder. This piece of api was
* added because the copy encoder may need to switch mime types on you
* if you ask it to copy html that really represents plaintext content.
* Call this AFTER Init() and SetSelection() have both been called.
*/
readonly attribute AString mimeType;
pub unsafe fn EncodeToStream(&self, aStream: *const nsIOutputStream) -> nsresult
[src]
/**
* Encode the document and send the result to the nsIOutputStream.
*
* Possible result codes are the stream errors which might have
* been encountered.
* @param aStream Stream into which to encode.
*/
void encodeToStream (in nsIOutputStream aStream);
pub unsafe fn EncodeToString(&self, _retval: &mut nsAString) -> nsresult
[src]
/**
* Encode the document into a string.
*
* @return The document encoded into a string.
*/
AString encodeToString ();
pub unsafe fn EncodeToStringWithContext(
&self,
aContextString: &mut nsAString,
aInfoString: &mut nsAString,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
aContextString: &mut nsAString,
aInfoString: &mut nsAString,
_retval: &mut nsAString
) -> nsresult
/**
* Encode the document into a string. Stores the extra context information
* into the two arguments.
* @param [OUT] aContextString The string where the parent hierarchy
* information will be stored.
* @param [OUT] aInfoString The string where extra context info will
* be stored.
* @return The document encoded as a string.
*
*/
AString encodeToStringWithContext (out AString aContextString, out AString aInfoString);
pub unsafe fn EncodeToStringWithMaxLength(
&self,
aMaxLength: uint32_t,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
aMaxLength: uint32_t,
_retval: &mut nsAString
) -> nsresult
/**
* Encode the document into a string of limited size.
* @param aMaxLength After aMaxLength characters, the encoder will stop
* encoding new data.
* Only values > 0 will be considered.
* The returned string may be slightly larger than
* aMaxLength because some serializers (eg. HTML)
* may need to close some tags after they stop
* encoding new data, or finish a line (72 columns
* by default for the plain text serializer).
*
* @return The document encoded into a string.
*/
AString encodeToStringWithMaxLength (in unsigned long aMaxLength);
pub unsafe fn SetNodeFixup(
&self,
aFixup: *const nsIDocumentEncoderNodeFixup
) -> nsresult
[src]
&self,
aFixup: *const nsIDocumentEncoderNodeFixup
) -> nsresult
/**
* Set the fixup object associated with node persistence.
* @param aFixup The fixup object.
*/
void setNodeFixup (in nsIDocumentEncoderNodeFixup aFixup);
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 nsIDocumentEncoder
[src]
const IID: nsIID
IID: nsIID = nsID(569447135, 55663, 18394, [191, 203, 83, 49, 39, 48, 3, 209])
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 nsIDocumentEncoder
[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 nsIDocumentEncoder
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.