1 #ifndef __WINE_WINNLS_H
2 #define __WINE_WINNLS_H
11 /* Define a bunch of callback types */
14 typedef BOOL
CALLBACK (*CALINFO_ENUMPROCA
)(LPSTR
);
15 typedef BOOL
CALLBACK (*CALINFO_ENUMPROCW
)(LPWSTR
);
16 typedef BOOL
CALLBACK (*CODEPAGE_ENUMPROCA
)(LPSTR
);
17 typedef BOOL
CALLBACK (*CODEPAGE_ENUMPROCW
)(LPWSTR
);
18 typedef BOOL
CALLBACK (*DATEFMT_ENUMPROCA
)(LPSTR
);
19 typedef BOOL
CALLBACK (*DATEFMT_ENUMPROCW
)(LPWSTR
);
20 typedef BOOL
CALLBACK (*LOCALE_ENUMPROCA
)(LPSTR
);
21 typedef BOOL
CALLBACK (*LOCALE_ENUMPROCW
)(LPWSTR
);
22 typedef BOOL
CALLBACK (*TIMEFMT_ENUMPROCA
)(LPSTR
);
23 typedef BOOL
CALLBACK (*TIMEFMT_ENUMPROCW
)(LPWSTR
);
25 typedef FARPROC CALINFO_ENUMPROCA
;
26 typedef FARPROC CALINFO_ENUMPROCW
;
27 typedef FARPROC CODEPAGE_ENUMPROCA
;
28 typedef FARPROC CODEPAGE_ENUMPROCW
;
29 typedef FARPROC DATEFMT_ENUMPROCA
;
30 typedef FARPROC DATEFMT_ENUMPROCW
;
31 typedef FARPROC LOCALE_ENUMPROCA
;
32 typedef FARPROC LOCALE_ENUMPROCW
;
33 typedef FARPROC TIMEFMT_ENUMPROCA
;
34 typedef FARPROC TIMEFMT_ENUMPROCW
;
37 DECL_WINELIB_TYPE_AW(CALINFO_ENUMPROC
)
38 DECL_WINELIB_TYPE_AW(CODEPAGE_ENUMPROC
)
39 DECL_WINELIB_TYPE_AW(DATEFMT_ENUMPROC
)
40 DECL_WINELIB_TYPE_AW(LOCALE_ENUMPROC
)
41 DECL_WINELIB_TYPE_AW(TIMEFMT_ENUMPROC
)
44 #define MB_PRECOMPOSED 0x00000001
45 #define MB_COMPOSITE 0x00000002
46 #define MB_USEGLYPHCHARS 0x00000004
47 #define MB_ERR_INVALID_CHARS 0x00000008
49 #define LCID_INSTALLED 0x00000001
51 /* flags to GetLocaleInfo */
52 #define LOCALE_NOUSEROVERRIDE 0x80000000
53 #define LOCALE_USE_CP_ACP 0x40000000
55 #define LOCALE_LOCALEINFOFLAGSMASK 0xC0000000
57 /* When adding new defines, don't forget to add an entry to the
58 * locale2id map in misc/ole2nls.c
60 #define LOCALE_ILANGUAGE 0x00000001
61 #define LOCALE_SLANGUAGE 0x00000002
62 #define LOCALE_SENGLANGUAGE 0x00001001
63 #define LOCALE_SABBREVLANGNAME 0x00000003
64 #define LOCALE_SNATIVELANGNAME 0x00000004
65 #define LOCALE_ICOUNTRY 0x00000005
66 #define LOCALE_SCOUNTRY 0x00000006
67 #define LOCALE_SENGCOUNTRY 0x00001002
68 #define LOCALE_SABBREVCTRYNAME 0x00000007
69 #define LOCALE_SNATIVECTRYNAME 0x00000008
70 #define LOCALE_IDEFAULTLANGUAGE 0x00000009
71 #define LOCALE_IDEFAULTCOUNTRY 0x0000000A
72 #define LOCALE_IDEFAULTCODEPAGE 0x0000000B
73 #define LOCALE_IDEFAULTANSICODEPAGE 0x00001004
74 #define LOCALE_IDEFAULTMACCODEPAGE 0x00001011
75 #define LOCALE_SLIST 0x0000000C
76 #define LOCALE_IMEASURE 0x0000000D
77 #define LOCALE_SDECIMAL 0x0000000E
78 #define LOCALE_STHOUSAND 0x0000000F
79 #define LOCALE_SGROUPING 0x00000010
80 #define LOCALE_IDIGITS 0x00000011
81 #define LOCALE_ILZERO 0x00000012
82 #define LOCALE_INEGNUMBER 0x00001010
83 #define LOCALE_SNATIVEDIGITS 0x00000013
84 #define LOCALE_SCURRENCY 0x00000014
85 #define LOCALE_SINTLSYMBOL 0x00000015
86 #define LOCALE_SMONDECIMALSEP 0x00000016
87 #define LOCALE_SMONTHOUSANDSEP 0x00000017
88 #define LOCALE_SMONGROUPING 0x00000018
89 #define LOCALE_ICURRDIGITS 0x00000019
90 #define LOCALE_IINTLCURRDIGITS 0x0000001A
91 #define LOCALE_ICURRENCY 0x0000001B
92 #define LOCALE_INEGCURR 0x0000001C
93 #define LOCALE_SDATE 0x0000001D
94 #define LOCALE_STIME 0x0000001E
95 #define LOCALE_SSHORTDATE 0x0000001F
96 #define LOCALE_SLONGDATE 0x00000020
97 #define LOCALE_STIMEFORMAT 0x00001003
98 #define LOCALE_IDATE 0x00000021
99 #define LOCALE_ILDATE 0x00000022
100 #define LOCALE_ITIME 0x00000023
101 #define LOCALE_ITIMEMARKPOSN 0x00001005
102 #define LOCALE_ICENTURY 0x00000024
103 #define LOCALE_ITLZERO 0x00000025
104 #define LOCALE_IDAYLZERO 0x00000026
105 #define LOCALE_IMONLZERO 0x00000027
106 #define LOCALE_S1159 0x00000028
107 #define LOCALE_S2359 0x00000029
108 #define LOCALE_ICALENDARTYPE 0x00001009
109 #define LOCALE_IOPTIONALCALENDAR 0x0000100B
110 #define LOCALE_IFIRSTDAYOFWEEK 0x0000100C
111 #define LOCALE_IFIRSTWEEKOFYEAR 0x0000100D
112 #define LOCALE_SDAYNAME1 0x0000002A
113 #define LOCALE_SDAYNAME2 0x0000002B
114 #define LOCALE_SDAYNAME3 0x0000002C
115 #define LOCALE_SDAYNAME4 0x0000002D
116 #define LOCALE_SDAYNAME5 0x0000002E
117 #define LOCALE_SDAYNAME6 0x0000002F
118 #define LOCALE_SDAYNAME7 0x00000030
119 #define LOCALE_SABBREVDAYNAME1 0x00000031
120 #define LOCALE_SABBREVDAYNAME2 0x00000032
121 #define LOCALE_SABBREVDAYNAME3 0x00000033
122 #define LOCALE_SABBREVDAYNAME4 0x00000034
123 #define LOCALE_SABBREVDAYNAME5 0x00000035
124 #define LOCALE_SABBREVDAYNAME6 0x00000036
125 #define LOCALE_SABBREVDAYNAME7 0x00000037
126 #define LOCALE_SMONTHNAME1 0x00000038
127 #define LOCALE_SMONTHNAME2 0x00000039
128 #define LOCALE_SMONTHNAME3 0x0000003A
129 #define LOCALE_SMONTHNAME4 0x0000003B
130 #define LOCALE_SMONTHNAME5 0x0000003C
131 #define LOCALE_SMONTHNAME6 0x0000003D
132 #define LOCALE_SMONTHNAME7 0x0000003E
133 #define LOCALE_SMONTHNAME8 0x0000003F
134 #define LOCALE_SMONTHNAME9 0x00000040
135 #define LOCALE_SMONTHNAME10 0x00000041
136 #define LOCALE_SMONTHNAME11 0x00000042
137 #define LOCALE_SMONTHNAME12 0x00000043
138 #define LOCALE_SMONTHNAME13 0x0000100E
139 #define LOCALE_SABBREVMONTHNAME1 0x00000044
140 #define LOCALE_SABBREVMONTHNAME2 0x00000045
141 #define LOCALE_SABBREVMONTHNAME3 0x00000046
142 #define LOCALE_SABBREVMONTHNAME4 0x00000047
143 #define LOCALE_SABBREVMONTHNAME5 0x00000048
144 #define LOCALE_SABBREVMONTHNAME6 0x00000049
145 #define LOCALE_SABBREVMONTHNAME7 0x0000004A
146 #define LOCALE_SABBREVMONTHNAME8 0x0000004B
147 #define LOCALE_SABBREVMONTHNAME9 0x0000004C
148 #define LOCALE_SABBREVMONTHNAME10 0x0000004D
149 #define LOCALE_SABBREVMONTHNAME11 0x0000004E
150 #define LOCALE_SABBREVMONTHNAME12 0x0000004F
151 #define LOCALE_SABBREVMONTHNAME13 0x0000100F
152 #define LOCALE_SPOSITIVESIGN 0x00000050
153 #define LOCALE_SNEGATIVESIGN 0x00000051
154 #define LOCALE_IPOSSIGNPOSN 0x00000052
155 #define LOCALE_INEGSIGNPOSN 0x00000053
156 #define LOCALE_IPOSSYMPRECEDES 0x00000054
157 #define LOCALE_IPOSSEPBYSPACE 0x00000055
158 #define LOCALE_INEGSYMPRECEDES 0x00000056
159 #define LOCALE_INEGSEPBYSPACE 0x00000057
160 #define LOCALE_FONTSIGNATURE 0x00000058
161 #define LOCALE_SISO639LANGNAME 0x00000059
162 #define LOCALE_SISO3166CTRYNAME 0x0000005A
164 #define LOCALE_IDEFAULTEBCDICCODEPAGE 0x00001012
165 #define LOCALE_IPAPERSIZE 0x0000100A
166 #define LOCALE_SENGCURRNAME 0x00001007
167 #define LOCALE_SNATIVECURRNAME 0x00001008
168 #define LOCALE_SYEARMONTH 0x00001006
169 #define LOCALE_SSORTNAME 0x00001013
170 #define LOCALE_IDIGITSUBSTITUTION 0x00001014
172 #define NORM_IGNORECASE 1
173 #define NORM_IGNORENONSPACE 2
174 #define NORM_IGNORESYMBOLS 4
175 #define NORM_STRINGSORT 0x1000
176 #define NORM_IGNOREKANATYPE 0x00010000
177 #define NORM_IGNOREWIDTH 0x00020000
182 #define CP_THREAD_ACP 3
184 #define CP_UTF7 65000
185 #define CP_UTF8 65001
187 #define WC_DISCARDNS 0x00000010
188 #define WC_SEPCHARS 0x00000020
189 #define WC_DEFAULTCHAR 0x00000040
190 #define WC_COMPOSITECHECK 0x00000200
191 #define WC_NO_BEST_FIT_CHARS 0x00000400
194 /* Locale Dependent Mapping Flags */
195 #define LCMAP_LOWERCASE 0x00000100 /* lower case letters */
196 #define LCMAP_UPPERCASE 0x00000200 /* upper case letters */
197 #define LCMAP_SORTKEY 0x00000400 /* WC sort key (normalize) */
198 #define LCMAP_BYTEREV 0x00000800 /* byte reversal */
200 #define SORT_STRINGSORT 0x00001000 /* take punctuation into account */
202 #define LCMAP_HIRAGANA 0x00100000 /* map katakana to hiragana */
203 #define LCMAP_KATAKANA 0x00200000 /* map hiragana to katakana */
204 #define LCMAP_HALFWIDTH 0x00400000 /* map double byte to single byte */
205 #define LCMAP_FULLWIDTH 0x00800000 /* map single byte to double byte */
207 /* Date Flags for GetDateFormat. */
209 #define DATE_SHORTDATE 0x00000001 /* use short date picture */
210 #define DATE_LONGDATE 0x00000002 /* use long date picture */
211 #define DATE_USE_ALT_CALENDAR 0x00000004 /* use alternate calendar */
212 /* alt. calendar support is broken anyway */
214 #define TIME_FORCE24HOURFORMAT 0x00000008 /* force 24 hour format*/
215 #define TIME_NOTIMEMARKER 0x00000004 /* show no AM/PM */
216 #define TIME_NOSECONDS 0x00000002 /* show no seconds */
217 #define TIME_NOMINUTESORSECONDS 0x0000001 /* show no minutes either */
219 /* internal flags for GetDateFormat system */
220 #define DATE_DATEVARSONLY 0x00000100 /* only date stuff: yMdg */
221 #define TIME_TIMEVARSONLY 0x00000200 /* only time stuff: hHmst */
222 /* use this in a Winelib program if you really want all types */
223 #define LOCALE_TIMEDATEBOTH 0x00000300 /* full set */
225 /* Tests that we currently implement */
226 #define ITU_IMPLEMENTED_TESTS \
227 IS_TEXT_UNICODE_SIGNATURE| \
228 IS_TEXT_UNICODE_ODD_LENGTH
231 /* Character Type Flags */
232 #define CT_CTYPE1 0x00000001 /* usual ctype */
233 #define CT_CTYPE2 0x00000002 /* bidirectional layout info */
234 #define CT_CTYPE3 0x00000004 /* textprocessing info */
236 /* CType 1 Flag Bits */
237 #define C1_UPPER 0x0001
238 #define C1_LOWER 0x0002
239 #define C1_DIGIT 0x0004
240 #define C1_SPACE 0x0008
241 #define C1_PUNCT 0x0010
242 #define C1_CNTRL 0x0020
243 #define C1_BLANK 0x0040
244 #define C1_XDIGIT 0x0080
245 #define C1_ALPHA 0x0100
247 /* CType 2 Flag Bits */
248 #define C2_LEFTTORIGHT 0x0001
249 #define C2_RIGHTTOLEFT 0x0002
250 #define C2_EUROPENUMBER 0x0003
251 #define C2_EUROPESEPARATOR 0x0004
252 #define C2_EUROPETERMINATOR 0x0005
253 #define C2_ARABICNUMBER 0x0006
254 #define C2_COMMONSEPARATOR 0x0007
255 #define C2_BLOCKSEPARATOR 0x0008
256 #define C2_SEGMENTSEPARATOR 0x0009
257 #define C2_WHITESPACE 0x000A
258 #define C2_OTHERNEUTRAL 0x000B
259 #define C2_NOTAPPLICABLE 0x0000
261 /* CType 3 Flag Bits */
262 #define C3_NONSPACING 0x0001
263 #define C3_DIACRITIC 0x0002
264 #define C3_VOWELMARK 0x0004
265 #define C3_SYMBOL 0x0008
266 #define C3_KATAKANA 0x0010
267 #define C3_HIRAGANA 0x0020
268 #define C3_HALFWIDTH 0x0040
269 #define C3_FULLWIDTH 0x0080
270 #define C3_IDEOGRAPH 0x0100
271 #define C3_KASHIDA 0x0200
272 #define C3_LEXICAL 0x0400
273 #define C3_ALPHA 0x8000
274 #define C3_NOTAPPLICABLE 0x0000
276 /* Code page information.
278 #define MAX_LEADBYTES 12
279 #define MAX_DEFAULTCHAR 2
285 typedef DWORD LCTYPE
;
286 typedef DWORD CALTYPE
;
292 BYTE DefaultChar
[MAX_DEFAULTCHAR
];
293 BYTE LeadByte
[MAX_LEADBYTES
];
299 BYTE DefaultChar
[MAX_DEFAULTCHAR
];
300 BYTE LeadByte
[MAX_LEADBYTES
];
301 WCHAR UnicodeDefaultChar
;
303 CHAR CodePageName
[MAX_PATH
];
304 } CPINFOEXA
, *LPCPINFOEXA
;
309 BYTE DefaultChar
[MAX_DEFAULTCHAR
];
310 BYTE LeadByte
[MAX_LEADBYTES
];
311 WCHAR UnicodeDefaultChar
;
313 WCHAR CodePageName
[MAX_PATH
];
314 } CPINFOEXW
, *LPCPINFOEXW
;
316 DECL_WINELIB_TYPE_AW(CPINFOEX
)
317 DECL_WINELIB_TYPE_AW(LPCPINFOEX
)
319 typedef struct _numberfmtA
{
324 LPCSTR lpThousandSep
;
326 } NUMBERFMTA
, *LPNUMBERFMTA
;
328 typedef struct _numberfmtW
{
332 LPCWSTR lpDecimalSep
;
333 LPCWSTR lpThousandSep
;
335 } NUMBERFMTW
, *LPNUMBERFMTW
;
337 DECL_WINELIB_TYPE_AW(NUMBERFMT
)
338 DECL_WINELIB_TYPE_AW(LPNUMBERFMT
)
340 typedef struct _currencyfmtA
346 LPCSTR lpThousandSep
;
349 LPCSTR lpCurrencySymbol
;
350 } CURRENCYFMTA
, *LPCURRENCYFMTA
;
352 typedef struct _currencyfmtW
357 LPCWSTR lpDecimalSep
;
358 LPCWSTR lpThousandSep
;
361 LPCWSTR lpCurrencySymbol
;
362 } CURRENCYFMTW
, *LPCURRENCYFMTW
;
364 DECL_WINELIB_TYPE_AW(CURRENCYFMT
)
365 DECL_WINELIB_TYPE_AW(LPCURRENCYFMT
)
371 LCID WINAPI
ConvertDefaultLocale(LCID
);
372 BOOL WINAPI
EnumCalendarInfoA(CALINFO_ENUMPROCA
,LCID
,CALID
,CALTYPE
);
373 BOOL WINAPI
EnumCalendarInfoW(CALINFO_ENUMPROCW
,LCID
,CALID
,CALTYPE
);
374 #define EnumCalendarInfo WINELIB_NAME_AW(EnumCalendarInfo)
375 BOOL WINAPI
EnumDateFormatsA(DATEFMT_ENUMPROCA
,LCID
,DWORD
);
376 BOOL WINAPI
EnumDateFormatsW(DATEFMT_ENUMPROCW
,LCID
,DWORD
);
377 #define EnumDateFormats WINELIB_NAME_AW(EnumDateFormats)
378 BOOL WINAPI
EnumSystemCodePagesA(CODEPAGE_ENUMPROCA
,DWORD
);
379 BOOL WINAPI
EnumSystemCodePagesW(CODEPAGE_ENUMPROCW
,DWORD
);
380 #define EnumSystemCodePages WINELIB_NAME_AW(EnumSystemCodePages)
381 BOOL WINAPI
EnumSystemLocalesA(LOCALE_ENUMPROCA
,DWORD
);
382 BOOL WINAPI
EnumSystemLocalesW(LOCALE_ENUMPROCW
,DWORD
);
383 #define EnumSystemLocales WINELIB_NAME_AW(EnumSystemLocales)
384 BOOL WINAPI
EnumTimeFormatsA(TIMEFMT_ENUMPROCA
,LCID
,DWORD
);
385 BOOL WINAPI
EnumTimeFormatsW(TIMEFMT_ENUMPROCW
,LCID
,DWORD
);
386 #define EnumTimeFormats WINELIB_NAME_AW(EnumTimeFormats)
387 BOOL WINAPI
GetCPInfo(UINT
,LPCPINFO
);
388 BOOL WINAPI
GetCPInfoExA(UINT
,DWORD
,LPCPINFOEXA
);
389 BOOL WINAPI
GetCPInfoExW(UINT
,DWORD
,LPCPINFOEXW
);
390 #define GetCPInfoEx WINELIB_NAME_AW(GetCPInfoEx)
391 INT WINAPI
GetLocaleInfoA(LCID
,LCTYPE
,LPSTR
,INT
);
392 INT WINAPI
GetLocaleInfoW(LCID
,LCTYPE
,LPWSTR
,INT
);
393 #define GetLocaleInfo WINELIB_NAME_AW(GetLocaleInfo)
394 INT WINAPI
GetNumberFormatA(LCID
,DWORD
,LPCSTR
,const NUMBERFMTA
*,LPSTR
,int);
395 INT WINAPI
GetNumberFormatW(LCID
,DWORD
,LPCWSTR
,const NUMBERFMTW
*,LPWSTR
,int);
396 #define GetNumberFormat WINELIB_NAME_AW(GetNumberFormat)
397 BOOL WINAPI
IsValidCodePage(UINT
);
405 #endif /* __WINE_WINNLS_H */