nsIDOMCSSPrimitiveValue.idl 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #include "nsIDOMCSSValue.idl"
  6. /**
  7. * The nsIDOMCSSPrimitiveValue interface is a datatype for a primitive
  8. * CSS value in the Document Object Model.
  9. *
  10. * For more information on this interface please see
  11. * http://www.w3.org/TR/DOM-Level-2-Style
  12. */
  13. [uuid(f6df7293-2dc9-4cb9-9531-778caf4370e0)]
  14. interface nsIDOMCSSPrimitiveValue : nsIDOMCSSValue
  15. {
  16. // UnitTypes
  17. const unsigned short CSS_UNKNOWN = 0;
  18. const unsigned short CSS_NUMBER = 1;
  19. const unsigned short CSS_PERCENTAGE = 2;
  20. const unsigned short CSS_EMS = 3;
  21. const unsigned short CSS_EXS = 4;
  22. const unsigned short CSS_PX = 5;
  23. const unsigned short CSS_CM = 6;
  24. const unsigned short CSS_MM = 7;
  25. const unsigned short CSS_IN = 8;
  26. const unsigned short CSS_PT = 9;
  27. const unsigned short CSS_PC = 10;
  28. const unsigned short CSS_DEG = 11;
  29. const unsigned short CSS_RAD = 12;
  30. const unsigned short CSS_GRAD = 13;
  31. const unsigned short CSS_MS = 14;
  32. const unsigned short CSS_S = 15;
  33. const unsigned short CSS_HZ = 16;
  34. const unsigned short CSS_KHZ = 17;
  35. const unsigned short CSS_DIMENSION = 18;
  36. const unsigned short CSS_STRING = 19;
  37. const unsigned short CSS_URI = 20;
  38. const unsigned short CSS_IDENT = 21;
  39. const unsigned short CSS_ATTR = 22;
  40. const unsigned short CSS_COUNTER = 23;
  41. const unsigned short CSS_RECT = 24;
  42. const unsigned short CSS_RGBCOLOR = 25;
  43. readonly attribute unsigned short primitiveType;
  44. void setFloatValue(in unsigned short unitType,
  45. in float floatValue)
  46. raises(DOMException);
  47. float getFloatValue(in unsigned short unitType)
  48. raises(DOMException);
  49. void setStringValue(in unsigned short stringType,
  50. in DOMString stringValue)
  51. raises(DOMException);
  52. DOMString getStringValue()
  53. raises(DOMException);
  54. nsIDOMCounter getCounterValue()
  55. raises(DOMException);
  56. nsIDOMRect getRectValue()
  57. raises(DOMException);
  58. };