1 #ifndef __WINE_WINNLS_H
2 #define __WINE_WINNLS_H
11 /* Define a bunch of callback types */
13 #if defined(STRICT) || defined(__WINE__)
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;
35 #endif /* STRICT || __WINE__ */
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
281 /* Defines for calendar handling */
282 #define CAL_ICALINTVALUE 0x00000001
283 #define CAL_SCALNAME 0x00000002
284 #define CAL_IYEAROFFSETRANGE 0x00000003
285 #define CAL_SERASTRING 0x00000004
286 #define CAL_SSHORTDATE 0x00000005
287 #define CAL_SLONGDATE 0x00000006
288 #define CAL_SDAYNAME1 0x00000007
289 #define CAL_SDAYNAME2 0x00000008
290 #define CAL_SDAYNAME3 0x00000009
291 #define CAL_SDAYNAME4 0x0000000a
292 #define CAL_SDAYNAME5 0x0000000b
293 #define CAL_SDAYNAME6 0x0000000c
294 #define CAL_SDAYNAME7 0x0000000d
295 #define CAL_SABBREVDAYNAME1 0x0000000e
296 #define CAL_SABBREVDAYNAME2 0x0000000f
297 #define CAL_SABBREVDAYNAME3 0x00000010
298 #define CAL_SABBREVDAYNAME4 0x00000011
299 #define CAL_SABBREVDAYNAME5 0x00000012
300 #define CAL_SABBREVDAYNAME6 0x00000013
301 #define CAL_SABBREVDAYNAME7 0x00000014
302 #define CAL_SMONTHNAME1 0x00000015
303 #define CAL_SMONTHNAME2 0x00000016
304 #define CAL_SMONTHNAME3 0x00000017
305 #define CAL_SMONTHNAME4 0x00000018
306 #define CAL_SMONTHNAME5 0x00000019
307 #define CAL_SMONTHNAME6 0x0000001a
308 #define CAL_SMONTHNAME7 0x0000001b
309 #define CAL_SMONTHNAME8 0x0000001c
310 #define CAL_SMONTHNAME9 0x0000001d
311 #define CAL_SMONTHNAME10 0x0000001e
312 #define CAL_SMONTHNAME11 0x0000001f
313 #define CAL_SMONTHNAME12 0x00000020
314 #define CAL_SMONTHNAME13 0x00000021
315 #define CAL_SABBREVMONTHNAME1 0x00000022
316 #define CAL_SABBREVMONTHNAME2 0x00000023
317 #define CAL_SABBREVMONTHNAME3 0x00000024
318 #define CAL_SABBREVMONTHNAME4 0x00000025
319 #define CAL_SABBREVMONTHNAME5 0x00000026
320 #define CAL_SABBREVMONTHNAME6 0x00000027
321 #define CAL_SABBREVMONTHNAME7 0x00000028
322 #define CAL_SABBREVMONTHNAME8 0x00000029
323 #define CAL_SABBREVMONTHNAME9 0x0000002a
324 #define CAL_SABBREVMONTHNAME10 0x0000002b
325 #define CAL_SABBREVMONTHNAME11 0x0000002c
326 #define CAL_SABBREVMONTHNAME12 0x0000002d
327 #define CAL_SABBREVMONTHNAME13 0x0000002e
328 #define CAL_SYEARMONTH 0x0000002f
329 #define CAL_GREGORIAN 1
330 #define CAL_GREGORIAN_US 2
337 #define CAL_GREGORIAN_ME_FRENCH 9
338 #define CAL_GREGORIAN_ARABIC 10
339 #define CAL_GREGORIAN_XLIT_ENGLISH 11
340 #define CAL_GREGORIAN_XLIT_FRENCH 12
345 typedef DWORD LCTYPE;
346 typedef DWORD CALTYPE;
352 BYTE DefaultChar[MAX_DEFAULTCHAR];
353 BYTE LeadByte[MAX_LEADBYTES];
359 BYTE DefaultChar[MAX_DEFAULTCHAR];
360 BYTE LeadByte[MAX_LEADBYTES];
361 WCHAR UnicodeDefaultChar;
363 CHAR CodePageName[MAX_PATH];
364 } CPINFOEXA, *LPCPINFOEXA;
369 BYTE DefaultChar[MAX_DEFAULTCHAR];
370 BYTE LeadByte[MAX_LEADBYTES];
371 WCHAR UnicodeDefaultChar;
373 WCHAR CodePageName[MAX_PATH];
374 } CPINFOEXW, *LPCPINFOEXW;
376 DECL_WINELIB_TYPE_AW(CPINFOEX)
377 DECL_WINELIB_TYPE_AW(LPCPINFOEX)
379 typedef struct _numberfmtA {
384 LPCSTR lpThousandSep;
386 } NUMBERFMTA, *LPNUMBERFMTA;
388 typedef struct _numberfmtW {
392 LPCWSTR lpDecimalSep;
393 LPCWSTR lpThousandSep;
395 } NUMBERFMTW, *LPNUMBERFMTW;
397 DECL_WINELIB_TYPE_AW(NUMBERFMT)
398 DECL_WINELIB_TYPE_AW(LPNUMBERFMT)
400 typedef struct _currencyfmtA
406 LPCSTR lpThousandSep;
409 LPCSTR lpCurrencySymbol;
410 } CURRENCYFMTA, *LPCURRENCYFMTA;
412 typedef struct _currencyfmtW
417 LPCWSTR lpDecimalSep;
418 LPCWSTR lpThousandSep;
421 LPCWSTR lpCurrencySymbol;
422 } CURRENCYFMTW, *LPCURRENCYFMTW;
424 DECL_WINELIB_TYPE_AW(CURRENCYFMT)
425 DECL_WINELIB_TYPE_AW(LPCURRENCYFMT)
431 LCID WINAPI ConvertDefaultLocale(LCID);
432 BOOL WINAPI EnumCalendarInfoA(CALINFO_ENUMPROCA,LCID,CALID,CALTYPE);
433 BOOL WINAPI EnumCalendarInfoW(CALINFO_ENUMPROCW,LCID,CALID,CALTYPE);
434 #define EnumCalendarInfo WINELIB_NAME_AW(EnumCalendarInfo)
435 BOOL WINAPI EnumDateFormatsA(DATEFMT_ENUMPROCA,LCID,DWORD);
436 BOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW,LCID,DWORD);
437 #define EnumDateFormats WINELIB_NAME_AW(EnumDateFormats)
438 BOOL WINAPI EnumSystemCodePagesA(CODEPAGE_ENUMPROCA,DWORD);
439 BOOL WINAPI EnumSystemCodePagesW(CODEPAGE_ENUMPROCW,DWORD);
440 #define EnumSystemCodePages WINELIB_NAME_AW(EnumSystemCodePages)
441 BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA,DWORD);
442 BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW,DWORD);
443 #define EnumSystemLocales WINELIB_NAME_AW(EnumSystemLocales)
444 BOOL WINAPI EnumTimeFormatsA(TIMEFMT_ENUMPROCA,LCID,DWORD);
445 BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW,LCID,DWORD);
446 #define EnumTimeFormats WINELIB_NAME_AW(EnumTimeFormats)
447 BOOL WINAPI GetCPInfo(UINT,LPCPINFO);
448 BOOL WINAPI GetCPInfoExA(UINT,DWORD,LPCPINFOEXA);
449 BOOL WINAPI GetCPInfoExW(UINT,DWORD,LPCPINFOEXW);
450 #define GetCPInfoEx WINELIB_NAME_AW(GetCPInfoEx)
451 INT WINAPI GetLocaleInfoA(LCID,LCTYPE,LPSTR,INT);
452 INT WINAPI GetLocaleInfoW(LCID,LCTYPE,LPWSTR,INT);
453 #define GetLocaleInfo WINELIB_NAME_AW(GetLocaleInfo)
454 INT WINAPI GetNumberFormatA(LCID,DWORD,LPCSTR,const NUMBERFMTA*,LPSTR,int);
455 INT WINAPI GetNumberFormatW(LCID,DWORD,LPCWSTR,const NUMBERFMTW*,LPWSTR,int);
456 #define GetNumberFormat WINELIB_NAME_AW(GetNumberFormat)
457 BOOL WINAPI IsValidCodePage(UINT);
458 INT WINAPI LCMapStringA(LCID,DWORD,LPCSTR,INT,LPSTR,INT);
459 INT WINAPI LCMapStringW(LCID,DWORD,LPCWSTR,INT,LPWSTR,INT);
460 #define LCMapString WINELIB_NAME_AW(LCMapString)
467 #endif /* __WINE_WINNLS_H */