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