PageRenderTime 46ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/gecko_api/include/nsIDOMDocument.h

http://firefox-mac-pdf.googlecode.com/
C Header | 297 lines | 176 code | 58 blank | 63 comment | 0 complexity | 57e1fe07abe7b4a220bdd3d9a90d3c82 MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/dom/public/idl/core/nsIDOMDocument.idl
  3. */
  4. #ifndef __gen_nsIDOMDocument_h__
  5. #define __gen_nsIDOMDocument_h__
  6. #ifndef __gen_nsIDOMNode_h__
  7. #include "nsIDOMNode.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. /* starting interface: nsIDOMDocument */
  14. #define NS_IDOMDOCUMENT_IID_STR "a6cf9075-15b3-11d2-932e-00805f8add32"
  15. #define NS_IDOMDOCUMENT_IID \
  16. {0xa6cf9075, 0x15b3, 0x11d2, \
  17. { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}
  18. class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMDocument : public nsIDOMNode {
  19. public:
  20. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMDOCUMENT_IID)
  21. /**
  22. * The nsIDOMDocument interface represents the entire HTML or XML document.
  23. * Conceptually, it is the root of the document tree, and provides the
  24. * primary access to the document's data.
  25. * Since elements, text nodes, comments, processing instructions, etc.
  26. * cannot exist outside the context of a Document, the nsIDOMDocument
  27. * interface also contains the factory methods needed to create these
  28. * objects.
  29. *
  30. * For more information on this interface please see
  31. * http://www.w3.org/TR/DOM-Level-2-Core/
  32. *
  33. * @status FROZEN
  34. */
  35. /* readonly attribute nsIDOMDocumentType doctype; */
  36. NS_SCRIPTABLE NS_IMETHOD GetDoctype(nsIDOMDocumentType * *aDoctype) = 0;
  37. /* readonly attribute nsIDOMDOMImplementation implementation; */
  38. NS_SCRIPTABLE NS_IMETHOD GetImplementation(nsIDOMDOMImplementation * *aImplementation) = 0;
  39. /* readonly attribute nsIDOMElement documentElement; */
  40. NS_SCRIPTABLE NS_IMETHOD GetDocumentElement(nsIDOMElement * *aDocumentElement) = 0;
  41. /* nsIDOMElement createElement (in DOMString tagName) raises (DOMException); */
  42. NS_SCRIPTABLE NS_IMETHOD CreateElement(const nsAString & tagName, nsIDOMElement **_retval) = 0;
  43. /* nsIDOMDocumentFragment createDocumentFragment (); */
  44. NS_SCRIPTABLE NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment **_retval) = 0;
  45. /* nsIDOMText createTextNode (in DOMString data); */
  46. NS_SCRIPTABLE NS_IMETHOD CreateTextNode(const nsAString & data, nsIDOMText **_retval) = 0;
  47. /* nsIDOMComment createComment (in DOMString data); */
  48. NS_SCRIPTABLE NS_IMETHOD CreateComment(const nsAString & data, nsIDOMComment **_retval) = 0;
  49. /* nsIDOMCDATASection createCDATASection (in DOMString data) raises (DOMException); */
  50. NS_SCRIPTABLE NS_IMETHOD CreateCDATASection(const nsAString & data, nsIDOMCDATASection **_retval) = 0;
  51. /* nsIDOMProcessingInstruction createProcessingInstruction (in DOMString target, in DOMString data) raises (DOMException); */
  52. NS_SCRIPTABLE NS_IMETHOD CreateProcessingInstruction(const nsAString & target, const nsAString & data, nsIDOMProcessingInstruction **_retval) = 0;
  53. /* nsIDOMAttr createAttribute (in DOMString name) raises (DOMException); */
  54. NS_SCRIPTABLE NS_IMETHOD CreateAttribute(const nsAString & name, nsIDOMAttr **_retval) = 0;
  55. /* nsIDOMEntityReference createEntityReference (in DOMString name) raises (DOMException); */
  56. NS_SCRIPTABLE NS_IMETHOD CreateEntityReference(const nsAString & name, nsIDOMEntityReference **_retval) = 0;
  57. /* nsIDOMNodeList getElementsByTagName (in DOMString tagname); */
  58. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagName(const nsAString & tagname, nsIDOMNodeList **_retval) = 0;
  59. /* nsIDOMNode importNode (in nsIDOMNode importedNode, in boolean deep) raises (DOMException); */
  60. NS_SCRIPTABLE NS_IMETHOD ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval) = 0;
  61. /* nsIDOMElement createElementNS (in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */
  62. NS_SCRIPTABLE NS_IMETHOD CreateElementNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMElement **_retval) = 0;
  63. /* nsIDOMAttr createAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */
  64. NS_SCRIPTABLE NS_IMETHOD CreateAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMAttr **_retval) = 0;
  65. /* nsIDOMNodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */
  66. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) = 0;
  67. /* nsIDOMElement getElementById (in DOMString elementId); */
  68. NS_SCRIPTABLE NS_IMETHOD GetElementById(const nsAString & elementId, nsIDOMElement **_retval) = 0;
  69. };
  70. NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMDocument, NS_IDOMDOCUMENT_IID)
  71. /* Use this macro when declaring classes that implement this interface. */
  72. #define NS_DECL_NSIDOMDOCUMENT \
  73. NS_SCRIPTABLE NS_IMETHOD GetDoctype(nsIDOMDocumentType * *aDoctype); \
  74. NS_SCRIPTABLE NS_IMETHOD GetImplementation(nsIDOMDOMImplementation * *aImplementation); \
  75. NS_SCRIPTABLE NS_IMETHOD GetDocumentElement(nsIDOMElement * *aDocumentElement); \
  76. NS_SCRIPTABLE NS_IMETHOD CreateElement(const nsAString & tagName, nsIDOMElement **_retval); \
  77. NS_SCRIPTABLE NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment **_retval); \
  78. NS_SCRIPTABLE NS_IMETHOD CreateTextNode(const nsAString & data, nsIDOMText **_retval); \
  79. NS_SCRIPTABLE NS_IMETHOD CreateComment(const nsAString & data, nsIDOMComment **_retval); \
  80. NS_SCRIPTABLE NS_IMETHOD CreateCDATASection(const nsAString & data, nsIDOMCDATASection **_retval); \
  81. NS_SCRIPTABLE NS_IMETHOD CreateProcessingInstruction(const nsAString & target, const nsAString & data, nsIDOMProcessingInstruction **_retval); \
  82. NS_SCRIPTABLE NS_IMETHOD CreateAttribute(const nsAString & name, nsIDOMAttr **_retval); \
  83. NS_SCRIPTABLE NS_IMETHOD CreateEntityReference(const nsAString & name, nsIDOMEntityReference **_retval); \
  84. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagName(const nsAString & tagname, nsIDOMNodeList **_retval); \
  85. NS_SCRIPTABLE NS_IMETHOD ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval); \
  86. NS_SCRIPTABLE NS_IMETHOD CreateElementNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMElement **_retval); \
  87. NS_SCRIPTABLE NS_IMETHOD CreateAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMAttr **_retval); \
  88. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval); \
  89. NS_SCRIPTABLE NS_IMETHOD GetElementById(const nsAString & elementId, nsIDOMElement **_retval);
  90. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  91. #define NS_FORWARD_NSIDOMDOCUMENT(_to) \
  92. NS_SCRIPTABLE NS_IMETHOD GetDoctype(nsIDOMDocumentType * *aDoctype) { return _to GetDoctype(aDoctype); } \
  93. NS_SCRIPTABLE NS_IMETHOD GetImplementation(nsIDOMDOMImplementation * *aImplementation) { return _to GetImplementation(aImplementation); } \
  94. NS_SCRIPTABLE NS_IMETHOD GetDocumentElement(nsIDOMElement * *aDocumentElement) { return _to GetDocumentElement(aDocumentElement); } \
  95. NS_SCRIPTABLE NS_IMETHOD CreateElement(const nsAString & tagName, nsIDOMElement **_retval) { return _to CreateElement(tagName, _retval); } \
  96. NS_SCRIPTABLE NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment **_retval) { return _to CreateDocumentFragment(_retval); } \
  97. NS_SCRIPTABLE NS_IMETHOD CreateTextNode(const nsAString & data, nsIDOMText **_retval) { return _to CreateTextNode(data, _retval); } \
  98. NS_SCRIPTABLE NS_IMETHOD CreateComment(const nsAString & data, nsIDOMComment **_retval) { return _to CreateComment(data, _retval); } \
  99. NS_SCRIPTABLE NS_IMETHOD CreateCDATASection(const nsAString & data, nsIDOMCDATASection **_retval) { return _to CreateCDATASection(data, _retval); } \
  100. NS_SCRIPTABLE NS_IMETHOD CreateProcessingInstruction(const nsAString & target, const nsAString & data, nsIDOMProcessingInstruction **_retval) { return _to CreateProcessingInstruction(target, data, _retval); } \
  101. NS_SCRIPTABLE NS_IMETHOD CreateAttribute(const nsAString & name, nsIDOMAttr **_retval) { return _to CreateAttribute(name, _retval); } \
  102. NS_SCRIPTABLE NS_IMETHOD CreateEntityReference(const nsAString & name, nsIDOMEntityReference **_retval) { return _to CreateEntityReference(name, _retval); } \
  103. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagName(const nsAString & tagname, nsIDOMNodeList **_retval) { return _to GetElementsByTagName(tagname, _retval); } \
  104. NS_SCRIPTABLE NS_IMETHOD ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval) { return _to ImportNode(importedNode, deep, _retval); } \
  105. NS_SCRIPTABLE NS_IMETHOD CreateElementNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMElement **_retval) { return _to CreateElementNS(namespaceURI, qualifiedName, _retval); } \
  106. NS_SCRIPTABLE NS_IMETHOD CreateAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMAttr **_retval) { return _to CreateAttributeNS(namespaceURI, qualifiedName, _retval); } \
  107. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) { return _to GetElementsByTagNameNS(namespaceURI, localName, _retval); } \
  108. NS_SCRIPTABLE NS_IMETHOD GetElementById(const nsAString & elementId, nsIDOMElement **_retval) { return _to GetElementById(elementId, _retval); }
  109. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  110. #define NS_FORWARD_SAFE_NSIDOMDOCUMENT(_to) \
  111. NS_SCRIPTABLE NS_IMETHOD GetDoctype(nsIDOMDocumentType * *aDoctype) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDoctype(aDoctype); } \
  112. NS_SCRIPTABLE NS_IMETHOD GetImplementation(nsIDOMDOMImplementation * *aImplementation) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImplementation(aImplementation); } \
  113. NS_SCRIPTABLE NS_IMETHOD GetDocumentElement(nsIDOMElement * *aDocumentElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentElement(aDocumentElement); } \
  114. NS_SCRIPTABLE NS_IMETHOD CreateElement(const nsAString & tagName, nsIDOMElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateElement(tagName, _retval); } \
  115. NS_SCRIPTABLE NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateDocumentFragment(_retval); } \
  116. NS_SCRIPTABLE NS_IMETHOD CreateTextNode(const nsAString & data, nsIDOMText **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateTextNode(data, _retval); } \
  117. NS_SCRIPTABLE NS_IMETHOD CreateComment(const nsAString & data, nsIDOMComment **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateComment(data, _retval); } \
  118. NS_SCRIPTABLE NS_IMETHOD CreateCDATASection(const nsAString & data, nsIDOMCDATASection **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateCDATASection(data, _retval); } \
  119. NS_SCRIPTABLE NS_IMETHOD CreateProcessingInstruction(const nsAString & target, const nsAString & data, nsIDOMProcessingInstruction **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateProcessingInstruction(target, data, _retval); } \
  120. NS_SCRIPTABLE NS_IMETHOD CreateAttribute(const nsAString & name, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAttribute(name, _retval); } \
  121. NS_SCRIPTABLE NS_IMETHOD CreateEntityReference(const nsAString & name, nsIDOMEntityReference **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateEntityReference(name, _retval); } \
  122. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagName(const nsAString & tagname, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByTagName(tagname, _retval); } \
  123. NS_SCRIPTABLE NS_IMETHOD ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportNode(importedNode, deep, _retval); } \
  124. NS_SCRIPTABLE NS_IMETHOD CreateElementNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateElementNS(namespaceURI, qualifiedName, _retval); } \
  125. NS_SCRIPTABLE NS_IMETHOD CreateAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAttributeNS(namespaceURI, qualifiedName, _retval); } \
  126. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByTagNameNS(namespaceURI, localName, _retval); } \
  127. NS_SCRIPTABLE NS_IMETHOD GetElementById(const nsAString & elementId, nsIDOMElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementById(elementId, _retval); }
  128. #if 0
  129. /* Use the code below as a template for the implementation class for this interface. */
  130. /* Header file */
  131. class nsDOMDocument : public nsIDOMDocument
  132. {
  133. public:
  134. NS_DECL_ISUPPORTS
  135. NS_DECL_NSIDOMDOCUMENT
  136. nsDOMDocument();
  137. private:
  138. ~nsDOMDocument();
  139. protected:
  140. /* additional members */
  141. };
  142. /* Implementation file */
  143. NS_IMPL_ISUPPORTS1(nsDOMDocument, nsIDOMDocument)
  144. nsDOMDocument::nsDOMDocument()
  145. {
  146. /* member initializers and constructor code */
  147. }
  148. nsDOMDocument::~nsDOMDocument()
  149. {
  150. /* destructor code */
  151. }
  152. /* readonly attribute nsIDOMDocumentType doctype; */
  153. NS_IMETHODIMP nsDOMDocument::GetDoctype(nsIDOMDocumentType * *aDoctype)
  154. {
  155. return NS_ERROR_NOT_IMPLEMENTED;
  156. }
  157. /* readonly attribute nsIDOMDOMImplementation implementation; */
  158. NS_IMETHODIMP nsDOMDocument::GetImplementation(nsIDOMDOMImplementation * *aImplementation)
  159. {
  160. return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162. /* readonly attribute nsIDOMElement documentElement; */
  163. NS_IMETHODIMP nsDOMDocument::GetDocumentElement(nsIDOMElement * *aDocumentElement)
  164. {
  165. return NS_ERROR_NOT_IMPLEMENTED;
  166. }
  167. /* nsIDOMElement createElement (in DOMString tagName) raises (DOMException); */
  168. NS_IMETHODIMP nsDOMDocument::CreateElement(const nsAString & tagName, nsIDOMElement **_retval)
  169. {
  170. return NS_ERROR_NOT_IMPLEMENTED;
  171. }
  172. /* nsIDOMDocumentFragment createDocumentFragment (); */
  173. NS_IMETHODIMP nsDOMDocument::CreateDocumentFragment(nsIDOMDocumentFragment **_retval)
  174. {
  175. return NS_ERROR_NOT_IMPLEMENTED;
  176. }
  177. /* nsIDOMText createTextNode (in DOMString data); */
  178. NS_IMETHODIMP nsDOMDocument::CreateTextNode(const nsAString & data, nsIDOMText **_retval)
  179. {
  180. return NS_ERROR_NOT_IMPLEMENTED;
  181. }
  182. /* nsIDOMComment createComment (in DOMString data); */
  183. NS_IMETHODIMP nsDOMDocument::CreateComment(const nsAString & data, nsIDOMComment **_retval)
  184. {
  185. return NS_ERROR_NOT_IMPLEMENTED;
  186. }
  187. /* nsIDOMCDATASection createCDATASection (in DOMString data) raises (DOMException); */
  188. NS_IMETHODIMP nsDOMDocument::CreateCDATASection(const nsAString & data, nsIDOMCDATASection **_retval)
  189. {
  190. return NS_ERROR_NOT_IMPLEMENTED;
  191. }
  192. /* nsIDOMProcessingInstruction createProcessingInstruction (in DOMString target, in DOMString data) raises (DOMException); */
  193. NS_IMETHODIMP nsDOMDocument::CreateProcessingInstruction(const nsAString & target, const nsAString & data, nsIDOMProcessingInstruction **_retval)
  194. {
  195. return NS_ERROR_NOT_IMPLEMENTED;
  196. }
  197. /* nsIDOMAttr createAttribute (in DOMString name) raises (DOMException); */
  198. NS_IMETHODIMP nsDOMDocument::CreateAttribute(const nsAString & name, nsIDOMAttr **_retval)
  199. {
  200. return NS_ERROR_NOT_IMPLEMENTED;
  201. }
  202. /* nsIDOMEntityReference createEntityReference (in DOMString name) raises (DOMException); */
  203. NS_IMETHODIMP nsDOMDocument::CreateEntityReference(const nsAString & name, nsIDOMEntityReference **_retval)
  204. {
  205. return NS_ERROR_NOT_IMPLEMENTED;
  206. }
  207. /* nsIDOMNodeList getElementsByTagName (in DOMString tagname); */
  208. NS_IMETHODIMP nsDOMDocument::GetElementsByTagName(const nsAString & tagname, nsIDOMNodeList **_retval)
  209. {
  210. return NS_ERROR_NOT_IMPLEMENTED;
  211. }
  212. /* nsIDOMNode importNode (in nsIDOMNode importedNode, in boolean deep) raises (DOMException); */
  213. NS_IMETHODIMP nsDOMDocument::ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval)
  214. {
  215. return NS_ERROR_NOT_IMPLEMENTED;
  216. }
  217. /* nsIDOMElement createElementNS (in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */
  218. NS_IMETHODIMP nsDOMDocument::CreateElementNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMElement **_retval)
  219. {
  220. return NS_ERROR_NOT_IMPLEMENTED;
  221. }
  222. /* nsIDOMAttr createAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */
  223. NS_IMETHODIMP nsDOMDocument::CreateAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMAttr **_retval)
  224. {
  225. return NS_ERROR_NOT_IMPLEMENTED;
  226. }
  227. /* nsIDOMNodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */
  228. NS_IMETHODIMP nsDOMDocument::GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval)
  229. {
  230. return NS_ERROR_NOT_IMPLEMENTED;
  231. }
  232. /* nsIDOMElement getElementById (in DOMString elementId); */
  233. NS_IMETHODIMP nsDOMDocument::GetElementById(const nsAString & elementId, nsIDOMElement **_retval)
  234. {
  235. return NS_ERROR_NOT_IMPLEMENTED;
  236. }
  237. /* End of implementation class template. */
  238. #endif
  239. #endif /* __gen_nsIDOMDocument_h__ */