Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | /* keywords used within CSS property values */ |
michael@0 | 7 | |
michael@0 | 8 | #ifndef nsCSSKeywords_h___ |
michael@0 | 9 | #define nsCSSKeywords_h___ |
michael@0 | 10 | |
michael@0 | 11 | #include "nsStringFwd.h" |
michael@0 | 12 | |
michael@0 | 13 | /* |
michael@0 | 14 | Declare the enum list using the magic of preprocessing |
michael@0 | 15 | enum values are "eCSSKeyword_foo" (where foo is the keyword) |
michael@0 | 16 | |
michael@0 | 17 | To change the list of keywords, see nsCSSKeywordList.h |
michael@0 | 18 | |
michael@0 | 19 | */ |
michael@0 | 20 | #define CSS_KEY(_name,_id) eCSSKeyword_##_id, |
michael@0 | 21 | enum nsCSSKeyword { |
michael@0 | 22 | eCSSKeyword_UNKNOWN = -1, |
michael@0 | 23 | #include "nsCSSKeywordList.h" |
michael@0 | 24 | eCSSKeyword_COUNT |
michael@0 | 25 | }; |
michael@0 | 26 | #undef CSS_KEY |
michael@0 | 27 | |
michael@0 | 28 | |
michael@0 | 29 | class nsCSSKeywords { |
michael@0 | 30 | public: |
michael@0 | 31 | static void AddRefTable(void); |
michael@0 | 32 | static void ReleaseTable(void); |
michael@0 | 33 | |
michael@0 | 34 | // Given a keyword string, return the enum value |
michael@0 | 35 | static nsCSSKeyword LookupKeyword(const nsACString& aKeyword); |
michael@0 | 36 | static nsCSSKeyword LookupKeyword(const nsAString& aKeyword); |
michael@0 | 37 | |
michael@0 | 38 | // Given a keyword enum, get the string value |
michael@0 | 39 | static const nsAFlatCString& GetStringValue(nsCSSKeyword aKeyword); |
michael@0 | 40 | }; |
michael@0 | 41 | |
michael@0 | 42 | #endif /* nsCSSKeywords_h___ */ |