PageRenderTime 47ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/mozilla/mozilla/dist/include/composer/nsIEditingSession.h

http://kmbrasil.codeplex.com
C++ Header | 210 lines | 106 code | 46 blank | 58 comment | 0 complexity | a71b0089e119419676aae3b919782a0b MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, GPL-2.0
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM h:/projects/mozilla/mozilla/editor/composer/public/nsIEditingSession.idl
  3. */
  4. #ifndef __gen_nsIEditingSession_h__
  5. #define __gen_nsIEditingSession_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. #ifndef __gen_domstubs_h__
  10. #include "domstubs.h"
  11. #endif
  12. /* For IDL files that don't want to include root IDL files. */
  13. #ifndef NS_NO_VTABLE
  14. #define NS_NO_VTABLE
  15. #endif
  16. class nsIEditor; /* forward declaration */
  17. class nsIEditingShell; /* forward declaration */
  18. /* starting interface: nsIEditingSession */
  19. #define NS_IEDITINGSESSION_IID_STR "d39fd2b4-3978-45d2-a4be-ba448171b61b"
  20. #define NS_IEDITINGSESSION_IID \
  21. {0xd39fd2b4, 0x3978, 0x45d2, \
  22. { 0xa4, 0xbe, 0xba, 0x44, 0x81, 0x71, 0xb6, 0x1b }}
  23. class NS_NO_VTABLE nsIEditingSession : public nsISupports {
  24. public:
  25. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IEDITINGSESSION_IID)
  26. /**
  27. * Error codes when we fail to create an editor
  28. * is placed in attribute editorStatus
  29. */
  30. enum { eEditorOK = 0 };
  31. enum { eEditorCreationInProgress = 1 };
  32. enum { eEditorErrorCantEditMimeType = 2 };
  33. enum { eEditorErrorFileNotFound = 3 };
  34. enum { eEditorErrorCantEditFramesets = 8 };
  35. enum { eEditorErrorUnknown = 9 };
  36. /**
  37. * Status after editor creation and document loading
  38. * Value is one of the above error codes
  39. */
  40. /* readonly attribute unsigned long editorStatus; */
  41. NS_IMETHOD GetEditorStatus(PRUint32 *aEditorStatus) = 0;
  42. /**
  43. * Make this window editable
  44. * @param aWindow nsIDOMWindow, the window the embedder needs to make editable
  45. * @param aEditorType string, "html" "htmlsimple" "text" "textsimple"
  46. */
  47. /* void makeWindowEditable (in nsIDOMWindow window, in string aEditorType, in boolean doAfterUriLoad); */
  48. NS_IMETHOD MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType, PRBool doAfterUriLoad) = 0;
  49. /**
  50. * Test whether a specific window has had its editable flag set; it may have an editor
  51. * now, or will get one after the uri load.
  52. *
  53. * Use this, passing the content root window, to test if we've set up editing
  54. * for this content.
  55. */
  56. /* boolean windowIsEditable (in nsIDOMWindow window); */
  57. NS_IMETHOD WindowIsEditable(nsIDOMWindow *window, PRBool *_retval) = 0;
  58. /**
  59. * Get the editor for this window. May return null
  60. */
  61. /* nsIEditor getEditorForWindow (in nsIDOMWindow window); */
  62. NS_IMETHOD GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval) = 0;
  63. /**
  64. * Setup editor and related support objects
  65. */
  66. /* void setupEditorOnWindow (in nsIDOMWindow window); */
  67. NS_IMETHOD SetupEditorOnWindow(nsIDOMWindow *window) = 0;
  68. /**
  69. * Destroy editor and related support objects
  70. */
  71. /* void tearDownEditorOnWindow (in nsIDOMWindow window); */
  72. NS_IMETHOD TearDownEditorOnWindow(nsIDOMWindow *window) = 0;
  73. /* void setEditorOnControllers (in nsIDOMWindow aWindow, in nsIEditor aEditor); */
  74. NS_IMETHOD SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor) = 0;
  75. };
  76. /* Use this macro when declaring classes that implement this interface. */
  77. #define NS_DECL_NSIEDITINGSESSION \
  78. NS_IMETHOD GetEditorStatus(PRUint32 *aEditorStatus); \
  79. NS_IMETHOD MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType, PRBool doAfterUriLoad); \
  80. NS_IMETHOD WindowIsEditable(nsIDOMWindow *window, PRBool *_retval); \
  81. NS_IMETHOD GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval); \
  82. NS_IMETHOD SetupEditorOnWindow(nsIDOMWindow *window); \
  83. NS_IMETHOD TearDownEditorOnWindow(nsIDOMWindow *window); \
  84. NS_IMETHOD SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor);
  85. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  86. #define NS_FORWARD_NSIEDITINGSESSION(_to) \
  87. NS_IMETHOD GetEditorStatus(PRUint32 *aEditorStatus) { return _to GetEditorStatus(aEditorStatus); } \
  88. NS_IMETHOD MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType, PRBool doAfterUriLoad) { return _to MakeWindowEditable(window, aEditorType, doAfterUriLoad); } \
  89. NS_IMETHOD WindowIsEditable(nsIDOMWindow *window, PRBool *_retval) { return _to WindowIsEditable(window, _retval); } \
  90. NS_IMETHOD GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval) { return _to GetEditorForWindow(window, _retval); } \
  91. NS_IMETHOD SetupEditorOnWindow(nsIDOMWindow *window) { return _to SetupEditorOnWindow(window); } \
  92. NS_IMETHOD TearDownEditorOnWindow(nsIDOMWindow *window) { return _to TearDownEditorOnWindow(window); } \
  93. NS_IMETHOD SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor) { return _to SetEditorOnControllers(aWindow, aEditor); }
  94. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  95. #define NS_FORWARD_SAFE_NSIEDITINGSESSION(_to) \
  96. NS_IMETHOD GetEditorStatus(PRUint32 *aEditorStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEditorStatus(aEditorStatus); } \
  97. NS_IMETHOD MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType, PRBool doAfterUriLoad) { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeWindowEditable(window, aEditorType, doAfterUriLoad); } \
  98. NS_IMETHOD WindowIsEditable(nsIDOMWindow *window, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->WindowIsEditable(window, _retval); } \
  99. NS_IMETHOD GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEditorForWindow(window, _retval); } \
  100. NS_IMETHOD SetupEditorOnWindow(nsIDOMWindow *window) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetupEditorOnWindow(window); } \
  101. NS_IMETHOD TearDownEditorOnWindow(nsIDOMWindow *window) { return !_to ? NS_ERROR_NULL_POINTER : _to->TearDownEditorOnWindow(window); } \
  102. NS_IMETHOD SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEditorOnControllers(aWindow, aEditor); }
  103. #if 0
  104. /* Use the code below as a template for the implementation class for this interface. */
  105. /* Header file */
  106. class nsEditingSession : public nsIEditingSession
  107. {
  108. public:
  109. NS_DECL_ISUPPORTS
  110. NS_DECL_NSIEDITINGSESSION
  111. nsEditingSession();
  112. private:
  113. ~nsEditingSession();
  114. protected:
  115. /* additional members */
  116. };
  117. /* Implementation file */
  118. NS_IMPL_ISUPPORTS1(nsEditingSession, nsIEditingSession)
  119. nsEditingSession::nsEditingSession()
  120. {
  121. /* member initializers and constructor code */
  122. }
  123. nsEditingSession::~nsEditingSession()
  124. {
  125. /* destructor code */
  126. }
  127. /* readonly attribute unsigned long editorStatus; */
  128. NS_IMETHODIMP nsEditingSession::GetEditorStatus(PRUint32 *aEditorStatus)
  129. {
  130. return NS_ERROR_NOT_IMPLEMENTED;
  131. }
  132. /* void makeWindowEditable (in nsIDOMWindow window, in string aEditorType, in boolean doAfterUriLoad); */
  133. NS_IMETHODIMP nsEditingSession::MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType, PRBool doAfterUriLoad)
  134. {
  135. return NS_ERROR_NOT_IMPLEMENTED;
  136. }
  137. /* boolean windowIsEditable (in nsIDOMWindow window); */
  138. NS_IMETHODIMP nsEditingSession::WindowIsEditable(nsIDOMWindow *window, PRBool *_retval)
  139. {
  140. return NS_ERROR_NOT_IMPLEMENTED;
  141. }
  142. /* nsIEditor getEditorForWindow (in nsIDOMWindow window); */
  143. NS_IMETHODIMP nsEditingSession::GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval)
  144. {
  145. return NS_ERROR_NOT_IMPLEMENTED;
  146. }
  147. /* void setupEditorOnWindow (in nsIDOMWindow window); */
  148. NS_IMETHODIMP nsEditingSession::SetupEditorOnWindow(nsIDOMWindow *window)
  149. {
  150. return NS_ERROR_NOT_IMPLEMENTED;
  151. }
  152. /* void tearDownEditorOnWindow (in nsIDOMWindow window); */
  153. NS_IMETHODIMP nsEditingSession::TearDownEditorOnWindow(nsIDOMWindow *window)
  154. {
  155. return NS_ERROR_NOT_IMPLEMENTED;
  156. }
  157. /* void setEditorOnControllers (in nsIDOMWindow aWindow, in nsIEditor aEditor); */
  158. NS_IMETHODIMP nsEditingSession::SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor)
  159. {
  160. return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162. /* End of implementation class template. */
  163. #endif
  164. #endif /* __gen_nsIEditingSession_h__ */