|
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 file, |
|
4 * You can obtain one at http://mozilla.org/MPL/2.0/. |
|
5 */ |
|
6 |
|
7 interface Counter; |
|
8 |
|
9 interface CSSPrimitiveValue : CSSValue { |
|
10 |
|
11 // UnitTypes |
|
12 const unsigned short CSS_UNKNOWN = 0; |
|
13 const unsigned short CSS_NUMBER = 1; |
|
14 const unsigned short CSS_PERCENTAGE = 2; |
|
15 const unsigned short CSS_EMS = 3; |
|
16 const unsigned short CSS_EXS = 4; |
|
17 const unsigned short CSS_PX = 5; |
|
18 const unsigned short CSS_CM = 6; |
|
19 const unsigned short CSS_MM = 7; |
|
20 const unsigned short CSS_IN = 8; |
|
21 const unsigned short CSS_PT = 9; |
|
22 const unsigned short CSS_PC = 10; |
|
23 const unsigned short CSS_DEG = 11; |
|
24 const unsigned short CSS_RAD = 12; |
|
25 const unsigned short CSS_GRAD = 13; |
|
26 const unsigned short CSS_MS = 14; |
|
27 const unsigned short CSS_S = 15; |
|
28 const unsigned short CSS_HZ = 16; |
|
29 const unsigned short CSS_KHZ = 17; |
|
30 const unsigned short CSS_DIMENSION = 18; |
|
31 const unsigned short CSS_STRING = 19; |
|
32 const unsigned short CSS_URI = 20; |
|
33 const unsigned short CSS_IDENT = 21; |
|
34 const unsigned short CSS_ATTR = 22; |
|
35 const unsigned short CSS_COUNTER = 23; |
|
36 const unsigned short CSS_RECT = 24; |
|
37 const unsigned short CSS_RGBCOLOR = 25; |
|
38 |
|
39 readonly attribute unsigned short primitiveType; |
|
40 [Throws] |
|
41 void setFloatValue(unsigned short unitType, |
|
42 float floatValue); |
|
43 [Throws] |
|
44 float getFloatValue(unsigned short unitType); |
|
45 [Throws] |
|
46 void setStringValue(unsigned short stringType, |
|
47 DOMString stringValue); |
|
48 [Throws] |
|
49 DOMString getStringValue(); |
|
50 [Throws] |
|
51 Counter getCounterValue(); |
|
52 [Throws] |
|
53 Rect getRectValue(); |
|
54 [Throws] |
|
55 RGBColor getRGBColorValue(); |
|
56 }; |