|
1 /* -*- Mode: C++; 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 |
|
6 /* enum types for CSS properties and their values */ |
|
7 |
|
8 #ifndef nsCSSProperty_h___ |
|
9 #define nsCSSProperty_h___ |
|
10 |
|
11 /* |
|
12 Declare the enum list using the magic of preprocessing |
|
13 enum values are "eCSSProperty_foo" (where foo is the property) |
|
14 |
|
15 To change the list of properties, see nsCSSPropList.h |
|
16 |
|
17 */ |
|
18 enum nsCSSProperty { |
|
19 eCSSProperty_UNKNOWN = -1, |
|
20 |
|
21 #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \ |
|
22 kwtable_, stylestruct_, stylestructoffset_, animtype_) \ |
|
23 eCSSProperty_##id_, |
|
24 #include "nsCSSPropList.h" |
|
25 #undef CSS_PROP |
|
26 |
|
27 eCSSProperty_COUNT_no_shorthands, |
|
28 // Make the count continue where it left off: |
|
29 eCSSProperty_COUNT_DUMMY = eCSSProperty_COUNT_no_shorthands - 1, |
|
30 |
|
31 #define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \ |
|
32 eCSSProperty_##id_, |
|
33 #include "nsCSSPropList.h" |
|
34 #undef CSS_PROP_SHORTHAND |
|
35 |
|
36 eCSSProperty_COUNT, |
|
37 // Make the count continue where it left off: |
|
38 eCSSProperty_COUNT_DUMMY2 = eCSSProperty_COUNT - 1, |
|
39 |
|
40 #define CSS_PROP_ALIAS(aliasname_, id_, method_, pref_) \ |
|
41 eCSSPropertyAlias_##method_, |
|
42 #include "nsCSSPropAliasList.h" |
|
43 #undef CSS_PROP_ALIAS |
|
44 |
|
45 eCSSProperty_COUNT_with_aliases, |
|
46 // Make the count continue where it left off: |
|
47 eCSSProperty_COUNT_DUMMY3 = eCSSProperty_COUNT_with_aliases - 1, |
|
48 |
|
49 // Some of the values below could probably overlap with each other |
|
50 // if we had a need for them to do so. |
|
51 |
|
52 // Extra values for use in the values of the 'transition-property' |
|
53 // property. |
|
54 eCSSPropertyExtra_no_properties, |
|
55 eCSSPropertyExtra_all_properties, |
|
56 |
|
57 // Extra dummy values for nsCSSParser internal use. |
|
58 eCSSPropertyExtra_x_none_value, |
|
59 eCSSPropertyExtra_x_auto_value, |
|
60 |
|
61 // Extra value to represent custom properties (--*). |
|
62 eCSSPropertyExtra_variable |
|
63 }; |
|
64 |
|
65 // The "descriptors" that can appear in a @font-face rule. |
|
66 // They have the syntax of properties but different value rules. |
|
67 enum nsCSSFontDesc { |
|
68 eCSSFontDesc_UNKNOWN = -1, |
|
69 #define CSS_FONT_DESC(name_, method_) eCSSFontDesc_##method_, |
|
70 #include "nsCSSFontDescList.h" |
|
71 #undef CSS_FONT_DESC |
|
72 eCSSFontDesc_COUNT |
|
73 }; |
|
74 |
|
75 #endif /* nsCSSProperty_h___ */ |