2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
[mono.git] / mono / metadata / unicode.h
1 /*
2  * unicode.h: Unicode support
3  *
4  * Author:
5  *      Dietmar Maurer (dietmar@ximian.com)
6  *
7  * (C) 2001 Ximian, Inc.
8  */
9
10 #ifndef _MONO_METADATA_UNICODE_H_
11 #define _MONO_METADATA_UNICODE_H_
12
13 #include <config.h>
14 #include <glib.h>
15
16 #include <mono/metadata/object.h>
17
18 typedef enum {
19         UppercaseLetter         =  0,
20         LowercaseLetter         =  1,
21         TitlecaseLetter         =  2,
22         ModifierLetter          =  3,
23         OtherLetter             =  4,
24         NonSpacingMark          =  5,
25         SpaceCombiningMark      =  6,
26         EnclosingMark           =  7,
27         DecimalDigitNumber      =  8,
28         LetterNumber            =  9,
29         OtherNumber             = 10,
30         SpaceSeperator          = 11,
31         LineSeperator           = 12,
32         ParagraphSeperator      = 13,
33         Control                 = 14,
34         Format                  = 15,
35         Surrogate               = 16,
36         PrivateUse              = 17,
37         ConnectorPunctuation    = 18,
38         DashPunctuation         = 19,
39         OpenPunctuation         = 20,
40         ClosePunctuation        = 21,
41         InitialQuotePunctuation = 22,
42         FinalQuotePunctuation   = 23,
43         OtherPunctuation        = 24,
44         MathSymbol              = 25,
45         CurrencySymbol          = 26,
46         ModifierSymbol          = 27,
47         OtherSymbol             = 28,
48         OtherNotAssigned        = 29,
49 } MonoUnicodeCategory;
50
51 double 
52 ves_icall_System_Char_GetNumericValue    (gunichar2 c);
53
54 MonoUnicodeCategory 
55 ves_icall_System_Char_GetUnicodeCategory (gunichar2 c);
56
57 gboolean 
58 ves_icall_System_Char_IsControl          (gunichar2 c);
59
60 gboolean 
61 ves_icall_System_Char_IsDigit            (gunichar2 c);
62
63 gboolean 
64 ves_icall_System_Char_IsLetter           (gunichar2 c);
65
66 gboolean 
67 ves_icall_System_Char_IsLower            (gunichar2 c);
68
69 gboolean 
70 ves_icall_System_Char_IsUpper            (gunichar2 c);
71
72 gboolean 
73 ves_icall_System_Char_IsNumber           (gunichar2 c);
74
75 gboolean 
76 ves_icall_System_Char_IsPunctuation      (gunichar2 c);
77
78 gboolean 
79 ves_icall_System_Char_IsSeparator        (gunichar2 c);
80
81 gboolean 
82 ves_icall_System_Char_IsSurrogate        (gunichar2 c);
83
84 gboolean 
85 ves_icall_System_Char_IsSymbol           (gunichar2 c);
86
87 gboolean 
88 ves_icall_System_Char_IsWhiteSpace       (gunichar2 c);
89
90 gunichar2
91 ves_icall_System_Char_ToLower            (gunichar2 c);
92
93 gunichar2
94 ves_icall_System_Char_ToUpper            (gunichar2 c);
95
96 gpointer
97 ves_icall_iconv_new_encoder              (MonoString *name, MonoBoolean big_endian);
98
99 gpointer
100 ves_icall_iconv_new_decoder              (MonoString *name, MonoBoolean big_endian);
101
102 void
103 ves_icall_iconv_reset                    (gpointer converter);
104
105 int
106 ves_icall_iconv_get_byte_count           (gpointer converter, MonoArray *chars,
107                                           gint32 idx, gint32 count);
108
109 int
110 ves_icall_iconv_get_bytes                (gpointer converter, MonoArray *chars,
111                                           gint32 charIndex, gint32 charCount,
112                                           MonoArray *bytes, gint32 byteIndex);
113
114 int
115 ves_icall_iconv_get_char_count           (gpointer converter, MonoArray *bytes,
116                                           gint32 idx, gint32 count);
117
118 int
119 ves_icall_iconv_get_chars                (gpointer converter, MonoArray *bytes,
120                                           gint32 byteIndex, gint32 byteCount,
121                                           MonoArray *chars, gint32 charIndex);
122      
123 #endif