nsIDOMCSSRule.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/css/nsIDOMCSSRule.idl
  3. */
  4. #ifndef __gen_nsIDOMCSSRule_h__
  5. #define __gen_nsIDOMCSSRule_h__
  6. #ifndef __gen_domstubs_h__
  7. #include "domstubs.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: nsIDOMCSSRule */
  14. #define NS_IDOMCSSRULE_IID_STR "a6cf90c1-15b3-11d2-932e-00805f8add32"
  15. #define NS_IDOMCSSRULE_IID \
  16. {0xa6cf90c1, 0x15b3, 0x11d2, \
  17. { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}
  18. class NS_NO_VTABLE nsIDOMCSSRule : public nsISupports {
  19. public:
  20. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCSSRULE_IID)
  21. /**
  22. * The nsIDOMCSSRule interface is a datatype for a CSS style rule in
  23. * the Document Object Model.
  24. *
  25. * For more information on this interface please see
  26. * http://www.w3.org/TR/DOM-Level-2-Style
  27. *
  28. * @status FROZEN
  29. */
  30. enum { UNKNOWN_RULE = 0U };
  31. enum { STYLE_RULE = 1U };
  32. enum { CHARSET_RULE = 2U };
  33. enum { IMPORT_RULE = 3U };
  34. enum { MEDIA_RULE = 4U };
  35. enum { FONT_FACE_RULE = 5U };
  36. enum { PAGE_RULE = 6U };
  37. /* readonly attribute unsigned short type; */
  38. NS_IMETHOD GetType(PRUint16 *aType) = 0;
  39. /* attribute DOMString cssText; */
  40. NS_IMETHOD GetCssText(nsAString & aCssText) = 0;
  41. NS_IMETHOD SetCssText(const nsAString & aCssText) = 0;
  42. /* readonly attribute nsIDOMCSSStyleSheet parentStyleSheet; */
  43. NS_IMETHOD GetParentStyleSheet(nsIDOMCSSStyleSheet * *aParentStyleSheet) = 0;
  44. /* readonly attribute nsIDOMCSSRule parentRule; */
  45. NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) = 0;
  46. };
  47. /* Use this macro when declaring classes that implement this interface. */
  48. #define NS_DECL_NSIDOMCSSRULE \
  49. NS_IMETHOD GetType(PRUint16 *aType); \
  50. NS_IMETHOD GetCssText(nsAString & aCssText); \
  51. NS_IMETHOD SetCssText(const nsAString & aCssText); \
  52. NS_IMETHOD GetParentStyleSheet(nsIDOMCSSStyleSheet * *aParentStyleSheet); \
  53. NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule);
  54. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  55. #define NS_FORWARD_NSIDOMCSSRULE(_to) \
  56. NS_IMETHOD GetType(PRUint16 *aType) { return _to GetType(aType); } \
  57. NS_IMETHOD GetCssText(nsAString & aCssText) { return _to GetCssText(aCssText); } \
  58. NS_IMETHOD SetCssText(const nsAString & aCssText) { return _to SetCssText(aCssText); } \
  59. NS_IMETHOD GetParentStyleSheet(nsIDOMCSSStyleSheet * *aParentStyleSheet) { return _to GetParentStyleSheet(aParentStyleSheet); } \
  60. NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) { return _to GetParentRule(aParentRule); }
  61. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  62. #define NS_FORWARD_SAFE_NSIDOMCSSRULE(_to) \
  63. NS_IMETHOD GetType(PRUint16 *aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
  64. NS_IMETHOD GetCssText(nsAString & aCssText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCssText(aCssText); } \
  65. NS_IMETHOD SetCssText(const nsAString & aCssText) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCssText(aCssText); } \
  66. NS_IMETHOD GetParentStyleSheet(nsIDOMCSSStyleSheet * *aParentStyleSheet) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParentStyleSheet(aParentStyleSheet); } \
  67. NS_IMETHOD GetParentRule(nsIDOMCSSRule * *aParentRule) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParentRule(aParentRule); }
  68. #if 0
  69. /* Use the code below as a template for the implementation class for this interface. */
  70. /* Header file */
  71. class nsDOMCSSRule : public nsIDOMCSSRule
  72. {
  73. public:
  74. NS_DECL_ISUPPORTS
  75. NS_DECL_NSIDOMCSSRULE
  76. nsDOMCSSRule();
  77. private:
  78. ~nsDOMCSSRule();
  79. protected:
  80. /* additional members */
  81. };
  82. /* Implementation file */
  83. NS_IMPL_ISUPPORTS1(nsDOMCSSRule, nsIDOMCSSRule)
  84. nsDOMCSSRule::nsDOMCSSRule()
  85. {
  86. /* member initializers and constructor code */
  87. }
  88. nsDOMCSSRule::~nsDOMCSSRule()
  89. {
  90. /* destructor code */
  91. }
  92. /* readonly attribute unsigned short type; */
  93. NS_IMETHODIMP nsDOMCSSRule::GetType(PRUint16 *aType)
  94. {
  95. return NS_ERROR_NOT_IMPLEMENTED;
  96. }
  97. /* attribute DOMString cssText; */
  98. NS_IMETHODIMP nsDOMCSSRule::GetCssText(nsAString & aCssText)
  99. {
  100. return NS_ERROR_NOT_IMPLEMENTED;
  101. }
  102. NS_IMETHODIMP nsDOMCSSRule::SetCssText(const nsAString & aCssText)
  103. {
  104. return NS_ERROR_NOT_IMPLEMENTED;
  105. }
  106. /* readonly attribute nsIDOMCSSStyleSheet parentStyleSheet; */
  107. NS_IMETHODIMP nsDOMCSSRule::GetParentStyleSheet(nsIDOMCSSStyleSheet * *aParentStyleSheet)
  108. {
  109. return NS_ERROR_NOT_IMPLEMENTED;
  110. }
  111. /* readonly attribute nsIDOMCSSRule parentRule; */
  112. NS_IMETHODIMP nsDOMCSSRule::GetParentRule(nsIDOMCSSRule * *aParentRule)
  113. {
  114. return NS_ERROR_NOT_IMPLEMENTED;
  115. }
  116. /* End of implementation class template. */
  117. #endif
  118. #endif /* __gen_nsIDOMCSSRule_h__ */