Back to index

lightning-sunbird  0.9+nobinonly
nsIUGenDetailCategory.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 #ifndef nsIUGenDetailCategory_h__
00038 #define nsIUGenDetailCategory_h__
00039 
00040 
00041 #include "nsISupports.h"
00042 #include "nscore.h"
00043 
00044 // {E86B3372-BF89-11d2-B3AF-00805F8A6670}
00045 #define NS_IUGENDETAILCATEGORY_IID \
00046 { 0xe86b3372, 0xbf89, 0x11d2, \
00047     { 0xb3, 0xaf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 } };
00048 
00049 
00050 
00051 class nsIUGenDetailCategory : public nsISupports {
00052 
00053 public: 
00054 
00055   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IUGENDETAILCATEGORY_IID)
00056 
00057    
00062    typedef enum {
00063               
00064      kUGDC_M  = (kUGenCategory_Mark << 4) | 0, // Mark- return only when kUGDC_DetailMark bit is clear
00065      kUGDC_Mn = (kUGenCategory_Mark << 4) | 1, // Mark, Non-Spacing - return only when kUGDC_DetailMark bit is set
00066      kUGDC_Mc = (kUGenCategory_Mark << 4) | 2, // Mark, Spacing Combining - return only when kUGDC_DetailMark bit is set
00067      kUGDC_Me = (kUGenCategory_Mark << 4) | 3, // Mark, Enclosing - return only when kUGDC_DetailMark bit is set
00068 
00069      kUGDC_N  = (kUGenCategory_Number << 4) | 0, // Number- return only when kUGDC_DetailNumber bit is clear
00070      kUGDC_Nd = (kUGenCategory_Number << 4) | 1, // Number, Decimal Digit - return only when kUGDC_DetailNumber bit is set
00071      kUGDC_Nl = (kUGenCategory_Number << 4) | 2, // Number, Letter - return only when kUGDC_DetailNumber bit is set
00072      kUGDC_No = (kUGenCategory_Number << 4) | 3, // Number, Other - return only when kUGDC_DetailNumber bit is set
00073 
00074      kUGDC_Z  = (kUGenCategory_Separator << 4) | 0, // Separator- return only when kUGDC_DetailSeparator bit is clear
00075      kUGDC_Zs = (kUGenCategory_Separator << 4) | 1, // Separator, Space - return only when kUGDC_DetailSeparator bit is set
00076      kUGDC_Zl = (kUGenCategory_Separator << 4) | 2, // Separator, Line - return only when kUGDC_DetailSeparator bit is set
00077      kUGDC_Zp = (kUGenCategory_Separator << 4) | 3, // Separator, Paragraph - return only when kUGDC_DetailSeparator bit is set
00078 
00079      kUGDC_C  = (kUGenCategory_Other << 4) | 0, // Other- return only when kUGDC_DetailOther bit is clear
00080      kUGDC_Cc = (kUGenCategory_Other << 4) | 1, // Other, Control - return only when kUGDC_DetailOther bit is set
00081      kUGDC_Cf = (kUGenCategory_Other << 4) | 2, // Other, Format - return only when kUGDC_DetailOther bit is set
00082      kUGDC_Cs = (kUGenCategory_Other << 4) | 3, // Other, Surrogate - return only when kUGDC_DetailOther bit is set
00083      kUGDC_Co = (kUGenCategory_Other << 4) | 4, // Other, Private Use - return only when kUGDC_DetailOther bit is set
00084      kUGDC_Cn = (kUGenCategory_Other << 4) | 5, // Other, Not Assigned - return only when kUGDC_DetailOther bit is set
00085 
00086      kUGDC_L  = (kUGenCategory_Letter << 4) | 0, // Letter- return only when kUGDC_DetailLetter bit is clear
00087      kUGDC_Lu = (kUGenCategory_Letter << 4) | 1, // Letter, Uppercase - return only when kUGDC_DetailLetter bit is set
00088      kUGDC_Ll = (kUGenCategory_Letter << 4) | 2, // Letter, Lowercase - return only when kUGDC_DetailLetter bit is set
00089      kUGDC_Lt = (kUGenCategory_Letter << 4) | 3, // Letter, Titlecase - return only when kUGDC_DetailLetter bit is set
00090      kUGDC_Lm = (kUGenCategory_Letter << 4) | 4, // Letter, Modifier - return only when kUGDC_DetailLetter bit is set
00091      kUGDC_Lo = (kUGenCategory_Letter << 4) | 5, // Letter, Other - return only when kUGDC_DetailLetter bit is set
00092 
00093      kUGDC_P  = (kUGenCategory_Punctuation << 4) | 0, // Punctuation- return only when kUGDC_DetailPunctuation bit is clear
00094      kUGDC_Pc = (kUGenCategory_Punctuation << 4) | 1, // Punctuation, Connector - return only when kUGDC_DetailPunctuation bit is set
00095      kUGDC_Pd = (kUGenCategory_Punctuation << 4) | 2, // Punctuation, Dash - return only when kUGDC_DetailPunctuation bit is set
00096      kUGDC_Ps = (kUGenCategory_Punctuation << 4) | 3, // Punctuation, Open - return only when kUGDC_DetailPunctuation bit is set
00097      kUGDC_Pe = (kUGenCategory_Punctuation << 4) | 4, // Punctuation, Close - return only when kUGDC_DetailPunctuation bit is set
00098      kUGDC_Pi = (kUGenCategory_Punctuation << 4) | 5, // Punctuation, Initial quote - return only when kUGDC_DetailPunctuation bit is set
00099      kUGDC_Pf = (kUGenCategory_Punctuation << 4) | 6, // Punctuation, Final quote - return only when kUGDC_DetailPunctuation bit is set
00100      kUGDC_Po = (kUGenCategory_Punctuation << 4) | 7, // Punctuation, Other - return only when kUGDC_DetailPunctuation bit is set
00101 
00102      kUGDC_S  = (kUGenCategory_Symbol << 4) | 0, // Symbol- return only when kUGDC_DetailSymbol bit is clear
00103      kUGDC_Sm = (kUGenCategory_Symbol << 4) | 1, // Symbol, Math - return only when kUGDC_DetailSymbol bit is set
00104      kUGDC_Sc = (kUGenCategory_Symbol << 4) | 2, // Symbol, Currency - return only when kUGDC_DetailSymbol bit is set
00105      kUGDC_Sk = (kUGenCategory_Symbol << 4) | 3, // Symbol, Modifier - return only when kUGDC_DetailSymbol bit is set
00106      kUGDC_So = (kUGenCategory_Symbol << 4) | 4, // Symbol, Other - return only when kUGDC_DetailSymbol bit is set
00107    } nsUGDC;
00108 
00113    typedef enum {
00114      kUGDC_DetailNone          = 0,
00115      kUGDC_DetailMark          = ( 1 << 0),
00116      kUGDC_DetailNumber        = ( 1 << 1),
00117      kUGDC_DetailSeparator     = ( 1 << 2),
00118      kUGDC_DetailOther         = ( 1 << 3),
00119      kUGDC_DetailLetter        = ( 1 << 4),
00120      kUGDC_DetailPunctuation   = ( 1 << 5),
00121      kUGDC_DetailSymbol        = ( 1 << 6),
00122      kUGDC_DetailNormative     = ( kUGDC_DetailMark | 
00123                                    kUGDC_DetailNumber | 
00124                                    kUGDC_DetailSeparator | 
00125                                    kUGDC_DetailOther  ),
00126      kUGDC_DetailInformative   = ( kUGDC_DetailLetter | 
00127                                    kUGDC_DetailPunctuation | 
00128                                    kUGDC_DetailSymbol);
00129      kUGDC_DetailAll           = ( kUGDC_DetailNormative | kUGDC_Informative );
00130    } nsUGDC_Detail;
00131 
00135    NS_IMETHOD Get( PRUnichar aChar, nsUGDC_Detail aDetailSpec, nsUGDC* oResult) = 0 ;
00136     
00142    NS_IMETHOD Is( PRUnichar aChar, nsUGDC aDetailCategory, PRBool* oResult) = 0;
00143 };
00144 
00145 #endif  /* nsIUGenDetailCategory_h__ */