Struct xpcom::interfaces::nsIEditor
[−]
[src]
#[repr(C)]pub struct nsIEditor { /* fields omitted */ }
interface nsIEditor : nsISupports
Methods
impl nsIEditor
[src]
pub fn coerce<T: nsIEditorCoerce>(&self) -> &T
[src]
Cast this nsIEditor
to one of its base interfaces.
impl nsIEditor
[src]
pub const eNone: i64
eNone: i64 = 0
pub const eNext: i64
eNext: i64 = 1
pub const ePrevious: i64
ePrevious: i64 = 2
pub const eNextWord: i64
eNextWord: i64 = 3
pub const ePreviousWord: i64
ePreviousWord: i64 = 4
pub const eToBeginningOfLine: i64
eToBeginningOfLine: i64 = 5
pub const eToEndOfLine: i64
eToEndOfLine: i64 = 6
pub const eStrip: i64
eStrip: i64 = 0
pub const eNoStrip: i64
eNoStrip: i64 = 1
pub unsafe fn GetSelection(
&self,
aSelection: *mut *const nsISelection
) -> nsresult
[src]
&self,
aSelection: *mut *const nsISelection
) -> nsresult
readonly attribute nsISelection selection;
pub unsafe fn FinalizeSelection(&self) -> nsresult
[src]
/**
* Finalizes selection and caret for the editor.
*/
[noscript] void finalizeSelection ();
pub unsafe fn Init(
&self,
doc: *const nsIDOMDocument,
aRoot: *const nsIContent,
aSelCon: *const nsISelectionController,
aFlags: uint32_t,
initialValue: &nsAString
) -> nsresult
[src]
&self,
doc: *const nsIDOMDocument,
aRoot: *const nsIContent,
aSelCon: *const nsISelectionController,
aFlags: uint32_t,
initialValue: &nsAString
) -> nsresult
/**
* Init is to tell the implementation of nsIEditor to begin its services
* @param aDoc The dom document interface being observed
* @param aRoot This is the root of the editable section of this
* document. If it is null then we get root
* from document body.
* @param aSelCon this should be used to get the selection location
* (will be null for HTML editors)
* @param aFlags A bitmask of flags for specifying the behavior
* of the editor.
*/
[noscript] void init (in nsIDOMDocument doc, in nsIContent aRoot, in nsISelectionController aSelCon, in unsigned long aFlags, in AString initialValue);
pub unsafe fn SetAttributeOrEquivalent(
&self,
element: *const nsIDOMElement,
sourceAttrName: &nsAString,
sourceAttrValue: &nsAString,
aSuppressTransaction: bool
) -> nsresult
[src]
&self,
element: *const nsIDOMElement,
sourceAttrName: &nsAString,
sourceAttrValue: &nsAString,
aSuppressTransaction: bool
) -> nsresult
void setAttributeOrEquivalent (in nsIDOMElement element, in AString sourceAttrName, in AString sourceAttrValue, in boolean aSuppressTransaction);
pub unsafe fn RemoveAttributeOrEquivalent(
&self,
element: *const nsIDOMElement,
sourceAttrName: &nsAString,
aSuppressTransaction: bool
) -> nsresult
[src]
&self,
element: *const nsIDOMElement,
sourceAttrName: &nsAString,
aSuppressTransaction: bool
) -> nsresult
void removeAttributeOrEquivalent (in nsIDOMElement element, in DOMString sourceAttrName, in boolean aSuppressTransaction);
pub unsafe fn PostCreate(&self) -> nsresult
[src]
/**
* postCreate should be called after Init, and is the time that the editor
* tells its documentStateObservers that the document has been created.
*/
void postCreate ();
pub unsafe fn PreDestroy(&self, aDestroyingFrames: bool) -> nsresult
[src]
/**
* preDestroy is called before the editor goes away, and gives the editor a
* chance to tell its documentStateObservers that the document is going away.
* @param aDestroyingFrames set to true when the frames being edited
* are being destroyed (so there is no need to modify any nsISelections,
* nor is it safe to do so)
*/
void preDestroy (in boolean aDestroyingFrames);
pub unsafe fn GetFlags(&self, aFlags: *mut uint32_t) -> nsresult
[src]
/** edit flags for this editor. May be set at any time. */
attribute unsigned long flags;
pub unsafe fn SetFlags(&self, aFlags: uint32_t) -> nsresult
[src]
/** edit flags for this editor. May be set at any time. */
attribute unsigned long flags;
pub unsafe fn GetContentsMIMEType(
&self,
aContentsMIMEType: *mut *const c_char
) -> nsresult
[src]
&self,
aContentsMIMEType: *mut *const c_char
) -> nsresult
/**
* the MimeType of the document
*/
attribute string contentsMIMEType;
pub unsafe fn SetContentsMIMEType(
&self,
aContentsMIMEType: *const c_char
) -> nsresult
[src]
&self,
aContentsMIMEType: *const c_char
) -> nsresult
/**
* the MimeType of the document
*/
attribute string contentsMIMEType;
pub unsafe fn GetIsDocumentEditable(
&self,
aIsDocumentEditable: *mut bool
) -> nsresult
[src]
&self,
aIsDocumentEditable: *mut bool
) -> nsresult
/** Returns true if we have a document that is not marked read-only */
readonly attribute boolean isDocumentEditable;
pub unsafe fn GetIsSelectionEditable(
&self,
aIsSelectionEditable: *mut bool
) -> nsresult
[src]
&self,
aIsSelectionEditable: *mut bool
) -> nsresult
/** Returns true if the current selection anchor is editable */
readonly attribute boolean isSelectionEditable;
pub unsafe fn GetDocument(
&self,
aDocument: *mut *const nsIDOMDocument
) -> nsresult
[src]
&self,
aDocument: *mut *const nsIDOMDocument
) -> nsresult
/**
* the DOM Document this editor is associated with, refcounted.
*/
readonly attribute nsIDOMDocument document;
pub unsafe fn GetRootElement(
&self,
aRootElement: *mut *const nsIDOMElement
) -> nsresult
[src]
&self,
aRootElement: *mut *const nsIDOMElement
) -> nsresult
/** the body element, i.e. the root of the editable document.
*/
readonly attribute nsIDOMElement rootElement;
pub unsafe fn GetSelectionController(
&self,
aSelectionController: *mut *const nsISelectionController
) -> nsresult
[src]
&self,
aSelectionController: *mut *const nsISelectionController
) -> nsresult
/**
* the selection controller for the current presentation, refcounted.
*/
readonly attribute nsISelectionController selectionController;
pub unsafe fn DeleteSelection(
&self,
action: int16_t,
stripWrappers: int16_t
) -> nsresult
[src]
&self,
action: int16_t,
stripWrappers: int16_t
) -> nsresult
/**
* DeleteSelection removes all nodes in the current selection.
* @param aDir if eNext, delete to the right (for example, the DEL key)
* if ePrevious, delete to the left (for example, the BACKSPACE key)
* @param stripWrappers If eStrip, strip any empty inline elements left
* behind after the deletion; if eNoStrip, don't. If in
* doubt, pass eStrip -- eNoStrip is only for if you're
* about to insert text or similar right after.
*/
void deleteSelection (in short action, in short stripWrappers);
pub unsafe fn GetDocumentIsEmpty(&self, aDocumentIsEmpty: *mut bool) -> nsresult
[src]
/** Returns true if the document has no *meaningful* content */
readonly attribute boolean documentIsEmpty;
pub unsafe fn GetDocumentModified(
&self,
aDocumentModified: *mut bool
) -> nsresult
[src]
&self,
aDocumentModified: *mut bool
) -> nsresult
/** Returns true if the document is modifed and needs saving */
readonly attribute boolean documentModified;
pub unsafe fn GetDocumentCharacterSet(
&self,
aDocumentCharacterSet: &mut nsACString
) -> nsresult
[src]
&self,
aDocumentCharacterSet: &mut nsACString
) -> nsresult
/** Sets the current 'Save' document character set */
attribute ACString documentCharacterSet;
pub unsafe fn SetDocumentCharacterSet(
&self,
aDocumentCharacterSet: &nsACString
) -> nsresult
[src]
&self,
aDocumentCharacterSet: &nsACString
) -> nsresult
/** Sets the current 'Save' document character set */
attribute ACString documentCharacterSet;
pub unsafe fn ResetModificationCount(&self) -> nsresult
[src]
/** to be used ONLY when we need to override the doc's modification
* state (such as when it's saved).
*/
void resetModificationCount ();
pub unsafe fn GetModificationCount(&self, _retval: *mut int32_t) -> nsresult
[src]
/** Gets the modification count of the document we are editing.
* @return the modification count of the document being edited.
* Zero means unchanged.
*/
long getModificationCount ();
pub unsafe fn IncrementModificationCount(&self, aModCount: int32_t) -> nsresult
[src]
/** called each time we modify the document.
* Increments the modification count of the document.
* @param aModCount the number of modifications by which
* to increase or decrease the count
*/
void incrementModificationCount (in long aModCount);
pub unsafe fn GetTransactionManager(
&self,
aTransactionManager: *mut *const nsITransactionManager
) -> nsresult
[src]
&self,
aTransactionManager: *mut *const nsITransactionManager
) -> nsresult
/** transactionManager Get the transaction manager the editor is using.
*/
readonly attribute nsITransactionManager transactionManager;
pub unsafe fn DoTransaction(&self, txn: *const nsITransaction) -> nsresult
[src]
/** doTransaction() fires a transaction.
* It is provided here so clients can create their own transactions.
* If a transaction manager is present, it is used.
* Otherwise, the transaction is just executed directly.
*
* @param aTxn the transaction to execute
*/
void doTransaction (in nsITransaction txn);
pub unsafe fn EnableUndo(&self, enable: bool) -> nsresult
[src]
/** turn the undo system on or off
* @param aEnable if PR_TRUE, the undo system is turned on if available
* if PR_FALSE the undo system is turned off if it
* was previously on
* @return if aEnable is PR_TRUE, returns NS_OK if
* the undo system could be initialized properly
* if aEnable is PR_FALSE, returns NS_OK.
*/
void enableUndo (in boolean enable);
pub unsafe fn GetNumberOfUndoItems(
&self,
aNumberOfUndoItems: *mut int32_t
) -> nsresult
[src]
&self,
aNumberOfUndoItems: *mut int32_t
) -> nsresult
/**
* The number of items on the undo stack.
*/
readonly attribute long numberOfUndoItems;
pub unsafe fn GetNumberOfRedoItems(
&self,
aNumberOfRedoItems: *mut int32_t
) -> nsresult
[src]
&self,
aNumberOfRedoItems: *mut int32_t
) -> nsresult
/**
* The number of items on the redo stack.
*/
readonly attribute long numberOfRedoItems;
pub unsafe fn Undo(&self, count: uint32_t) -> nsresult
[src]
/** undo reverses the effects of the last Do operation,
* if Undo is enabled in the editor.
* It is provided here so clients need no knowledge of whether
* the editor has a transaction manager or not.
* If a transaction manager is present, it is told to undo,
* and the result of that undo is returned.
* Otherwise, the Undo request is ignored and an
* error NS_ERROR_NOT_AVAILABLE is returned.
*
*/
void undo (in unsigned long count);
pub unsafe fn CanUndo(
&self,
isEnabled: *mut bool,
canUndo: *mut bool
) -> nsresult
[src]
&self,
isEnabled: *mut bool,
canUndo: *mut bool
) -> nsresult
/** returns state information about the undo system.
* @param aIsEnabled [OUT] PR_TRUE if undo is enabled
* @param aCanUndo [OUT] PR_TRUE if at least one transaction is
* currently ready to be undone.
*/
void canUndo (out boolean isEnabled, out boolean canUndo);
pub unsafe fn Redo(&self, count: uint32_t) -> nsresult
[src]
/** redo reverses the effects of the last Undo operation
* It is provided here so clients need no knowledge of whether
* the editor has a transaction manager or not.
* If a transaction manager is present, it is told to redo and the
* result of the previously undone transaction is reapplied to the document.
* If no transaction is available for Redo, or if the document
* has no transaction manager, the Redo request is ignored and an
* error NS_ERROR_NOT_AVAILABLE is returned.
*
*/
void redo (in unsigned long count);
pub unsafe fn CanRedo(
&self,
isEnabled: *mut bool,
canRedo: *mut bool
) -> nsresult
[src]
&self,
isEnabled: *mut bool,
canRedo: *mut bool
) -> nsresult
/** returns state information about the redo system.
* @param aIsEnabled [OUT] PR_TRUE if redo is enabled
* @param aCanRedo [OUT] PR_TRUE if at least one transaction is
currently ready to be redone.
*/
void canRedo (out boolean isEnabled, out boolean canRedo);
pub unsafe fn BeginTransaction(&self) -> nsresult
[src]
/** beginTransaction is a signal from the caller to the editor that
* the caller will execute multiple updates to the content tree
* that should be treated as a single logical operation,
* in the most efficient way possible.<br>
* All transactions executed between a call to beginTransaction and
* endTransaction will be undoable as an atomic action.<br>
* endTransaction must be called after beginTransaction.<br>
* Calls to beginTransaction can be nested, as long as endTransaction
* is called once per beginUpdate.
*/
void beginTransaction ();
pub unsafe fn EndTransaction(&self) -> nsresult
[src]
/** endTransaction is a signal to the editor that the caller is
* finished updating the content model.<br>
* beginUpdate must be called before endTransaction is called.<br>
* Calls to beginTransaction can be nested, as long as endTransaction
* is called once per beginTransaction.
*/
void endTransaction ();
pub unsafe fn ShouldTxnSetSelection(&self, _retval: *mut bool) -> nsresult
[src]
boolean shouldTxnSetSelection ();
pub unsafe fn SetShouldTxnSetSelection(&self, should: bool) -> nsresult
[src]
/** Set the flag that prevents insertElementTxn from changing the selection
* @param should Set false to suppress changing the selection;
* i.e., before using InsertElement() to insert
* under <head> element
* WARNING: You must be very careful to reset back to PR_TRUE after
* setting PR_FALSE, else selection/caret is trashed
* for further editing.
*/
void setShouldTxnSetSelection (in boolean should);
pub unsafe fn GetInlineSpellChecker(
&self,
autoCreate: bool,
_retval: *mut *const nsIInlineSpellChecker
) -> nsresult
[src]
&self,
autoCreate: bool,
_retval: *mut *const nsIInlineSpellChecker
) -> nsresult
/** Returns the inline spell checker associated with this object. The spell
* checker is lazily created, so this function may create the object for
* you during this call.
* @param autoCreate If true, this will create a spell checker object
* if one does not exist yet for this editor. If false
* and the object has not been created, this function
* WILL RETURN NULL.
*/
nsIInlineSpellChecker getInlineSpellChecker (in boolean autoCreate);
pub unsafe fn SyncRealTimeSpell(&self) -> nsresult
[src]
/** Resyncs spellchecking state (enabled/disabled). This should be called
* when anything that affects spellchecking state changes, such as the
* spellcheck attribute value.
*/
void syncRealTimeSpell ();
pub unsafe fn SetSpellcheckUserOverride(&self, enable: bool) -> nsresult
[src]
/** Called when the user manually overrides the spellchecking state for this
* editor.
* @param enable The new state of spellchecking in this editor, as
* requested by the user.
*/
void setSpellcheckUserOverride (in boolean enable);
pub unsafe fn Cut(&self) -> nsresult
[src]
/** cut the currently selected text, putting it into the OS clipboard
* What if no text is selected?
* What about mixed selections?
* What are the clipboard formats?
*/
void cut ();
pub unsafe fn CanCut(&self, _retval: *mut bool) -> nsresult
[src]
/** Can we cut? True if the doc is modifiable, and we have a non-
* collapsed selection.
*/
boolean canCut ();
pub unsafe fn Copy(&self) -> nsresult
[src]
/** copy the currently selected text, putting it into the OS clipboard
* What if no text is selected?
* What about mixed selections?
* What are the clipboard formats?
*/
void copy ();
pub unsafe fn CanCopy(&self, _retval: *mut bool) -> nsresult
[src]
/** Can we copy? True if we have a non-collapsed selection.
*/
boolean canCopy ();
pub unsafe fn CanDelete(&self, _retval: *mut bool) -> nsresult
[src]
/** Can we delete? True if we have a non-collapsed selection.
*/
boolean canDelete ();
pub unsafe fn Paste(&self, aSelectionType: int32_t) -> nsresult
[src]
/** paste the text in the OS clipboard at the cursor position, replacing
* the selected text (if any)
*/
void paste (in long aSelectionType);
pub unsafe fn PasteTransferable(
&self,
aTransferable: *const nsITransferable
) -> nsresult
[src]
&self,
aTransferable: *const nsITransferable
) -> nsresult
/** Paste the text in |aTransferable| at the cursor position, replacing the
* selected text (if any).
*/
void pasteTransferable (in nsITransferable aTransferable);
pub unsafe fn CanPaste(
&self,
aSelectionType: int32_t,
_retval: *mut bool
) -> nsresult
[src]
&self,
aSelectionType: int32_t,
_retval: *mut bool
) -> nsresult
/** Can we paste? True if the doc is modifiable, and we have
* pasteable data in the clipboard.
*/
boolean canPaste (in long aSelectionType);
pub unsafe fn CanPasteTransferable(
&self,
aTransferable: *const nsITransferable,
_retval: *mut bool
) -> nsresult
[src]
&self,
aTransferable: *const nsITransferable,
_retval: *mut bool
) -> nsresult
/** Can we paste |aTransferable| or, if |aTransferable| is null, will a call
* to pasteTransferable later possibly succeed if given an instance of
* nsITransferable then? True if the doc is modifiable, and, if
* |aTransfeable| is non-null, we have pasteable data in |aTransfeable|.
*/
boolean canPasteTransferable ([optional] in nsITransferable aTransferable);
pub unsafe fn SelectAll(&self) -> nsresult
[src]
/** sets the document selection to the entire contents of the document */
void selectAll ();
pub unsafe fn BeginningOfDocument(&self) -> nsresult
[src]
/** sets the document selection to the beginning of the document */
void beginningOfDocument ();
pub unsafe fn EndOfDocument(&self) -> nsresult
[src]
/** sets the document selection to the end of the document */
void endOfDocument ();
pub unsafe fn SetAttribute(
&self,
aElement: *const nsIDOMElement,
attributestr: &nsAString,
attvalue: &nsAString
) -> nsresult
[src]
&self,
aElement: *const nsIDOMElement,
attributestr: &nsAString,
attvalue: &nsAString
) -> nsresult
/**
* setAttribute() sets the attribute of aElement.
* No checking is done to see if aAttribute is a legal attribute of the node,
* or if aValue is a legal value of aAttribute.
*
* @param aElement the content element to operate on
* @param aAttribute the string representation of the attribute to set
* @param aValue the value to set aAttribute to
*/
void setAttribute (in nsIDOMElement aElement, in AString attributestr, in AString attvalue);
pub unsafe fn GetAttributeValue(
&self,
aElement: *const nsIDOMElement,
attributestr: &nsAString,
resultValue: &mut nsAString,
_retval: *mut bool
) -> nsresult
[src]
&self,
aElement: *const nsIDOMElement,
attributestr: &nsAString,
resultValue: &mut nsAString,
_retval: *mut bool
) -> nsresult
/**
* getAttributeValue() retrieves the attribute's value for aElement.
*
* @param aElement the content element to operate on
* @param aAttribute the string representation of the attribute to get
* @param aResultValue [OUT] the value of aAttribute.
* Only valid if aResultIsSet is PR_TRUE
* @return PR_TRUE if aAttribute is set on the current node,
* PR_FALSE if it is not.
*/
boolean getAttributeValue (in nsIDOMElement aElement, in AString attributestr, out AString resultValue);
pub unsafe fn RemoveAttribute(
&self,
aElement: *const nsIDOMElement,
aAttribute: &nsAString
) -> nsresult
[src]
&self,
aElement: *const nsIDOMElement,
aAttribute: &nsAString
) -> nsresult
/**
* removeAttribute() deletes aAttribute from the attribute list of aElement.
* If aAttribute is not an attribute of aElement, nothing is done.
*
* @param aElement the content element to operate on
* @param aAttribute the string representation of the attribute to get
*/
void removeAttribute (in nsIDOMElement aElement, in AString aAttribute);
pub unsafe fn CloneAttribute(
&self,
aAttribute: &nsAString,
aDestNode: *const nsIDOMNode,
aSourceNode: *const nsIDOMNode
) -> nsresult
[src]
&self,
aAttribute: &nsAString,
aDestNode: *const nsIDOMNode,
aSourceNode: *const nsIDOMNode
) -> nsresult
/**
* cloneAttribute() copies the attribute from the source node to
* the destination node and delete those not in the source.
*
* The supplied nodes MUST BE ELEMENTS (most callers are working with nodes)
* @param aAttribute the name of the attribute to copy
* @param aDestNode the destination element to operate on
* @param aSourceNode the source element to copy attributes from
* @exception NS_ERROR_NULL_POINTER at least one of the nodes is null
* @exception NS_ERROR_NO_INTERFACE at least one of the nodes is not an
* element
*/
void cloneAttribute (in AString aAttribute, in nsIDOMNode aDestNode, in nsIDOMNode aSourceNode);
pub unsafe fn CloneAttributes(
&self,
destNode: *const nsIDOMNode,
sourceNode: *const nsIDOMNode
) -> nsresult
[src]
&self,
destNode: *const nsIDOMNode,
sourceNode: *const nsIDOMNode
) -> nsresult
/**
* cloneAttributes() is similar to nsIDOMNode::cloneNode(),
* it assures the attribute nodes of the destination are identical
* with the source node by copying all existing attributes from the
* source and deleting those not in the source.
* This is used when the destination node (element) already exists
*
* The supplied nodes MUST BE ELEMENTS (most callers are working with nodes)
* @param aDestNode the destination element to operate on
* @param aSourceNode the source element to copy attributes from
*/
void cloneAttributes (in nsIDOMNode destNode, in nsIDOMNode sourceNode);
pub unsafe fn InsertNode(
&self,
node: *const nsIDOMNode,
parent: *const nsIDOMNode,
aPosition: int32_t
) -> nsresult
[src]
&self,
node: *const nsIDOMNode,
parent: *const nsIDOMNode,
aPosition: int32_t
) -> nsresult
/**
* insertNode inserts aNode into aParent at aPosition.
* No checking is done to verify the legality of the insertion.
* That is the responsibility of the caller.
* @param aNode The DOM Node to insert.
* @param aParent The node to insert the new object into
* @param aPosition The place in aParent to insert the new node
* 0=first child, 1=second child, etc.
* any number > number of current children = last child
*/
void insertNode (in nsIDOMNode node, in nsIDOMNode parent, in long aPosition);
pub unsafe fn SplitNode(
&self,
existingRightNode: *const nsIDOMNode,
offset: int32_t,
newLeftNode: *mut *const nsIDOMNode
) -> nsresult
[src]
&self,
existingRightNode: *const nsIDOMNode,
offset: int32_t,
newLeftNode: *mut *const nsIDOMNode
) -> nsresult
/**
* splitNode() creates a new node identical to an existing node,
* and split the contents between the two nodes
* @param aExistingRightNode the node to split.
* It will become the new node's next sibling.
* @param aOffset the offset of aExistingRightNode's
* content|children to do the split at
* @param aNewLeftNode [OUT] the new node resulting from the split,
* becomes aExistingRightNode's previous sibling.
*/
void splitNode (in nsIDOMNode existingRightNode, in long offset, out nsIDOMNode newLeftNode);
pub unsafe fn JoinNodes(
&self,
leftNode: *const nsIDOMNode,
rightNode: *const nsIDOMNode,
parent: *const nsIDOMNode
) -> nsresult
[src]
&self,
leftNode: *const nsIDOMNode,
rightNode: *const nsIDOMNode,
parent: *const nsIDOMNode
) -> nsresult
/**
* joinNodes() takes 2 nodes and merge their content|children.
* @param aLeftNode The left node. It will be deleted.
* @param aRightNode The right node. It will remain after the join.
* @param aParent The parent of aExistingRightNode
*
* There is no requirement that the two nodes be
* of the same type. However, a text node can be
* merged only with another text node.
*/
void joinNodes (in nsIDOMNode leftNode, in nsIDOMNode rightNode, in nsIDOMNode parent);
pub unsafe fn DeleteNode(&self, child: *const nsIDOMNode) -> nsresult
[src]
/**
* deleteNode removes aChild from aParent.
* @param aChild The node to delete
*/
void deleteNode (in nsIDOMNode child);
pub unsafe fn OutputsMozDirty(&self) -> bool
[src]
/**
* Returns true if markNodeDirty() has any effect. Returns false if
* markNodeDirty() is a no-op.
*/
[notxpcom] boolean outputsMozDirty ();
pub unsafe fn MarkNodeDirty(&self, node: *const nsIDOMNode) -> nsresult
[src]
/**
* markNodeDirty() sets a special dirty attribute on the node.
* Usually this will be called immediately after creating a new node.
* @param aNode The node for which to insert formatting.
*/
void markNodeDirty (in nsIDOMNode node);
pub unsafe fn SwitchTextDirection(&self) -> nsresult
[src]
/**
* Switches the editor element direction; from "Left-to-Right" to
* "Right-to-Left", and vice versa.
*/
void switchTextDirection ();
pub unsafe fn OutputToString(
&self,
formatType: &nsAString,
flags: uint32_t,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
formatType: &nsAString,
flags: uint32_t,
_retval: &mut nsAString
) -> nsresult
/**
* Output methods:
* aFormatType is a mime type, like text/plain.
*/
AString outputToString (in AString formatType, in unsigned long flags);
pub unsafe fn OutputToStream(
&self,
aStream: *const nsIOutputStream,
formatType: &nsAString,
charsetOverride: &nsACString,
flags: uint32_t
) -> nsresult
[src]
&self,
aStream: *const nsIOutputStream,
formatType: &nsAString,
charsetOverride: &nsACString,
flags: uint32_t
) -> nsresult
void outputToStream (in nsIOutputStream aStream, in AString formatType, in ACString charsetOverride, in unsigned long flags);
pub unsafe fn AddEditorObserver(
&self,
observer: *const nsIEditorObserver
) -> nsresult
[src]
&self,
observer: *const nsIEditorObserver
) -> nsresult
/** add an EditorObserver to the editors list of observers. */
void addEditorObserver (in nsIEditorObserver observer);
pub unsafe fn RemoveEditorObserver(
&self,
observer: *const nsIEditorObserver
) -> nsresult
[src]
&self,
observer: *const nsIEditorObserver
) -> nsresult
/** Remove an EditorObserver from the editor's list of observers. */
void removeEditorObserver (in nsIEditorObserver observer);
pub unsafe fn AddEditActionListener(
&self,
listener: *const nsIEditActionListener
) -> nsresult
[src]
&self,
listener: *const nsIEditActionListener
) -> nsresult
/** add an EditActionListener to the editors list of listeners. */
void addEditActionListener (in nsIEditActionListener listener);
pub unsafe fn RemoveEditActionListener(
&self,
listener: *const nsIEditActionListener
) -> nsresult
[src]
&self,
listener: *const nsIEditActionListener
) -> nsresult
/** Remove an EditActionListener from the editor's list of listeners. */
void removeEditActionListener (in nsIEditActionListener listener);
pub unsafe fn AddDocumentStateListener(
&self,
listener: *const nsIDocumentStateListener
) -> nsresult
[src]
&self,
listener: *const nsIDocumentStateListener
) -> nsresult
/** Add a DocumentStateListener to the editors list of doc state listeners. */
void addDocumentStateListener (in nsIDocumentStateListener listener);
pub unsafe fn RemoveDocumentStateListener(
&self,
listener: *const nsIDocumentStateListener
) -> nsresult
[src]
&self,
listener: *const nsIDocumentStateListener
) -> nsresult
/** Remove a DocumentStateListener to the editors list of doc state listeners. */
void removeDocumentStateListener (in nsIDocumentStateListener listener);
pub unsafe fn DumpContentTree(&self) -> nsresult
[src]
/**
* And a debug method -- show us what the tree looks like right now
*/
void dumpContentTree ();
pub unsafe fn DebugDumpContent(&self) -> nsresult
[src]
/** Dumps a text representation of the content tree to standard out */
void debugDumpContent ();
pub unsafe fn DebugUnitTests(
&self,
outNumTests: *mut int32_t,
outNumTestsFailed: *mut int32_t
) -> nsresult
[src]
&self,
outNumTests: *mut int32_t,
outNumTestsFailed: *mut int32_t
) -> nsresult
void debugUnitTests (out long outNumTests, out long outNumTestsFailed);
pub unsafe fn IsModifiableNode(&self, aNode: *const nsIDOMNode) -> bool
[src]
[notxpcom] boolean isModifiableNode (in nsIDOMNode aNode);
pub unsafe fn GetSuppressDispatchingInputEvent(
&self,
aSuppressDispatchingInputEvent: *mut bool
) -> nsresult
[src]
&self,
aSuppressDispatchingInputEvent: *mut bool
) -> nsresult
attribute boolean suppressDispatchingInputEvent;
pub unsafe fn SetSuppressDispatchingInputEvent(
&self,
aSuppressDispatchingInputEvent: bool
) -> nsresult
[src]
&self,
aSuppressDispatchingInputEvent: bool
) -> nsresult
attribute boolean suppressDispatchingInputEvent;
pub unsafe fn GetIsInEditAction(&self, aIsInEditAction: *mut bool) -> nsresult
[src]
/**
* True if an edit action is being handled (in other words, between calls of
* nsIEditorObserver::BeforeEditAction() and nsIEditorObserver::EditAction()
* or nsIEditorObserver::CancelEditAction(). Otherwise, false.
*/
[noscript] readonly attribute boolean isInEditAction;
pub unsafe fn ForceCompositionEnd(&self) -> nsresult
[src]
/**
* forceCompositionEnd() force the composition end
*/
void forceCompositionEnd ();
pub unsafe fn GetComposing(&self, aComposing: *mut bool) -> nsresult
[src]
/**
* whether this editor has active IME transaction
*/
readonly attribute boolean composing;
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 nsIEditor
[src]
const IID: nsIID
IID: nsIID = nsID(155969060, 61631, 16399, [137, 226, 106, 132, 186, 171, 148, 116])
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 nsIEditor
[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 nsIEditor
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.