nsIDOMElement.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/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 nsIDOMElement : public nsIDOMNode {
  19. public:
  20. NS_DEFINE_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_IMETHOD GetTagName(nsAString & aTagName) = 0;
  32. /* DOMString getAttribute (in DOMString name); */
  33. NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval) = 0;
  34. /* void setAttribute (in DOMString name, in DOMString value) raises (DOMException); */
  35. NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value) = 0;
  36. /* void removeAttribute (in DOMString name) raises (DOMException); */
  37. NS_IMETHOD RemoveAttribute(const nsAString & name) = 0;
  38. /* nsIDOMAttr getAttributeNode (in DOMString name); */
  39. NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) = 0;
  40. /* nsIDOMAttr setAttributeNode (in nsIDOMAttr newAttr) raises (DOMException); */
  41. NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) = 0;
  42. /* nsIDOMAttr removeAttributeNode (in nsIDOMAttr oldAttr) raises (DOMException); */
  43. NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) = 0;
  44. /* nsIDOMNodeList getElementsByTagName (in DOMString name); */
  45. NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) = 0;
  46. /* DOMString getAttributeNS (in DOMString namespaceURI, in DOMString localName); */
  47. 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_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_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) = 0;
  52. /* nsIDOMAttr getAttributeNodeNS (in DOMString namespaceURI, in DOMString localName); */
  53. NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) = 0;
  54. /* nsIDOMAttr setAttributeNodeNS (in nsIDOMAttr newAttr) raises (DOMException); */
  55. NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) = 0;
  56. /* nsIDOMNodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */
  57. NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) = 0;
  58. /* boolean hasAttribute (in DOMString name); */
  59. NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval) = 0;
  60. /* boolean hasAttributeNS (in DOMString namespaceURI, in DOMString localName); */
  61. NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) = 0;
  62. };
  63. /* Use this macro when declaring classes that implement this interface. */
  64. #define NS_DECL_NSIDOMELEMENT \
  65. NS_IMETHOD GetTagName(nsAString & aTagName); \
  66. NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval); \
  67. NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value); \
  68. NS_IMETHOD RemoveAttribute(const nsAString & name); \
  69. NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval); \
  70. NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval); \
  71. NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval); \
  72. NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval); \
  73. NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval); \
  74. NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value); \
  75. NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName); \
  76. NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval); \
  77. NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval); \
  78. NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval); \
  79. NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval); \
  80. NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval);
  81. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  82. #define NS_FORWARD_NSIDOMELEMENT(_to) \
  83. NS_IMETHOD GetTagName(nsAString & aTagName) { return _to GetTagName(aTagName); } \
  84. NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval) { return _to GetAttribute(name, _retval); } \
  85. NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value) { return _to SetAttribute(name, value); } \
  86. NS_IMETHOD RemoveAttribute(const nsAString & name) { return _to RemoveAttribute(name); } \
  87. NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) { return _to GetAttributeNode(name, _retval); } \
  88. NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return _to SetAttributeNode(newAttr, _retval); } \
  89. NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) { return _to RemoveAttributeNode(oldAttr, _retval); } \
  90. NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) { return _to GetElementsByTagName(name, _retval); } \
  91. NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval) { return _to GetAttributeNS(namespaceURI, localName, _retval); } \
  92. NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value) { return _to SetAttributeNS(namespaceURI, qualifiedName, value); } \
  93. NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) { return _to RemoveAttributeNS(namespaceURI, localName); } \
  94. NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) { return _to GetAttributeNodeNS(namespaceURI, localName, _retval); } \
  95. NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return _to SetAttributeNodeNS(newAttr, _retval); } \
  96. NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) { return _to GetElementsByTagNameNS(namespaceURI, localName, _retval); } \
  97. NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval) { return _to HasAttribute(name, _retval); } \
  98. NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) { return _to HasAttributeNS(namespaceURI, localName, _retval); }
  99. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  100. #define NS_FORWARD_SAFE_NSIDOMELEMENT(_to) \
  101. NS_IMETHOD GetTagName(nsAString & aTagName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTagName(aTagName); } \
  102. NS_IMETHOD GetAttribute(const nsAString & name, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttribute(name, _retval); } \
  103. NS_IMETHOD SetAttribute(const nsAString & name, const nsAString & value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttribute(name, value); } \
  104. NS_IMETHOD RemoveAttribute(const nsAString & name) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttribute(name); } \
  105. NS_IMETHOD GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeNode(name, _retval); } \
  106. NS_IMETHOD SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeNode(newAttr, _retval); } \
  107. NS_IMETHOD RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttributeNode(oldAttr, _retval); } \
  108. NS_IMETHOD GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByTagName(name, _retval); } \
  109. NS_IMETHOD GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeNS(namespaceURI, localName, _retval); } \
  110. NS_IMETHOD SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeNS(namespaceURI, qualifiedName, value); } \
  111. NS_IMETHOD RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAttributeNS(namespaceURI, localName); } \
  112. NS_IMETHOD GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributeNodeNS(namespaceURI, localName, _retval); } \
  113. NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeNodeNS(newAttr, _retval); } \
  114. NS_IMETHOD GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementsByTagNameNS(namespaceURI, localName, _retval); } \
  115. NS_IMETHOD HasAttribute(const nsAString & name, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAttribute(name, _retval); } \
  116. NS_IMETHOD HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAttributeNS(namespaceURI, localName, _retval); }
  117. #if 0
  118. /* Use the code below as a template for the implementation class for this interface. */
  119. /* Header file */
  120. class nsDOMElement : public nsIDOMElement
  121. {
  122. public:
  123. NS_DECL_ISUPPORTS
  124. NS_DECL_NSIDOMELEMENT
  125. nsDOMElement();
  126. private:
  127. ~nsDOMElement();
  128. protected:
  129. /* additional members */
  130. };
  131. /* Implementation file */
  132. NS_IMPL_ISUPPORTS1(nsDOMElement, nsIDOMElement)
  133. nsDOMElement::nsDOMElement()
  134. {
  135. /* member initializers and constructor code */
  136. }
  137. nsDOMElement::~nsDOMElement()
  138. {
  139. /* destructor code */
  140. }
  141. /* readonly attribute DOMString tagName; */
  142. NS_IMETHODIMP nsDOMElement::GetTagName(nsAString & aTagName)
  143. {
  144. return NS_ERROR_NOT_IMPLEMENTED;
  145. }
  146. /* DOMString getAttribute (in DOMString name); */
  147. NS_IMETHODIMP nsDOMElement::GetAttribute(const nsAString & name, nsAString & _retval)
  148. {
  149. return NS_ERROR_NOT_IMPLEMENTED;
  150. }
  151. /* void setAttribute (in DOMString name, in DOMString value) raises (DOMException); */
  152. NS_IMETHODIMP nsDOMElement::SetAttribute(const nsAString & name, const nsAString & value)
  153. {
  154. return NS_ERROR_NOT_IMPLEMENTED;
  155. }
  156. /* void removeAttribute (in DOMString name) raises (DOMException); */
  157. NS_IMETHODIMP nsDOMElement::RemoveAttribute(const nsAString & name)
  158. {
  159. return NS_ERROR_NOT_IMPLEMENTED;
  160. }
  161. /* nsIDOMAttr getAttributeNode (in DOMString name); */
  162. NS_IMETHODIMP nsDOMElement::GetAttributeNode(const nsAString & name, nsIDOMAttr **_retval)
  163. {
  164. return NS_ERROR_NOT_IMPLEMENTED;
  165. }
  166. /* nsIDOMAttr setAttributeNode (in nsIDOMAttr newAttr) raises (DOMException); */
  167. NS_IMETHODIMP nsDOMElement::SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval)
  168. {
  169. return NS_ERROR_NOT_IMPLEMENTED;
  170. }
  171. /* nsIDOMAttr removeAttributeNode (in nsIDOMAttr oldAttr) raises (DOMException); */
  172. NS_IMETHODIMP nsDOMElement::RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval)
  173. {
  174. return NS_ERROR_NOT_IMPLEMENTED;
  175. }
  176. /* nsIDOMNodeList getElementsByTagName (in DOMString name); */
  177. NS_IMETHODIMP nsDOMElement::GetElementsByTagName(const nsAString & name, nsIDOMNodeList **_retval)
  178. {
  179. return NS_ERROR_NOT_IMPLEMENTED;
  180. }
  181. /* DOMString getAttributeNS (in DOMString namespaceURI, in DOMString localName); */
  182. NS_IMETHODIMP nsDOMElement::GetAttributeNS(const nsAString & namespaceURI, const nsAString & localName, nsAString & _retval)
  183. {
  184. return NS_ERROR_NOT_IMPLEMENTED;
  185. }
  186. /* void setAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName, in DOMString value) raises (DOMException); */
  187. NS_IMETHODIMP nsDOMElement::SetAttributeNS(const nsAString & namespaceURI, const nsAString & qualifiedName, const nsAString & value)
  188. {
  189. return NS_ERROR_NOT_IMPLEMENTED;
  190. }
  191. /* void removeAttributeNS (in DOMString namespaceURI, in DOMString localName) raises (DOMException); */
  192. NS_IMETHODIMP nsDOMElement::RemoveAttributeNS(const nsAString & namespaceURI, const nsAString & localName)
  193. {
  194. return NS_ERROR_NOT_IMPLEMENTED;
  195. }
  196. /* nsIDOMAttr getAttributeNodeNS (in DOMString namespaceURI, in DOMString localName); */
  197. NS_IMETHODIMP nsDOMElement::GetAttributeNodeNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMAttr **_retval)
  198. {
  199. return NS_ERROR_NOT_IMPLEMENTED;
  200. }
  201. /* nsIDOMAttr setAttributeNodeNS (in nsIDOMAttr newAttr) raises (DOMException); */
  202. NS_IMETHODIMP nsDOMElement::SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval)
  203. {
  204. return NS_ERROR_NOT_IMPLEMENTED;
  205. }
  206. /* nsIDOMNodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */
  207. NS_IMETHODIMP nsDOMElement::GetElementsByTagNameNS(const nsAString & namespaceURI, const nsAString & localName, nsIDOMNodeList **_retval)
  208. {
  209. return NS_ERROR_NOT_IMPLEMENTED;
  210. }
  211. /* boolean hasAttribute (in DOMString name); */
  212. NS_IMETHODIMP nsDOMElement::HasAttribute(const nsAString & name, PRBool *_retval)
  213. {
  214. return NS_ERROR_NOT_IMPLEMENTED;
  215. }
  216. /* boolean hasAttributeNS (in DOMString namespaceURI, in DOMString localName); */
  217. NS_IMETHODIMP nsDOMElement::HasAttributeNS(const nsAString & namespaceURI, const nsAString & localName, PRBool *_retval)
  218. {
  219. return NS_ERROR_NOT_IMPLEMENTED;
  220. }
  221. /* End of implementation class template. */
  222. #endif
  223. #endif /* __gen_nsIDOMElement_h__ */