/gecko_api/include/nsIDOMElement.h

http://firefox-mac-pdf.googlecode.com/ · C Header · 280 lines · 168 code · 56 blank · 56 comment · 0 complexity · 62e583a2e1a26bc97704b2928daefd06 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/nsIDOMElement.idl
  3. */
  4. #ifndef __gen_nsIDOMElement_h__
  5. #define __gen_nsIDOMElement_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: nsIDOMElement */
  14. #define NS_IDOMELEMENT_IID_STR "a6cf9078-15b3-11d2-932e-00805f8add32"
  15. #define NS_IDOMELEMENT_IID \
  16. {0xa6cf9078, 0x15b3, 0x11d2, \
  17. { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}
  18. class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMElement : public nsIDOMNode {
  19. public:
  20. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMELEMENT_IID)
  21. /**
  22. * The nsIDOMElement interface represents an element in an HTML or
  23. * XML document.
  24. *
  25. * For more information on this interface please see
  26. * http://www.w3.org/TR/DOM-Level-2-Core/
  27. *
  28. * @status FROZEN
  29. */
  30. /* readonly attribute DOMString tagName; */
  31. NS_SCRIPTABLE NS_IMETHOD GetTagName(nsAString & aTagName) = 0;
  32. /* DOMString getAttribute (in DOMString name); */
  33. NS_SCRIPTABLE NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval) = 0;
  34. /* void setAttribute (in DOMString name, in DOMString value) raises (DOMException); */
  35. NS_SCRIPTABLE NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value) = 0;
  36. /* void removeAttribute (in DOMString name) raises (DOMException); */
  37. NS_SCRIPTABLE NS_IMETHOD RemoveAttribute(const nsAString & name) = 0;
  38. /* nsIDOMAttr getAttributeNode (in DOMString name); */
  39. NS_SCRIPTABLE NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) = 0;
  40. /* nsIDOMAttr setAttributeNode (in nsIDOMAttr newAttr) raises (DOMException); */
  41. NS_SCRIPTABLE NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) = 0;
  42. /* nsIDOMAttr removeAttributeNode (in nsIDOMAttr oldAttr) raises (DOMException); */
  43. NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) = 0;
  44. /* nsIDOMNodeList getElementsByTagName (in DOMString name); */
  45. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) = 0;
  46. /* DOMString getAttributeNS (in DOMString namespaceURI, in DOMString localName); */
  47. NS_SCRIPTABLE NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval) = 0;
  48. /* void setAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName, in DOMString value) raises (DOMException); */
  49. NS_SCRIPTABLE NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value) = 0;
  50. /* void removeAttributeNS (in DOMString namespaceURI, in DOMString localName) raises (DOMException); */
  51. NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) = 0;
  52. /* nsIDOMAttr getAttributeNodeNS (in DOMString namespaceURI, in DOMString localName); */
  53. NS_SCRIPTABLE NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) = 0;
  54. /* nsIDOMAttr setAttributeNodeNS (in nsIDOMAttr newAttr) raises (DOMException); */
  55. NS_SCRIPTABLE NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) = 0;
  56. /* nsIDOMNodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */
  57. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) = 0;
  58. /* boolean hasAttribute (in DOMString name); */
  59. NS_SCRIPTABLE NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval) = 0;
  60. /* boolean hasAttributeNS (in DOMString namespaceURI, in DOMString localName); */
  61. NS_SCRIPTABLE NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) = 0;
  62. };
  63. NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMElement, NS_IDOMELEMENT_IID)
  64. /* Use this macro when declaring classes that implement this interface. */
  65. #define NS_DECL_NSIDOMELEMENT \
  66. NS_SCRIPTABLE NS_IMETHOD GetTagName(nsAString & aTagName); \
  67. NS_SCRIPTABLE NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval); \
  68. NS_SCRIPTABLE NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value); \
  69. NS_SCRIPTABLE NS_IMETHOD RemoveAttribute(const nsAString & name); \
  70. NS_SCRIPTABLE NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval); \
  71. NS_SCRIPTABLE NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval); \
  72. NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval); \
  73. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval); \
  74. NS_SCRIPTABLE NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval); \
  75. NS_SCRIPTABLE NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value); \
  76. NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName); \
  77. NS_SCRIPTABLE NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval); \
  78. NS_SCRIPTABLE NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval); \
  79. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval); \
  80. NS_SCRIPTABLE NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval); \
  81. NS_SCRIPTABLE NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval);
  82. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  83. #define NS_FORWARD_NSIDOMELEMENT(_to) \
  84. NS_SCRIPTABLE NS_IMETHOD GetTagName(nsAString & aTagName) { return _to GetTagName(aTagName); } \
  85. NS_SCRIPTABLE NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval) { return _to GetAttribute(name, _retval); } \
  86. NS_SCRIPTABLE NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value) { return _to SetAttribute(name, value); } \
  87. NS_SCRIPTABLE NS_IMETHOD RemoveAttribute(const nsAString & name) { return _to RemoveAttribute(name); } \
  88. NS_SCRIPTABLE NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) { return _to GetAttributeNode(name, _retval); } \
  89. NS_SCRIPTABLE NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return _to SetAttributeNode(newAttr, _retval); } \
  90. NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) { return _to RemoveAttributeNode(oldAttr, _retval); } \
  91. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) { return _to GetElementsByTagName(name, _retval); } \
  92. NS_SCRIPTABLE NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval) { return _to GetAttributeNS(namespaceURI, localName, _retval); } \
  93. NS_SCRIPTABLE NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value) { return _to SetAttributeNS(namespaceURI, qualifiedName, value); } \
  94. NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) { return _to RemoveAttributeNS(namespaceURI, localName); } \
  95. NS_SCRIPTABLE NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) { return _to GetAttributeNodeNS(namespaceURI, localName, _retval); } \
  96. NS_SCRIPTABLE NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return _to SetAttributeNodeNS(newAttr, _retval); } \
  97. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) { return _to GetElementsByTagNameNS(namespaceURI, localName, _retval); } \
  98. NS_SCRIPTABLE NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval) { return _to HasAttribute(name, _retval); } \
  99. NS_SCRIPTABLE NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) { return _to HasAttributeNS(namespaceURI, localName, _retval); }
  100. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  101. #define NS_FORWARD_SAFE_NSIDOMELEMENT(_to) \
  102. NS_SCRIPTABLE NS_IMETHOD GetTagName(nsAString & aTagName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTagName(aTagName); } \
  103. NS_SCRIPTABLE NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttribute(name, _retval); } \
  104. NS_SCRIPTABLE NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttribute(name, value); } \
  105. NS_SCRIPTABLE NS_IMETHOD RemoveAttribute(const nsAString & name) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttribute(name); } \
  106. NS_SCRIPTABLE NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeNode(name, _retval); } \
  107. NS_SCRIPTABLE NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeNode(newAttr, _retval); } \
  108. NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttributeNode(oldAttr, _retval); } \
  109. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByTagName(name, _retval); } \
  110. NS_SCRIPTABLE NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeNS(namespaceURI, localName, _retval); } \
  111. NS_SCRIPTABLE NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeNS(namespaceURI, qualifiedName, value); } \
  112. NS_SCRIPTABLE NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttributeNS(namespaceURI, localName); } \
  113. NS_SCRIPTABLE NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeNodeNS(namespaceURI, localName, _retval); } \
  114. NS_SCRIPTABLE NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeNodeNS(newAttr, _retval); } \
  115. NS_SCRIPTABLE NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByTagNameNS(namespaceURI, localName, _retval); } \
  116. NS_SCRIPTABLE NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAttribute(name, _retval); } \
  117. NS_SCRIPTABLE NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAttributeNS(namespaceURI, localName, _retval); }
  118. #if 0
  119. /* Use the code below as a template for the implementation class for this interface. */
  120. /* Header file */
  121. class nsDOMElement : public nsIDOMElement
  122. {
  123. public:
  124. NS_DECL_ISUPPORTS
  125. NS_DECL_NSIDOMELEMENT
  126. nsDOMElement();
  127. private:
  128. ~nsDOMElement();
  129. protected:
  130. /* additional members */
  131. };
  132. /* Implementation file */
  133. NS_IMPL_ISUPPORTS1(nsDOMElement, nsIDOMElement)
  134. nsDOMElement::nsDOMElement()
  135. {
  136. /* member initializers and constructor code */
  137. }
  138. nsDOMElement::~nsDOMElement()
  139. {
  140. /* destructor code */
  141. }
  142. /* readonly attribute DOMString tagName; */
  143. NS_IMETHODIMP nsDOMElement::GetTagName(nsAString & aTagName)
  144. {
  145. return NS_ERROR_NOT_IMPLEMENTED;
  146. }
  147. /* DOMString getAttribute (in DOMString name); */
  148. NS_IMETHODIMP nsDOMElement::GetAttribute(const nsAString & name, nsAString & _retval)
  149. {
  150. return NS_ERROR_NOT_IMPLEMENTED;
  151. }
  152. /* void setAttribute (in DOMString name, in DOMString value) raises (DOMException); */
  153. NS_IMETHODIMP nsDOMElement::SetAttribute(const nsAString & name, const nsAString & value)
  154. {
  155. return NS_ERROR_NOT_IMPLEMENTED;
  156. }
  157. /* void removeAttribute (in DOMString name) raises (DOMException); */
  158. NS_IMETHODIMP nsDOMElement::RemoveAttribute(const nsAString & name)
  159. {
  160. return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162. /* nsIDOMAttr getAttributeNode (in DOMString name); */
  163. NS_IMETHODIMP nsDOMElement::GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval)
  164. {
  165. return NS_ERROR_NOT_IMPLEMENTED;
  166. }
  167. /* nsIDOMAttr setAttributeNode (in nsIDOMAttr newAttr) raises (DOMException); */
  168. NS_IMETHODIMP nsDOMElement::SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval)
  169. {
  170. return NS_ERROR_NOT_IMPLEMENTED;
  171. }
  172. /* nsIDOMAttr removeAttributeNode (in nsIDOMAttr oldAttr) raises (DOMException); */
  173. NS_IMETHODIMP nsDOMElement::RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval)
  174. {
  175. return NS_ERROR_NOT_IMPLEMENTED;
  176. }
  177. /* nsIDOMNodeList getElementsByTagName (in DOMString name); */
  178. NS_IMETHODIMP nsDOMElement::GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval)
  179. {
  180. return NS_ERROR_NOT_IMPLEMENTED;
  181. }
  182. /* DOMString getAttributeNS (in DOMString namespaceURI, in DOMString localName); */
  183. NS_IMETHODIMP nsDOMElement::GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval)
  184. {
  185. return NS_ERROR_NOT_IMPLEMENTED;
  186. }
  187. /* void setAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName, in DOMString value) raises (DOMException); */
  188. NS_IMETHODIMP nsDOMElement::SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value)
  189. {
  190. return NS_ERROR_NOT_IMPLEMENTED;
  191. }
  192. /* void removeAttributeNS (in DOMString namespaceURI, in DOMString localName) raises (DOMException); */
  193. NS_IMETHODIMP nsDOMElement::RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName)
  194. {
  195. return NS_ERROR_NOT_IMPLEMENTED;
  196. }
  197. /* nsIDOMAttr getAttributeNodeNS (in DOMString namespaceURI, in DOMString localName); */
  198. NS_IMETHODIMP nsDOMElement::GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval)
  199. {
  200. return NS_ERROR_NOT_IMPLEMENTED;
  201. }
  202. /* nsIDOMAttr setAttributeNodeNS (in nsIDOMAttr newAttr) raises (DOMException); */
  203. NS_IMETHODIMP nsDOMElement::SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval)
  204. {
  205. return NS_ERROR_NOT_IMPLEMENTED;
  206. }
  207. /* nsIDOMNodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */
  208. NS_IMETHODIMP nsDOMElement::GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval)
  209. {
  210. return NS_ERROR_NOT_IMPLEMENTED;
  211. }
  212. /* boolean hasAttribute (in DOMString name); */
  213. NS_IMETHODIMP nsDOMElement::HasAttribute(const nsAString & name, PRBool *_retval)
  214. {
  215. return NS_ERROR_NOT_IMPLEMENTED;
  216. }
  217. /* boolean hasAttributeNS (in DOMString namespaceURI, in DOMString localName); */
  218. NS_IMETHODIMP nsDOMElement::HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval)
  219. {
  220. return NS_ERROR_NOT_IMPLEMENTED;
  221. }
  222. /* End of implementation class template. */
  223. #endif
  224. #endif /* __gen_nsIDOMElement_h__ */