DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /home/jenkins/src/releases/comm-beta/mozilla/editor/nsIEditor.idl
 */

#ifndef __gen_nsIEditor_h__
#define __gen_nsIEditor_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#ifndef __gen_domstubs_h__
#include "domstubs.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIURI; /* forward declaration */

class nsIContent; /* forward declaration */

class nsISelectionController; /* forward declaration */

class nsIDocumentStateListener; /* forward declaration */

class nsIOutputStream; /* forward declaration */

class nsITransactionManager; /* forward declaration */

class nsITransaction; /* forward declaration */

class nsIEditorObserver; /* forward declaration */

class nsIEditActionListener; /* forward declaration */

class nsIInlineSpellChecker; /* forward declaration */

class nsITransferable; /* forward declaration */

class nsIDocument; /* webidl Document */

namespace mozilla {
namespace dom {
class Element; /* webidl Element */
} // namespace dom
} // namespace mozilla

class nsINode; /* webidl Node */

namespace mozilla {
namespace dom {
class Selection; /* webidl Selection */
} // namespace dom
} // namespace mozilla

namespace mozilla {
class EditorBase;
class HTMLEditor;
class TextEditor;
} // namespace mozilla

/* starting interface:    nsIEditor */
#define NS_IEDITOR_IID_STR "094be624-f0bf-400f-89e2-6a84baab9474"

#define NS_IEDITOR_IID \
  {0x094be624, 0xf0bf, 0x400f, \
    { 0x89, 0xe2, 0x6a, 0x84, 0xba, 0xab, 0x94, 0x74 }}

class nsIEditor : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IEDITOR_IID)

   typedef short EDirection;
  typedef short EStripWrappers;
  enum {
    eNone = 0,
    eNext = 1,
    ePrevious = 2,
    eNextWord = 3,
    ePreviousWord = 4,
    eToBeginningOfLine = 5,
    eToEndOfLine = 6,
    eStrip = 0,
    eNoStrip = 1
  };

  /* readonly attribute Selection selection; */
  NS_IMETHOD GetSelection(mozilla::dom::Selection **aSelection) = 0;

  /* void setAttributeOrEquivalent (in Element element, in AString sourceAttrName, in AString sourceAttrValue, in boolean aSuppressTransaction); */
  NS_IMETHOD SetAttributeOrEquivalent(mozilla::dom::Element *element, const nsAString& sourceAttrName, const nsAString& sourceAttrValue, bool aSuppressTransaction) = 0;

  /* void removeAttributeOrEquivalent (in Element element, in DOMString sourceAttrName, in boolean aSuppressTransaction); */
  NS_IMETHOD RemoveAttributeOrEquivalent(mozilla::dom::Element *element, const nsAString& sourceAttrName, bool aSuppressTransaction) = 0;

  /* attribute unsigned long flags; */
  NS_IMETHOD GetFlags(uint32_t *aFlags) = 0;
  NS_IMETHOD SetFlags(uint32_t aFlags) = 0;

  /* attribute string contentsMIMEType; */
  NS_IMETHOD GetContentsMIMEType(char * *aContentsMIMEType) = 0;
  NS_IMETHOD SetContentsMIMEType(const char * aContentsMIMEType) = 0;

  /* readonly attribute boolean isDocumentEditable; */
  NS_IMETHOD GetIsDocumentEditable(bool *aIsDocumentEditable) = 0;

  /* readonly attribute boolean isSelectionEditable; */
  NS_IMETHOD GetIsSelectionEditable(bool *aIsSelectionEditable) = 0;

  /* readonly attribute Document document; */
  NS_IMETHOD GetDocument(nsIDocument **aDocument) = 0;

  /* readonly attribute Element rootElement; */
  NS_IMETHOD GetRootElement(mozilla::dom::Element **aRootElement) = 0;

  /* readonly attribute nsISelectionController selectionController; */
  NS_IMETHOD GetSelectionController(nsISelectionController **aSelectionController) = 0;

  /* void deleteSelection (in short action, in short stripWrappers); */
  NS_IMETHOD DeleteSelection(int16_t action, int16_t stripWrappers) = 0;

  /* readonly attribute boolean documentIsEmpty; */
  NS_IMETHOD GetDocumentIsEmpty(bool *aDocumentIsEmpty) = 0;

  /* readonly attribute boolean documentModified; */
  NS_IMETHOD GetDocumentModified(bool *aDocumentModified) = 0;

  /* attribute ACString documentCharacterSet; */
  NS_IMETHOD GetDocumentCharacterSet(nsACString& aDocumentCharacterSet) = 0;
  NS_IMETHOD SetDocumentCharacterSet(const nsACString& aDocumentCharacterSet) = 0;

  /* void resetModificationCount (); */
  NS_IMETHOD ResetModificationCount(void) = 0;

  /* long getModificationCount (); */
  NS_IMETHOD GetModificationCount(int32_t *_retval) = 0;

  /* void incrementModificationCount (in long aModCount); */
  NS_IMETHOD IncrementModificationCount(int32_t aModCount) = 0;

  /* readonly attribute nsITransactionManager transactionManager; */
  NS_IMETHOD GetTransactionManager(nsITransactionManager **aTransactionManager) = 0;

  /* void doTransaction (in nsITransaction txn); */
  NS_IMETHOD DoTransaction(nsITransaction *txn) = 0;

  /* void enableUndo (in boolean enable); */
  NS_IMETHOD EnableUndo(bool enable) = 0;

  /* void undo (in unsigned long count); */
  NS_IMETHOD Undo(uint32_t count) = 0;

  /* void canUndo (out boolean isEnabled, out boolean canUndo); */
  NS_IMETHOD CanUndo(bool *isEnabled, bool *canUndo) = 0;

  /* void redo (in unsigned long count); */
  NS_IMETHOD Redo(uint32_t count) = 0;

  /* void canRedo (out boolean isEnabled, out boolean canRedo); */
  NS_IMETHOD CanRedo(bool *isEnabled, bool *canRedo) = 0;

  /* void beginTransaction (); */
  NS_IMETHOD BeginTransaction(void) = 0;

  /* void endTransaction (); */
  NS_IMETHOD EndTransaction(void) = 0;

  /* void setShouldTxnSetSelection (in boolean should); */
  NS_IMETHOD SetShouldTxnSetSelection(bool should) = 0;

  /* nsIInlineSpellChecker getInlineSpellChecker (in boolean autoCreate); */
  NS_IMETHOD GetInlineSpellChecker(bool autoCreate, nsIInlineSpellChecker **_retval) = 0;

  /* void setSpellcheckUserOverride (in boolean enable); */
  NS_IMETHOD SetSpellcheckUserOverride(bool enable) = 0;

  /* void cut (); */
  NS_IMETHOD Cut(void) = 0;

  /* boolean canCut (); */
  NS_IMETHOD CanCut(bool *_retval) = 0;

  /* void copy (); */
  NS_IMETHOD Copy(void) = 0;

  /* boolean canCopy (); */
  NS_IMETHOD CanCopy(bool *_retval) = 0;

  /* boolean canDelete (); */
  NS_IMETHOD CanDelete(bool *_retval) = 0;

  /* void paste (in long aSelectionType); */
  NS_IMETHOD Paste(int32_t aSelectionType) = 0;

  /* void pasteTransferable (in nsITransferable aTransferable); */
  NS_IMETHOD PasteTransferable(nsITransferable *aTransferable) = 0;

  /* boolean canPaste (in long aSelectionType); */
  NS_IMETHOD CanPaste(int32_t aSelectionType, bool *_retval) = 0;

  /* void selectAll (); */
  NS_IMETHOD SelectAll(void) = 0;

  /* void beginningOfDocument (); */
  NS_IMETHOD BeginningOfDocument(void) = 0;

  /* void endOfDocument (); */
  NS_IMETHOD EndOfDocument(void) = 0;

  /* void setAttribute (in Element aElement, in AString attributestr, in AString attvalue); */
  NS_IMETHOD SetAttribute(mozilla::dom::Element *aElement, const nsAString& attributestr, const nsAString& attvalue) = 0;

  /* boolean getAttributeValue (in Element aElement, in AString attributestr, out AString resultValue); */
  NS_IMETHOD GetAttributeValue(mozilla::dom::Element *aElement, const nsAString& attributestr, nsAString& resultValue, bool *_retval) = 0;

  /* void removeAttribute (in Element aElement, in AString aAttribute); */
  NS_IMETHOD RemoveAttribute(mozilla::dom::Element *aElement, const nsAString& aAttribute) = 0;

  /* void cloneAttribute (in AString aAttribute, in Element aDestElement, in Element aSourceElement); */
  NS_IMETHOD CloneAttribute(const nsAString& aAttribute, mozilla::dom::Element *aDestElement, mozilla::dom::Element *aSourceElement) = 0;

  /* void cloneAttributes (in Element aDestElement, in Element aSourceElement); */
  NS_IMETHOD CloneAttributes(mozilla::dom::Element *aDestElement, mozilla::dom::Element *aSourceElement) = 0;

  /* void insertNode (in Node node, in Node parent, in long aPosition); */
  NS_IMETHOD InsertNode(nsINode *node, nsINode *parent, int32_t aPosition) = 0;

  /* void splitNode (in Node existingRightNode, in long offset, out Node newLeftNode); */
  NS_IMETHOD SplitNode(nsINode *existingRightNode, int32_t offset, nsINode **newLeftNode) = 0;

  /* void joinNodes (in Node leftNode, in Node rightNode, in Node parent); */
  NS_IMETHOD JoinNodes(nsINode *leftNode, nsINode *rightNode, nsINode *parent) = 0;

  /* void deleteNode (in Node child); */
  NS_IMETHOD DeleteNode(nsINode *child) = 0;

  /* void markNodeDirty (in Node node); */
  NS_IMETHOD MarkNodeDirty(nsINode *node) = 0;

  /* AString outputToString (in AString formatType, in unsigned long flags); */
  NS_IMETHOD OutputToString(const nsAString& formatType, uint32_t flags, nsAString& _retval) = 0;

  /* void addEditorObserver (in nsIEditorObserver observer); */
  NS_IMETHOD AddEditorObserver(nsIEditorObserver *observer) = 0;

  /* void removeEditorObserver (in nsIEditorObserver observer); */
  NS_IMETHOD RemoveEditorObserver(nsIEditorObserver *observer) = 0;

  /* void addEditActionListener (in nsIEditActionListener listener); */
  NS_IMETHOD AddEditActionListener(nsIEditActionListener *listener) = 0;

  /* void removeEditActionListener (in nsIEditActionListener listener); */
  NS_IMETHOD RemoveEditActionListener(nsIEditActionListener *listener) = 0;

  /* void addDocumentStateListener (in nsIDocumentStateListener listener); */
  NS_IMETHOD AddDocumentStateListener(nsIDocumentStateListener *listener) = 0;

  /* void removeDocumentStateListener (in nsIDocumentStateListener listener); */
  NS_IMETHOD RemoveDocumentStateListener(nsIDocumentStateListener *listener) = 0;

  /* void dumpContentTree (); */
  NS_IMETHOD DumpContentTree(void) = 0;

  /* void debugDumpContent (); */
  NS_IMETHOD DebugDumpContent(void) = 0;

  /* void debugUnitTests (out long outNumTests, out long outNumTestsFailed); */
  NS_IMETHOD DebugUnitTests(int32_t *outNumTests, int32_t *outNumTestsFailed) = 0;

  /* void forceCompositionEnd (); */
  NS_IMETHOD ForceCompositionEnd(void) = 0;

  /* readonly attribute boolean composing; */
  NS_IMETHOD GetComposing(bool *aComposing) = 0;

   /**
   * AsEditorBase() returns a pointer to EditorBase class.
   *
   * In order to avoid circular dependency issues, this method is defined
   * in mozilla/EditorBase.h.  Consumers need to #include that header.
   */
  inline mozilla::EditorBase* AsEditorBase();
  inline const mozilla::EditorBase* AsEditorBase() const;
  /**
   * AsTextEditor() returns a pointer to TextEditor class.
   *
   * In order to avoid circular dependency issues, this method is defined
   * in mozilla/TextEditor.h.  Consumers need to #include that header.
   */
  inline mozilla::TextEditor* AsTextEditor();
  inline const mozilla::TextEditor* AsTextEditor() const;
  /**
   * AsHTMLEditor() returns a pointer to HTMLEditor class.
   *
   * In order to avoid circular dependency issues, this method is defined
   * in mozilla/HTMLEditor.h.  Consumers need to #include that header.
   */
  inline mozilla::HTMLEditor* AsHTMLEditor();
  inline const mozilla::HTMLEditor* AsHTMLEditor() const;
};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIEditor, NS_IEDITOR_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIEDITOR \
  NS_IMETHOD GetSelection(mozilla::dom::Selection **aSelection) override; \
  NS_IMETHOD SetAttributeOrEquivalent(mozilla::dom::Element *element, const nsAString& sourceAttrName, const nsAString& sourceAttrValue, bool aSuppressTransaction) override; \
  NS_IMETHOD RemoveAttributeOrEquivalent(mozilla::dom::Element *element, const nsAString& sourceAttrName, bool aSuppressTransaction) override; \
  NS_IMETHOD GetFlags(uint32_t *aFlags) override; \
  NS_IMETHOD SetFlags(uint32_t aFlags) override; \
  NS_IMETHOD GetContentsMIMEType(char * *aContentsMIMEType) override; \
  NS_IMETHOD SetContentsMIMEType(const char * aContentsMIMEType) override; \
  NS_IMETHOD GetIsDocumentEditable(bool *aIsDocumentEditable) override; \
  NS_IMETHOD GetIsSelectionEditable(bool *aIsSelectionEditable) override; \
  NS_IMETHOD GetDocument(nsIDocument **aDocument) override; \
  NS_IMETHOD GetRootElement(mozilla::dom::Element **aRootElement) override; \
  NS_IMETHOD GetSelectionController(nsISelectionController **aSelectionController) override; \
  NS_IMETHOD DeleteSelection(int16_t action, int16_t stripWrappers) override; \
  NS_IMETHOD GetDocumentIsEmpty(bool *aDocumentIsEmpty) override; \
  NS_IMETHOD GetDocumentModified(bool *aDocumentModified) override; \
  NS_IMETHOD GetDocumentCharacterSet(nsACString& aDocumentCharacterSet) override; \
  NS_IMETHOD SetDocumentCharacterSet(const nsACString& aDocumentCharacterSet) override; \
  NS_IMETHOD ResetModificationCount(void) override; \
  NS_IMETHOD GetModificationCount(int32_t *_retval) override; \
  NS_IMETHOD IncrementModificationCount(int32_t aModCount) override; \
  NS_IMETHOD GetTransactionManager(nsITransactionManager **aTransactionManager) override; \
  NS_IMETHOD DoTransaction(nsITransaction *txn) override; \
  NS_IMETHOD EnableUndo(bool enable) override; \
  NS_IMETHOD Undo(uint32_t count) override; \
  NS_IMETHOD CanUndo(bool *isEnabled, bool *canUndo) override; \
  NS_IMETHOD Redo(uint32_t count) override; \
  NS_IMETHOD CanRedo(bool *isEnabled, bool *canRedo) override; \
  NS_IMETHOD BeginTransaction(void) override; \
  NS_IMETHOD EndTransaction(void) override; \
  NS_IMETHOD SetShouldTxnSetSelection(bool should) override; \
  NS_IMETHOD GetInlineSpellChecker(bool autoCreate, nsIInlineSpellChecker **_retval) override; \
  NS_IMETHOD SetSpellcheckUserOverride(bool enable) override; \
  NS_IMETHOD Cut(void) override; \
  NS_IMETHOD CanCut(bool *_retval) override; \
  NS_IMETHOD Copy(void) override; \
  NS_IMETHOD CanCopy(bool *_retval) override; \
  NS_IMETHOD CanDelete(bool *_retval) override; \
  NS_IMETHOD Paste(int32_t aSelectionType) override; \
  NS_IMETHOD PasteTransferable(nsITransferable *aTransferable) override; \
  NS_IMETHOD CanPaste(int32_t aSelectionType, bool *_retval) override; \
  NS_IMETHOD SelectAll(void) override; \
  NS_IMETHOD BeginningOfDocument(void) override; \
  NS_IMETHOD EndOfDocument(void) override; \
  NS_IMETHOD SetAttribute(mozilla::dom::Element *aElement, const nsAString& attributestr, const nsAString& attvalue) override; \
  NS_IMETHOD GetAttributeValue(mozilla::dom::Element *aElement, const nsAString& attributestr, nsAString& resultValue, bool *_retval) override; \
  NS_IMETHOD RemoveAttribute(mozilla::dom::Element *aElement, const nsAString& aAttribute) override; \
  NS_IMETHOD CloneAttribute(const nsAString& aAttribute, mozilla::dom::Element *aDestElement, mozilla::dom::Element *aSourceElement) override; \
  NS_IMETHOD CloneAttributes(mozilla::dom::Element *aDestElement, mozilla::dom::Element *aSourceElement) override; \
  NS_IMETHOD InsertNode(nsINode *node, nsINode *parent, int32_t aPosition) override; \
  NS_IMETHOD SplitNode(nsINode *existingRightNode, int32_t offset, nsINode **newLeftNode) override; \
  NS_IMETHOD JoinNodes(nsINode *leftNode, nsINode *rightNode, nsINode *parent) override; \
  NS_IMETHOD DeleteNode(nsINode *child) override; \
  NS_IMETHOD MarkNodeDirty(nsINode *node) override; \
  NS_IMETHOD OutputToString(const nsAString& formatType, uint32_t flags, nsAString& _retval) override; \
  NS_IMETHOD AddEditorObserver(nsIEditorObserver *observer) override; \
  NS_IMETHOD RemoveEditorObserver(nsIEditorObserver *observer) override; \
  NS_IMETHOD AddEditActionListener(nsIEditActionListener *listener) override; \
  NS_IMETHOD RemoveEditActionListener(nsIEditActionListener *listener) override; \
  NS_IMETHOD AddDocumentStateListener(nsIDocumentStateListener *listener) override; \
  NS_IMETHOD RemoveDocumentStateListener(nsIDocumentStateListener *listener) override; \
  NS_IMETHOD DumpContentTree(void) override; \
  NS_IMETHOD DebugDumpContent(void) override; \
  NS_IMETHOD DebugUnitTests(int32_t *outNumTests, int32_t *outNumTestsFailed) override; \
  NS_IMETHOD ForceCompositionEnd(void) override; \
  NS_IMETHOD GetComposing(bool *aComposing) override; \

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIEDITOR \
  nsresult GetSelection(mozilla::dom::Selection **aSelection); \
  nsresult SetAttributeOrEquivalent(mozilla::dom::Element *element, const nsAString& sourceAttrName, const nsAString& sourceAttrValue, bool aSuppressTransaction); \
  nsresult RemoveAttributeOrEquivalent(mozilla::dom::Element *element, const nsAString& sourceAttrName, bool aSuppressTransaction); \
  nsresult GetFlags(uint32_t *aFlags); \
  nsresult SetFlags(uint32_t aFlags); \
  nsresult GetContentsMIMEType(char * *aContentsMIMEType); \
  nsresult SetContentsMIMEType(const char * aContentsMIMEType); \
  nsresult GetIsDocumentEditable(bool *aIsDocumentEditable); \
  nsresult GetIsSelectionEditable(bool *aIsSelectionEditable); \
  nsresult GetDocument(nsIDocument **aDocument); \
  nsresult GetRootElement(mozilla::dom::Element **aRootElement); \
  nsresult GetSelectionController(nsISelectionController **aSelectionController); \
  nsresult DeleteSelection(int16_t action, int16_t stripWrappers); \
  nsresult GetDocumentIsEmpty(bool *aDocumentIsEmpty); \
  nsresult GetDocumentModified(bool *aDocumentModified); \
  nsresult GetDocumentCharacterSet(nsACString& aDocumentCharacterSet); \
  nsresult SetDocumentCharacterSet(const nsACString& aDocumentCharacterSet); \
  nsresult ResetModificationCount(void); \
  nsresult GetModificationCount(int32_t *_retval); \
  nsresult IncrementModificationCount(int32_t aModCount); \
  nsresult GetTransactionManager(nsITransactionManager **aTransactionManager); \
  nsresult DoTransaction(nsITransaction *txn); \
  nsresult EnableUndo(bool enable); \
  nsresult Undo(uint32_t count); \
  nsresult CanUndo(bool *isEnabled, bool *canUndo); \
  nsresult Redo(uint32_t count); \
  nsresult CanRedo(bool *isEnabled, bool *canRedo); \
  nsresult BeginTransaction(void); \
  nsresult EndTransaction(void); \
  nsresult SetShouldTxnSetSelection(bool should); \
  nsresult GetInlineSpellChecker(bool autoCreate, nsIInlineSpellChecker **_retval); \
  nsresult SetSpellcheckUserOverride(bool enable); \
  nsresult Cut(void); \
  nsresult CanCut(bool *_retval); \
  nsresult Copy(void); \
  nsresult CanCopy(bool *_retval); \
  nsresult CanDelete(bool *_retval); \
  nsresult Paste(int32_t aSelectionType); \
  nsresult PasteTransferable(nsITransferable *aTransferable); \
  nsresult CanPaste(int32_t aSelectionType, bool *_retval); \
  nsresult SelectAll(void); \
  nsresult BeginningOfDocument(void); \
  nsresult EndOfDocument(void); \
  nsresult SetAttribute(mozilla::dom::Element *aElement, const nsAString& attributestr, const nsAString& attvalue); \
  nsresult GetAttributeValue(mozilla::dom::Element *aElement, const nsAString& attributestr, nsAString& resultValue, bool *_retval); \
  nsresult RemoveAttribute(mozilla::dom::Element *aElement, const nsAString& aAttribute); \
  nsresult CloneAttribute(const nsAString& aAttribute, mozilla::dom::Element *aDestElement, mozilla::dom::Element *aSourceElement); \
  nsresult CloneAttributes(mozilla::dom::Element *aDestElement, mozilla::dom::Element *aSourceElement); \
  nsresult InsertNode(nsINode *node, nsINode *parent, int32_t aPosition); \
  nsresult SplitNode(nsINode *existingRightNode, int32_t offset, nsINode **newLeftNode); \
  nsresult JoinNodes(nsINode *leftNode, nsINode *rightNode, nsINode *parent); \
  nsresult DeleteNode(nsINode *child); \
  nsresult MarkNodeDirty(nsINode *node); \
  nsresult OutputToString(const nsAString& formatType, uint32_t flags, nsAString& _retval); \
  nsresult AddEditorObserver(nsIEditorObserver *observer); \
  nsresult RemoveEditorObserver(nsIEditorObserver *observer); \
  nsresult AddEditActionListener(nsIEditActionListener *listener); \
  nsresult RemoveEditActionListener(nsIEditActionListener *listener); \
  nsresult AddDocumentStateListener(nsIDocumentStateListener *listener); \
  nsresult RemoveDocumentStateListener(nsIDocumentStateListener *listener); \
  nsresult DumpContentTree(void); \
  nsresult DebugDumpContent(void); \
  nsresult DebugUnitTests(int32_t *outNumTests, int32_t *outNumTestsFailed); \
  nsresult ForceCompositionEnd(void); \
  nsresult GetComposing(bool *aComposing); \

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIEDITOR(_to) \
  NS_IMETHOD GetSelection(mozilla::dom::Selection **aSelection) override { return _to GetSelection(aSelection); } \
  NS_IMETHOD SetAttributeOrEquivalent(mozilla::dom::Element *element, const nsAString& sourceAttrName, const nsAString& sourceAttrValue, bool aSuppressTransaction) override { return _to SetAttributeOrEquivalent(element, sourceAttrName, sourceAttrValue, aSuppressTransaction); } \
  NS_IMETHOD RemoveAttributeOrEquivalent(mozilla::dom::Element *element, const nsAString& sourceAttrName, bool aSuppressTransaction) override { return _to RemoveAttributeOrEquivalent(element, sourceAttrName, aSuppressTransaction); } \
  NS_IMETHOD GetFlags(uint32_t *aFlags) override { return _to GetFlags(aFlags); } \
  NS_IMETHOD SetFlags(uint32_t aFlags) override { return _to SetFlags(aFlags); } \
  NS_IMETHOD GetContentsMIMEType(char * *aContentsMIMEType) override { return _to GetContentsMIMEType(aContentsMIMEType); } \
  NS_IMETHOD SetContentsMIMEType(const char * aContentsMIMEType) override { return _to SetContentsMIMEType(aContentsMIMEType); } \
  NS_IMETHOD GetIsDocumentEditable(bool *aIsDocumentEditable) override { return _to GetIsDocumentEditable(aIsDocumentEditable); } \
  NS_IMETHOD GetIsSelectionEditable(bool *aIsSelectionEditable) override { return _to GetIsSelectionEditable(aIsSelectionEditable); } \
  NS_IMETHOD GetDocument(nsIDocument **aDocument) override { return _to GetDocument(aDocument); } \
  NS_IMETHOD GetRootElement(mozilla::dom::Element **aRootElement) override { return _to GetRootElement(aRootElement); } \
  NS_IMETHOD GetSelectionController(nsISelectionController **aSelectionController) override { return _to GetSelectionController(aSelectionController); } \
  NS_IMETHOD DeleteSelection(int16_t action, int16_t stripWrappers) override { return _to DeleteSelection(action, stripWrappers); } \
  NS_IMETHOD GetDocumentIsEmpty(bool *aDocumentIsEmpty) override { return _to GetDocumentIsEmpty(aDocumentIsEmpty); } \
  NS_IMETHOD GetDocumentModified(bool *aDocumentModified) override { return _to GetDocumentModified(aDocumentModified); } \
  NS_IMETHOD GetDocumentCharacterSet(nsACString& aDocumentCharacterSet) override { return _to GetDocumentCharacterSet(aDocumentCharacterSet); } \
  NS_IMETHOD SetDocumentCharacterSet(const nsACString& aDocumentCharacterSet) override { return _to SetDocumentCharacterSet(aDocumentCharacterSet); } \
  NS_IMETHOD ResetModificationCount(void) override { return _to ResetModificationCount(); } \
  NS_IMETHOD GetModificationCount(int32_t *_retval) override { return _to GetModificationCount(_retval); } \
  NS_IMETHOD IncrementModificationCount(int32_t aModCount) override { return _to IncrementModificationCount(aModCount); } \
  NS_IMETHOD GetTransactionManager(nsITransactionManager **aTransactionManager) override { return _to GetTransactionManager(aTransactionManager); } \
  NS_IMETHOD DoTransaction(nsITransaction *txn) override { return _to DoTransaction(txn); } \
  NS_IMETHOD EnableUndo(bool enable) override { return _to EnableUndo(enable); } \
  NS_IMETHOD Undo(uint32_t count) override { return _to Undo(count); } \
  NS_IMETHOD CanUndo(bool *isEnabled, bool *canUndo) override { return _to CanUndo(isEnabled, canUndo); } \
  NS_IMETHOD Redo(uint32_t count) override { return _to Redo(count); } \
  NS_IMETHOD CanRedo(bool *isEnabled, bool *canRedo) override { return _to CanRedo(isEnabled, canRedo); } \
  NS_IMETHOD BeginTransaction(void) override { return _to BeginTransaction(); } \
  NS_IMETHOD EndTransaction(void) override { return _to EndTransaction(); } \
  NS_IMETHOD SetShouldTxnSetSelection(bool should) override { return _to SetShouldTxnSetSelection(should); } \
  NS_IMETHOD GetInlineSpellChecker(bool autoCreate, nsIInlineSpellChecker **_retval) override { return _to GetInlineSpellChecker(autoCreate, _retval); } \
  NS_IMETHOD SetSpellcheckUserOverride(bool enable) override { return _to SetSpellcheckUserOverride(enable); } \
  NS_IMETHOD Cut(void) override { return _to Cut(); } \
  NS_IMETHOD CanCut(bool *_retval) override { return _to CanCut(_retval); } \
  NS_IMETHOD Copy(void) override { return _to Copy(); } \
  NS_IMETHOD CanCopy(bool *_retval) override { return _to CanCopy(_retval); } \
  NS_IMETHOD CanDelete(bool *_retval) override { return _to CanDelete(_retval); } \
  NS_IMETHOD Paste(int32_t aSelectionType) override { return _to Paste(aSelectionType); } \
  NS_IMETHOD PasteTransferable(nsITransferable *aTransferable) override { return _to PasteTransferable(aTransferable); } \
  NS_IMETHOD CanPaste(int32_t aSelectionType, bool *_retval) override { return _to CanPaste(aSelectionType, _retval); } \
  NS_IMETHOD SelectAll(void) override { return _to SelectAll(); } \
  NS_IMETHOD BeginningOfDocument(void) override { return _to BeginningOfDocument(); } \
  NS_IMETHOD EndOfDocument(void) override { return _to EndOfDocument(); } \
  NS_IMETHOD SetAttribute(mozilla::dom::Element *aElement, const nsAString& attributestr, const nsAString& attvalue) override { return _to SetAttribute(aElement, attributestr, attvalue); } \
  NS_IMETHOD GetAttributeValue(mozilla::dom::Element *aElement, const nsAString& attributestr, nsAString& resultValue, bool *_retval) override { return _to GetAttributeValue(aElement, attributestr, resultValue, _retval); } \
  NS_IMETHOD RemoveAttribute(mozilla::dom::Element *aElement, const nsAString& aAttribute) override { return _to RemoveAttribute(aElement, aAttribute); } \
  NS_IMETHOD CloneAttribute(const nsAString& aAttribute, mozilla::dom::Element *aDestElement, mozilla::dom::Element *aSourceElement) override { return _to CloneAttribute(aAttribute, aDestElement, aSourceElement); } \
  NS_IMETHOD CloneAttributes(mozilla::dom::Element *aDestElement, mozilla::dom::Element *aSourceElement) override { return _to CloneAttributes(aDestElement, aSourceElement); } \
  NS_IMETHOD InsertNode(nsINode *node, nsINode *parent, int32_t aPosition) override { return _to InsertNode(node, parent, aPosition); } \
  NS_IMETHOD SplitNode(nsINode *existingRightNode, int32_t offset, nsINode **newLeftNode) override { return _to SplitNode(existingRightNode, offset, newLeftNode); } \
  NS_IMETHOD JoinNodes(nsINode *leftNode, nsINode *rightNode, nsINode *parent) override { return _to JoinNodes(leftNode, rightNode, parent); } \
  NS_IMETHOD DeleteNode(nsINode *child) override { return _to DeleteNode(child); } \
  NS_IMETHOD MarkNodeDirty(nsINode *node) override { return _to MarkNodeDirty(node); } \
  NS_IMETHOD OutputToString(const nsAString& formatType, uint32_t flags, nsAString& _retval) override { return _to OutputToString(formatType, flags, _retval); } \
  NS_IMETHOD AddEditorObserver(nsIEditorObserver *observer) override { return _to AddEditorObserver(observer); } \
  NS_IMETHOD RemoveEditorObserver(nsIEditorObserver *observer) override { return _to RemoveEditorObserver(observer); } \
  NS_IMETHOD AddEditActionListener(nsIEditActionListener *listener) override { return _to AddEditActionListener(listener); } \
  NS_IMETHOD RemoveEditActionListener(nsIEditActionListener *listener) override { return _to RemoveEditActionListener(listener); } \
  NS_IMETHOD AddDocumentStateListener(nsIDocumentStateListener *listener) override { return _to AddDocumentStateListener(listener); } \
  NS_IMETHOD RemoveDocumentStateListener(nsIDocumentStateListener *listener) override { return _to RemoveDocumentStateListener(listener); } \
  NS_IMETHOD DumpContentTree(void) override { return _to DumpContentTree(); } \
  NS_IMETHOD DebugDumpContent(void) override { return _to DebugDumpContent(); } \
  NS_IMETHOD DebugUnitTests(int32_t *outNumTests, int32_t *outNumTestsFailed) override { return _to DebugUnitTests(outNumTests, outNumTestsFailed); } \
  NS_IMETHOD ForceCompositionEnd(void) override { return _to ForceCompositionEnd(); } \
  NS_IMETHOD GetComposing(bool *aComposing) override { return _to GetComposing(aComposing); } \

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIEDITOR(_to) \
  NS_IMETHOD GetSelection(mozilla::dom::Selection **aSelection) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelection(aSelection); } \
  NS_IMETHOD SetAttributeOrEquivalent(mozilla::dom::Element *element, const nsAString& sourceAttrName, const nsAString& sourceAttrValue, bool aSuppressTransaction) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeOrEquivalent(element, sourceAttrName, sourceAttrValue, aSuppressTransaction); } \
  NS_IMETHOD RemoveAttributeOrEquivalent(mozilla::dom::Element *element, const nsAString& sourceAttrName, bool aSuppressTransaction) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttributeOrEquivalent(element, sourceAttrName, aSuppressTransaction); } \
  NS_IMETHOD GetFlags(uint32_t *aFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFlags(aFlags); } \
  NS_IMETHOD SetFlags(uint32_t aFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFlags(aFlags); } \
  NS_IMETHOD GetContentsMIMEType(char * *aContentsMIMEType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentsMIMEType(aContentsMIMEType); } \
  NS_IMETHOD SetContentsMIMEType(const char * aContentsMIMEType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetContentsMIMEType(aContentsMIMEType); } \
  NS_IMETHOD GetIsDocumentEditable(bool *aIsDocumentEditable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsDocumentEditable(aIsDocumentEditable); } \
  NS_IMETHOD GetIsSelectionEditable(bool *aIsSelectionEditable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsSelectionEditable(aIsSelectionEditable); } \
  NS_IMETHOD GetDocument(nsIDocument **aDocument) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocument(aDocument); } \
  NS_IMETHOD GetRootElement(mozilla::dom::Element **aRootElement) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRootElement(aRootElement); } \
  NS_IMETHOD GetSelectionController(nsISelectionController **aSelectionController) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelectionController(aSelectionController); } \
  NS_IMETHOD DeleteSelection(int16_t action, int16_t stripWrappers) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteSelection(action, stripWrappers); } \
  NS_IMETHOD GetDocumentIsEmpty(bool *aDocumentIsEmpty) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentIsEmpty(aDocumentIsEmpty); } \
  NS_IMETHOD GetDocumentModified(bool *aDocumentModified) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentModified(aDocumentModified); } \
  NS_IMETHOD GetDocumentCharacterSet(nsACString& aDocumentCharacterSet) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentCharacterSet(aDocumentCharacterSet); } \
  NS_IMETHOD SetDocumentCharacterSet(const nsACString& aDocumentCharacterSet) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDocumentCharacterSet(aDocumentCharacterSet); } \
  NS_IMETHOD ResetModificationCount(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetModificationCount(); } \
  NS_IMETHOD GetModificationCount(int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetModificationCount(_retval); } \
  NS_IMETHOD IncrementModificationCount(int32_t aModCount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IncrementModificationCount(aModCount); } \
  NS_IMETHOD GetTransactionManager(nsITransactionManager **aTransactionManager) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTransactionManager(aTransactionManager); } \
  NS_IMETHOD DoTransaction(nsITransaction *txn) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DoTransaction(txn); } \
  NS_IMETHOD EnableUndo(bool enable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EnableUndo(enable); } \
  NS_IMETHOD Undo(uint32_t count) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Undo(count); } \
  NS_IMETHOD CanUndo(bool *isEnabled, bool *canUndo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CanUndo(isEnabled, canUndo); } \
  NS_IMETHOD Redo(uint32_t count) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Redo(count); } \
  NS_IMETHOD CanRedo(bool *isEnabled, bool *canRedo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CanRedo(isEnabled, canRedo); } \
  NS_IMETHOD BeginTransaction(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginTransaction(); } \
  NS_IMETHOD EndTransaction(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EndTransaction(); } \
  NS_IMETHOD SetShouldTxnSetSelection(bool should) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetShouldTxnSetSelection(should); } \
  NS_IMETHOD GetInlineSpellChecker(bool autoCreate, nsIInlineSpellChecker **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInlineSpellChecker(autoCreate, _retval); } \
  NS_IMETHOD SetSpellcheckUserOverride(bool enable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSpellcheckUserOverride(enable); } \
  NS_IMETHOD Cut(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Cut(); } \
  NS_IMETHOD CanCut(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCut(_retval); } \
  NS_IMETHOD Copy(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Copy(); } \
  NS_IMETHOD CanCopy(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopy(_retval); } \
  NS_IMETHOD CanDelete(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CanDelete(_retval); } \
  NS_IMETHOD Paste(int32_t aSelectionType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Paste(aSelectionType); } \
  NS_IMETHOD PasteTransferable(nsITransferable *aTransferable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PasteTransferable(aTransferable); } \
  NS_IMETHOD CanPaste(int32_t aSelectionType, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CanPaste(aSelectionType, _retval); } \
  NS_IMETHOD SelectAll(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectAll(); } \
  NS_IMETHOD BeginningOfDocument(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginningOfDocument(); } \
  NS_IMETHOD EndOfDocument(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EndOfDocument(); } \
  NS_IMETHOD SetAttribute(mozilla::dom::Element *aElement, const nsAString& attributestr, const nsAString& attvalue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttribute(aElement, attributestr, attvalue); } \
  NS_IMETHOD GetAttributeValue(mozilla::dom::Element *aElement, const nsAString& attributestr, nsAString& resultValue, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeValue(aElement, attributestr, resultValue, _retval); } \
  NS_IMETHOD RemoveAttribute(mozilla::dom::Element *aElement, const nsAString& aAttribute) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttribute(aElement, aAttribute); } \
  NS_IMETHOD CloneAttribute(const nsAString& aAttribute, mozilla::dom::Element *aDestElement, mozilla::dom::Element *aSourceElement) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CloneAttribute(aAttribute, aDestElement, aSourceElement); } \
  NS_IMETHOD CloneAttributes(mozilla::dom::Element *aDestElement, mozilla::dom::Element *aSourceElement) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CloneAttributes(aDestElement, aSourceElement); } \
  NS_IMETHOD InsertNode(nsINode *node, nsINode *parent, int32_t aPosition) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InsertNode(node, parent, aPosition); } \
  NS_IMETHOD SplitNode(nsINode *existingRightNode, int32_t offset, nsINode **newLeftNode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SplitNode(existingRightNode, offset, newLeftNode); } \
  NS_IMETHOD JoinNodes(nsINode *leftNode, nsINode *rightNode, nsINode *parent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->JoinNodes(leftNode, rightNode, parent); } \
  NS_IMETHOD DeleteNode(nsINode *child) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteNode(child); } \
  NS_IMETHOD MarkNodeDirty(nsINode *node) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkNodeDirty(node); } \
  NS_IMETHOD OutputToString(const nsAString& formatType, uint32_t flags, nsAString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OutputToString(formatType, flags, _retval); } \
  NS_IMETHOD AddEditorObserver(nsIEditorObserver *observer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEditorObserver(observer); } \
  NS_IMETHOD RemoveEditorObserver(nsIEditorObserver *observer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveEditorObserver(observer); } \
  NS_IMETHOD AddEditActionListener(nsIEditActionListener *listener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddEditActionListener(listener); } \
  NS_IMETHOD RemoveEditActionListener(nsIEditActionListener *listener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveEditActionListener(listener); } \
  NS_IMETHOD AddDocumentStateListener(nsIDocumentStateListener *listener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddDocumentStateListener(listener); } \
  NS_IMETHOD RemoveDocumentStateListener(nsIDocumentStateListener *listener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveDocumentStateListener(listener); } \
  NS_IMETHOD DumpContentTree(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DumpContentTree(); } \
  NS_IMETHOD DebugDumpContent(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DebugDumpContent(); } \
  NS_IMETHOD DebugUnitTests(int32_t *outNumTests, int32_t *outNumTestsFailed) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DebugUnitTests(outNumTests, outNumTestsFailed); } \
  NS_IMETHOD ForceCompositionEnd(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ForceCompositionEnd(); } \
  NS_IMETHOD GetComposing(bool *aComposing) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetComposing(aComposing); } \


#endif /* __gen_nsIEditor_h__ */