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: #ifndef nsIUGenCategory_h__ michael@0: #define nsIUGenCategory_h__ michael@0: michael@0: michael@0: #include "nsISupports.h" michael@0: #include "nscore.h" michael@0: michael@0: // {671fea05-fcee-4b1c-82a3-6eb03eda8ddc} michael@0: #define NS_IUGENCATEGORY_IID \ michael@0: { 0x671fea05, 0xfcee, 0x4b1c, \ michael@0: { 0x82, 0xa3, 0x6e, 0xb0, 0x3e, 0xda, 0x8d, 0xdc } } michael@0: michael@0: michael@0: class nsIUGenCategory : public nsISupports { michael@0: michael@0: public: michael@0: michael@0: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IUGENCATEGORY_IID) michael@0: michael@0: /** michael@0: * Read http://unicode.org/reports/tr44/#General_Category_Values michael@0: * for the detailed definition of the following categories michael@0: */ michael@0: typedef enum { michael@0: kUndefined = 0, michael@0: kMark = 1, // Mn, Mc, and Me michael@0: kNumber = 2, // Nd, Nl, and No michael@0: kSeparator = 3, // Zs, Zl, and Zp michael@0: kOther = 4, // Cc, Cf, Cs, Co, and Cn michael@0: kLetter = 5, // Lu, Ll, Lt, Lm, and Lo michael@0: kPunctuation = 6, // Pc, Pd, Ps, Pe, Pi, Pf, and Po michael@0: kSymbol = 7 // Sm, Sc, Sk, and So michael@0: } nsUGenCategory; michael@0: michael@0: /** michael@0: * Give a Unichar, return a nsUGenCategory michael@0: */ michael@0: virtual nsUGenCategory Get(uint32_t aChar) = 0; michael@0: }; michael@0: michael@0: NS_DEFINE_STATIC_IID_ACCESSOR(nsIUGenCategory, NS_IUGENCATEGORY_IID) michael@0: michael@0: #endif /* nsIUGenCategory_h__ */