nsIDOMCSSPrimitiveValue.h 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/css/nsIDOMCSSPrimitiveValue.idl
  3. */
  4. #ifndef __gen_nsIDOMCSSPrimitiveValue_h__
  5. #define __gen_nsIDOMCSSPrimitiveValue_h__
  6. #ifndef __gen_nsIDOMCSSValue_h__
  7. #include "nsIDOMCSSValue.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: nsIDOMCSSPrimitiveValue */
  14. #define NS_IDOMCSSPRIMITIVEVALUE_IID_STR "e249031f-8df9-4e7a-b644-18946dce0019"
  15. #define NS_IDOMCSSPRIMITIVEVALUE_IID \
  16. {0xe249031f, 0x8df9, 0x4e7a, \
  17. { 0xb6, 0x44, 0x18, 0x94, 0x6d, 0xce, 0x00, 0x19 }}
  18. class NS_NO_VTABLE nsIDOMCSSPrimitiveValue : public nsIDOMCSSValue {
  19. public:
  20. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMCSSPRIMITIVEVALUE_IID)
  21. /**
  22. * The nsIDOMCSSPrimitiveValue interface is a datatype for a primitive
  23. * CSS value in 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 { CSS_UNKNOWN = 0U };
  31. enum { CSS_NUMBER = 1U };
  32. enum { CSS_PERCENTAGE = 2U };
  33. enum { CSS_EMS = 3U };
  34. enum { CSS_EXS = 4U };
  35. enum { CSS_PX = 5U };
  36. enum { CSS_CM = 6U };
  37. enum { CSS_MM = 7U };
  38. enum { CSS_IN = 8U };
  39. enum { CSS_PT = 9U };
  40. enum { CSS_PC = 10U };
  41. enum { CSS_DEG = 11U };
  42. enum { CSS_RAD = 12U };
  43. enum { CSS_GRAD = 13U };
  44. enum { CSS_MS = 14U };
  45. enum { CSS_S = 15U };
  46. enum { CSS_HZ = 16U };
  47. enum { CSS_KHZ = 17U };
  48. enum { CSS_DIMENSION = 18U };
  49. enum { CSS_STRING = 19U };
  50. enum { CSS_URI = 20U };
  51. enum { CSS_IDENT = 21U };
  52. enum { CSS_ATTR = 22U };
  53. enum { CSS_COUNTER = 23U };
  54. enum { CSS_RECT = 24U };
  55. enum { CSS_RGBCOLOR = 25U };
  56. /* readonly attribute unsigned short primitiveType; */
  57. NS_IMETHOD GetPrimitiveType(PRUint16 *aPrimitiveType) = 0;
  58. /* void setFloatValue (in unsigned short unitType, in float floatValue) raises (DOMException); */
  59. NS_IMETHOD SetFloatValue(PRUint16 unitType, float floatValue) = 0;
  60. /* float getFloatValue (in unsigned short unitType) raises (DOMException); */
  61. NS_IMETHOD GetFloatValue(PRUint16 unitType, float *_retval) = 0;
  62. /* void setStringValue (in unsigned short stringType, in DOMString stringValue) raises (DOMException); */
  63. NS_IMETHOD SetStringValue(PRUint16 stringType, const nsAString & stringValue) = 0;
  64. /* DOMString getStringValue () raises (DOMException); */
  65. NS_IMETHOD GetStringValue(nsAString & _retval) = 0;
  66. /* nsIDOMCounter getCounterValue () raises (DOMException); */
  67. NS_IMETHOD GetCounterValue(nsIDOMCounter **_retval) = 0;
  68. /* nsIDOMRect getRectValue () raises (DOMException); */
  69. NS_IMETHOD GetRectValue(nsIDOMRect **_retval) = 0;
  70. /* nsIDOMRGBColor getRGBColorValue () raises (DOMException); */
  71. NS_IMETHOD GetRGBColorValue(nsIDOMRGBColor **_retval) = 0;
  72. };
  73. /* Use this macro when declaring classes that implement this interface. */
  74. #define NS_DECL_NSIDOMCSSPRIMITIVEVALUE \
  75. NS_IMETHOD GetPrimitiveType(PRUint16 *aPrimitiveType); \
  76. NS_IMETHOD SetFloatValue(PRUint16 unitType, float floatValue); \
  77. NS_IMETHOD GetFloatValue(PRUint16 unitType, float *_retval); \
  78. NS_IMETHOD SetStringValue(PRUint16 stringType, const nsAString & stringValue); \
  79. NS_IMETHOD GetStringValue(nsAString & _retval); \
  80. NS_IMETHOD GetCounterValue(nsIDOMCounter **_retval); \
  81. NS_IMETHOD GetRectValue(nsIDOMRect **_retval); \
  82. NS_IMETHOD GetRGBColorValue(nsIDOMRGBColor **_retval);
  83. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  84. #define NS_FORWARD_NSIDOMCSSPRIMITIVEVALUE(_to) \
  85. NS_IMETHOD GetPrimitiveType(PRUint16 *aPrimitiveType) { return _to GetPrimitiveType(aPrimitiveType); } \
  86. NS_IMETHOD SetFloatValue(PRUint16 unitType, float floatValue) { return _to SetFloatValue(unitType, floatValue); } \
  87. NS_IMETHOD GetFloatValue(PRUint16 unitType, float *_retval) { return _to GetFloatValue(unitType, _retval); } \
  88. NS_IMETHOD SetStringValue(PRUint16 stringType, const nsAString & stringValue) { return _to SetStringValue(stringType, stringValue); } \
  89. NS_IMETHOD GetStringValue(nsAString & _retval) { return _to GetStringValue(_retval); } \
  90. NS_IMETHOD GetCounterValue(nsIDOMCounter **_retval) { return _to GetCounterValue(_retval); } \
  91. NS_IMETHOD GetRectValue(nsIDOMRect **_retval) { return _to GetRectValue(_retval); } \
  92. NS_IMETHOD GetRGBColorValue(nsIDOMRGBColor **_retval) { return _to GetRGBColorValue(_retval); }
  93. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  94. #define NS_FORWARD_SAFE_NSIDOMCSSPRIMITIVEVALUE(_to) \
  95. NS_IMETHOD GetPrimitiveType(PRUint16 *aPrimitiveType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrimitiveType(aPrimitiveType); } \
  96. NS_IMETHOD SetFloatValue(PRUint16 unitType, float floatValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFloatValue(unitType, floatValue); } \
  97. NS_IMETHOD GetFloatValue(PRUint16 unitType, float *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFloatValue(unitType, _retval); } \
  98. NS_IMETHOD SetStringValue(PRUint16 stringType, const nsAString & stringValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStringValue(stringType, stringValue); } \
  99. NS_IMETHOD GetStringValue(nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStringValue(_retval); } \
  100. NS_IMETHOD GetCounterValue(nsIDOMCounter **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCounterValue(_retval); } \
  101. NS_IMETHOD GetRectValue(nsIDOMRect **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRectValue(_retval); } \
  102. NS_IMETHOD GetRGBColorValue(nsIDOMRGBColor **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRGBColorValue(_retval); }
  103. #if 0
  104. /* Use the code below as a template for the implementation class for this interface. */
  105. /* Header file */
  106. class nsDOMCSSPrimitiveValue : public nsIDOMCSSPrimitiveValue
  107. {
  108. public:
  109. NS_DECL_ISUPPORTS
  110. NS_DECL_NSIDOMCSSPRIMITIVEVALUE
  111. nsDOMCSSPrimitiveValue();
  112. private:
  113. ~nsDOMCSSPrimitiveValue();
  114. protected:
  115. /* additional members */
  116. };
  117. /* Implementation file */
  118. NS_IMPL_ISUPPORTS1(nsDOMCSSPrimitiveValue, nsIDOMCSSPrimitiveValue)
  119. nsDOMCSSPrimitiveValue::nsDOMCSSPrimitiveValue()
  120. {
  121. /* member initializers and constructor code */
  122. }
  123. nsDOMCSSPrimitiveValue::~nsDOMCSSPrimitiveValue()
  124. {
  125. /* destructor code */
  126. }
  127. /* readonly attribute unsigned short primitiveType; */
  128. NS_IMETHODIMP nsDOMCSSPrimitiveValue::GetPrimitiveType(PRUint16 *aPrimitiveType)
  129. {
  130. return NS_ERROR_NOT_IMPLEMENTED;
  131. }
  132. /* void setFloatValue (in unsigned short unitType, in float floatValue) raises (DOMException); */
  133. NS_IMETHODIMP nsDOMCSSPrimitiveValue::SetFloatValue(PRUint16 unitType, float floatValue)
  134. {
  135. return NS_ERROR_NOT_IMPLEMENTED;
  136. }
  137. /* float getFloatValue (in unsigned short unitType) raises (DOMException); */
  138. NS_IMETHODIMP nsDOMCSSPrimitiveValue::GetFloatValue(PRUint16 unitType, float *_retval)
  139. {
  140. return NS_ERROR_NOT_IMPLEMENTED;
  141. }
  142. /* void setStringValue (in unsigned short stringType, in DOMString stringValue) raises (DOMException); */
  143. NS_IMETHODIMP nsDOMCSSPrimitiveValue::SetStringValue(PRUint16 stringType, const nsAString & stringValue)
  144. {
  145. return NS_ERROR_NOT_IMPLEMENTED;
  146. }
  147. /* DOMString getStringValue () raises (DOMException); */
  148. NS_IMETHODIMP nsDOMCSSPrimitiveValue::GetStringValue(nsAString & _retval)
  149. {
  150. return NS_ERROR_NOT_IMPLEMENTED;
  151. }
  152. /* nsIDOMCounter getCounterValue () raises (DOMException); */
  153. NS_IMETHODIMP nsDOMCSSPrimitiveValue::GetCounterValue(nsIDOMCounter **_retval)
  154. {
  155. return NS_ERROR_NOT_IMPLEMENTED;
  156. }
  157. /* nsIDOMRect getRectValue () raises (DOMException); */
  158. NS_IMETHODIMP nsDOMCSSPrimitiveValue::GetRectValue(nsIDOMRect **_retval)
  159. {
  160. return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162. /* nsIDOMRGBColor getRGBColorValue () raises (DOMException); */
  163. NS_IMETHODIMP nsDOMCSSPrimitiveValue::GetRGBColorValue(nsIDOMRGBColor **_retval)
  164. {
  165. return NS_ERROR_NOT_IMPLEMENTED;
  166. }
  167. /* End of implementation class template. */
  168. #endif
  169. #endif /* __gen_nsIDOMCSSPrimitiveValue_h__ */