michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* keywords used within CSS property values */ michael@0: michael@0: #ifndef nsCSSKeywords_h___ michael@0: #define nsCSSKeywords_h___ michael@0: michael@0: #include "nsStringFwd.h" michael@0: michael@0: /* michael@0: Declare the enum list using the magic of preprocessing michael@0: enum values are "eCSSKeyword_foo" (where foo is the keyword) michael@0: michael@0: To change the list of keywords, see nsCSSKeywordList.h michael@0: michael@0: */ michael@0: #define CSS_KEY(_name,_id) eCSSKeyword_##_id, michael@0: enum nsCSSKeyword { michael@0: eCSSKeyword_UNKNOWN = -1, michael@0: #include "nsCSSKeywordList.h" michael@0: eCSSKeyword_COUNT michael@0: }; michael@0: #undef CSS_KEY michael@0: michael@0: michael@0: class nsCSSKeywords { michael@0: public: michael@0: static void AddRefTable(void); michael@0: static void ReleaseTable(void); michael@0: michael@0: // Given a keyword string, return the enum value michael@0: static nsCSSKeyword LookupKeyword(const nsACString& aKeyword); michael@0: static nsCSSKeyword LookupKeyword(const nsAString& aKeyword); michael@0: michael@0: // Given a keyword enum, get the string value michael@0: static const nsAFlatCString& GetStringValue(nsCSSKeyword aKeyword); michael@0: }; michael@0: michael@0: #endif /* nsCSSKeywords_h___ */