Send CDDS_ITEMPOSTERASE | CDDS_PREPAINT notify.
[wine/multimedia.git] / include / msvcrt / wchar.h
blob73db7f8620b67c99fe9ef1e1527d1d918a1ab1ab
1 /*
2 * Unicode definitions
4 * Derived from the mingw header written by Colin Peters.
5 * Modified for Wine use by Jon Griffiths and Francois Gouget.
6 * This file is in the public domain.
7 */
8 #ifndef __WINE_WCHAR_H
9 #define __WINE_WCHAR_H
10 #ifndef __WINE_USE_MSVCRT
11 #define __WINE_USE_MSVCRT
12 #endif
14 #include <stdarg.h>
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
20 #ifndef _WCHAR_T_DEFINED
21 #define _WCHAR_T_DEFINED
22 #ifndef __cplusplus
23 typedef unsigned short wchar_t;
24 #endif
25 #endif
27 #ifndef NULL
28 #ifdef __cplusplus
29 #define NULL 0
30 #else
31 #define NULL ((void *)0)
32 #endif
33 #endif
35 #define WCHAR_MIN 0
36 #define WCHAR_MAX ((wchar_t)-1)
38 typedef int mbstate_t;
40 #ifndef _SIZE_T_DEFINED
41 typedef unsigned int size_t;
42 #define _SIZE_T_DEFINED
43 #endif
45 #ifndef _WCTYPE_T_DEFINED
46 typedef unsigned short wint_t;
47 typedef unsigned short wctype_t;
48 #define _WCTYPE_T_DEFINED
49 #endif
51 #ifndef _MSC_VER
52 # ifndef __int64
53 # define __int64 long long
54 # endif
55 #endif
57 #ifndef WEOF
58 #define WEOF (wint_t)(0xFFFF)
59 #endif
61 #ifndef _FSIZE_T_DEFINED
62 typedef unsigned long _fsize_t;
63 #define _FSIZE_T_DEFINED
64 #endif
66 #ifndef _DEV_T_DEFINED
67 typedef unsigned int _dev_t;
68 #define _DEV_T_DEFINED
69 #endif
71 #ifndef _INO_T_DEFINED
72 typedef unsigned short _ino_t;
73 #define _INO_T_DEFINED
74 #endif
76 #ifndef _OFF_T_DEFINED
77 typedef int _off_t;
78 #define _OFF_T_DEFINED
79 #endif
81 #ifndef _TIME_T_DEFINED
82 typedef long time_t;
83 #define _TIME_T_DEFINED
84 #endif
86 #ifndef _TM_DEFINED
87 #define _TM_DEFINED
88 struct tm {
89 int tm_sec;
90 int tm_min;
91 int tm_hour;
92 int tm_mday;
93 int tm_mon;
94 int tm_year;
95 int tm_wday;
96 int tm_yday;
97 int tm_isdst;
99 #endif /* _TM_DEFINED */
101 #ifndef _FILE_DEFINED
102 #define _FILE_DEFINED
103 typedef struct _iobuf
105 char* _ptr;
106 int _cnt;
107 char* _base;
108 int _flag;
109 int _file;
110 int _charbuf;
111 int _bufsiz;
112 char* _tmpfname;
113 } FILE;
114 #endif /* _FILE_DEFINED */
116 #ifndef _WFINDDATA_T_DEFINED
117 #define _WFINDDATA_T_DEFINED
119 struct _wfinddata_t {
120 unsigned attrib;
121 time_t time_create;
122 time_t time_access;
123 time_t time_write;
124 _fsize_t size;
125 wchar_t name[260];
128 struct _wfinddatai64_t {
129 unsigned attrib;
130 time_t time_create;
131 time_t time_access;
132 time_t time_write;
133 __int64 size;
134 wchar_t name[260];
137 #endif /* _WFINDDATA_T_DEFINED */
139 #ifndef _STAT_DEFINED
140 #define _STAT_DEFINED
142 struct _stat {
143 _dev_t st_dev;
144 _ino_t st_ino;
145 unsigned short st_mode;
146 short st_nlink;
147 short st_uid;
148 short st_gid;
149 _dev_t st_rdev;
150 _off_t st_size;
151 time_t st_atime;
152 time_t st_mtime;
153 time_t st_ctime;
156 struct stat {
157 _dev_t st_dev;
158 _ino_t st_ino;
159 unsigned short st_mode;
160 short st_nlink;
161 short st_uid;
162 short st_gid;
163 _dev_t st_rdev;
164 _off_t st_size;
165 time_t st_atime;
166 time_t st_mtime;
167 time_t st_ctime;
170 struct _stati64 {
171 _dev_t st_dev;
172 _ino_t st_ino;
173 unsigned short st_mode;
174 short st_nlink;
175 short st_uid;
176 short st_gid;
177 _dev_t st_rdev;
178 __int64 st_size;
179 time_t st_atime;
180 time_t st_mtime;
181 time_t st_ctime;
183 #endif /* _STAT_DEFINED */
185 /* ASCII char classification table - binary compatible */
186 #define _UPPER 0x0001 /* C1_UPPER */
187 #define _LOWER 0x0002 /* C1_LOWER */
188 #define _DIGIT 0x0004 /* C1_DIGIT */
189 #define _SPACE 0x0008 /* C1_SPACE */
190 #define _PUNCT 0x0010 /* C1_PUNCT */
191 #define _CONTROL 0x0020 /* C1_CNTRL */
192 #define _BLANK 0x0040 /* C1_BLANK */
193 #define _HEX 0x0080 /* C1_XDIGIT */
194 #define _LEADBYTE 0x8000
195 #define _ALPHA (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */
197 #ifndef _WCTYPE_DEFINED
198 #define _WCTYPE_DEFINED
199 int is_wctype(wint_t,wctype_t);
200 int isleadbyte(int);
201 int iswalnum(wint_t);
202 int iswalpha(wint_t);
203 int iswascii(wint_t);
204 int iswcntrl(wint_t);
205 int iswctype(wint_t,wctype_t);
206 int iswdigit(wint_t);
207 int iswgraph(wint_t);
208 int iswlower(wint_t);
209 int iswprint(wint_t);
210 int iswpunct(wint_t);
211 int iswspace(wint_t);
212 int iswupper(wint_t);
213 int iswxdigit(wint_t);
214 wchar_t towlower(wchar_t);
215 wchar_t towupper(wchar_t);
216 #endif /* _WCTYPE_DEFINED */
218 #ifndef _WDIRECT_DEFINED
219 #define _WDIRECT_DEFINED
220 int _wchdir(const wchar_t*);
221 wchar_t* _wgetcwd(wchar_t*,int);
222 wchar_t* _wgetdcwd(int,wchar_t*,int);
223 int _wmkdir(const wchar_t*);
224 int _wrmdir(const wchar_t*);
225 #endif /* _WDIRECT_DEFINED */
227 #ifndef _WIO_DEFINED
228 #define _WIO_DEFINED
229 int _waccess(const wchar_t*,int);
230 int _wchmod(const wchar_t*,int);
231 int _wcreat(const wchar_t*,int);
232 long _wfindfirst(const wchar_t*,struct _wfinddata_t*);
233 long _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
234 int _wfindnext(long,struct _wfinddata_t*);
235 int _wfindnexti64(long, struct _wfinddatai64_t*);
236 wchar_t*_wmktemp(wchar_t*);
237 int _wopen(const wchar_t*,int,...);
238 int _wrename(const wchar_t*,const wchar_t*);
239 int _wsopen(const wchar_t*,int,int,...);
240 int _wunlink(const wchar_t*);
241 #endif /* _WIO_DEFINED */
243 #ifndef _WLOCALE_DEFINED
244 #define _WLOCALE_DEFINED
245 wchar_t* _wsetlocale(int,const wchar_t*);
246 #endif /* _WLOCALE_DEFINED */
248 #ifndef _WPROCESS_DEFINED
249 #define _WPROCESS_DEFINED
250 int _wexecl(const wchar_t*,const wchar_t*,...);
251 int _wexecle(const wchar_t*,const wchar_t*,...);
252 int _wexeclp(const wchar_t*,const wchar_t*,...);
253 int _wexeclpe(const wchar_t*,const wchar_t*,...);
254 int _wexecv(const wchar_t*,const wchar_t* const *);
255 int _wexecve(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
256 int _wexecvp(const wchar_t*,const wchar_t* const *);
257 int _wexecvpe(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
258 int _wspawnl(int,const wchar_t*,const wchar_t*,...);
259 int _wspawnle(int,const wchar_t*,const wchar_t*,...);
260 int _wspawnlp(int,const wchar_t*,const wchar_t*,...);
261 int _wspawnlpe(int,const wchar_t*,const wchar_t*,...);
262 int _wspawnv(int,const wchar_t*,const wchar_t* const *);
263 int _wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
264 int _wspawnvp(int,const wchar_t*,const wchar_t* const *);
265 int _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
266 int _wsystem(const wchar_t*);
267 #endif /* _WPROCESS_DEFINED */
269 #ifndef _WSTAT_DEFINED
270 #define _WSTAT_DEFINED
271 int _wstat(const wchar_t*,struct _stat*);
272 int _wstati64(const wchar_t*,struct _stati64*);
273 #endif /* _WSTAT_DEFINED */
275 #ifndef _WSTDIO_DEFINED
276 #define _WSTDIO_DEFINED
277 wint_t _fgetwchar(void);
278 wint_t _fputwchar(wint_t);
279 wchar_t*_getws(wchar_t*);
280 int _putws(const wchar_t*);
281 int _snwprintf(wchar_t*,size_t,const wchar_t*,...);
282 int _vsnwprintf(wchar_t*,size_t,const wchar_t*,va_list);
283 FILE* _wfdopen(int,const wchar_t*);
284 FILE* _wfopen(const wchar_t*,const wchar_t*);
285 FILE* _wfreopen(const wchar_t*,const wchar_t*,FILE*);
286 FILE* _wfsopen(const wchar_t*,const wchar_t*,int);
287 void _wperror(const wchar_t*);
288 FILE* _wpopen(const wchar_t*,const wchar_t*);
289 int _wremove(const wchar_t*);
290 wchar_t*_wtempnam(const wchar_t*,const wchar_t*);
291 wchar_t*_wtmpnam(wchar_t*);
293 wint_t fgetwc(FILE*);
294 wchar_t*fgetws(wchar_t*,int,FILE*);
295 wint_t fputwc(wint_t,FILE*);
296 int fputws(const wchar_t*,FILE*);
297 int fwprintf(FILE*,const wchar_t*,...);
298 int fputws(const wchar_t*,FILE*);
299 int fwscanf(FILE*,const wchar_t*,...);
300 wint_t getwc(FILE*);
301 wint_t getwchar(void);
302 wchar_t*getws(wchar_t*);
303 wint_t putwc(wint_t,FILE*);
304 wint_t putwchar(wint_t);
305 int putws(const wchar_t*);
306 int swprintf(wchar_t*,const wchar_t*,...);
307 int swscanf(const wchar_t*,const wchar_t*,...);
308 wint_t ungetwc(wint_t,FILE*);
309 int vfwprintf(FILE*,const wchar_t*,va_list);
310 int vswprintf(wchar_t*,const wchar_t*,va_list);
311 int vwprintf(const wchar_t*,va_list);
312 int wprintf(const wchar_t*,...);
313 int wscanf(const wchar_t*,...);
314 #endif /* _WSTDIO_DEFINED */
316 #ifndef _WSTDLIB_DEFINED
317 #define _WSTDLIB_DEFINED
318 wchar_t*_itow(int,wchar_t*,int);
319 wchar_t*_i64tow(__int64,wchar_t*,int);
320 wchar_t*_ltow(long,wchar_t*,int);
321 wchar_t*_ui64tow(unsigned __int64,wchar_t*,int);
322 wchar_t*_ultow(unsigned long,wchar_t*,int);
323 wchar_t*_wfullpath(wchar_t*,const wchar_t*,size_t);
324 wchar_t*_wgetenv(const wchar_t*);
325 void _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
326 void _wperror(const wchar_t*);
327 int _wputenv(const wchar_t*);
328 void _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*);
329 void _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*);
330 int _wsystem(const wchar_t*);
331 int _wtoi(const wchar_t*);
332 __int64 _wtoi64(const wchar_t*);
333 long _wtol(const wchar_t*);
335 size_t mbstowcs(wchar_t*,const char*,size_t);
336 int mbtowc(wchar_t*,const char*,size_t);
337 double wcstod(const wchar_t*,wchar_t**);
338 long wcstol(const wchar_t*,wchar_t**,int);
339 size_t wcstombs(char*,const wchar_t*,size_t);
340 unsigned long wcstoul(const wchar_t*,wchar_t**,int);
341 int wctomb(char*,wchar_t);
342 #endif /* _WSTDLIB_DEFINED */
344 #ifndef _WSTRING_DEFINED
345 #define _WSTRING_DEFINED
346 wchar_t*_wcsdup(const wchar_t*);
347 int _wcsicmp(const wchar_t*,const wchar_t*);
348 int _wcsicoll(const wchar_t*,const wchar_t*);
349 wchar_t*_wcslwr(wchar_t*);
350 int _wcsnicmp(const wchar_t*,const wchar_t*,size_t);
351 wchar_t*_wcsnset(wchar_t*,wchar_t,size_t);
352 wchar_t*_wcsrev(wchar_t*);
353 wchar_t*_wcsset(wchar_t*,wchar_t);
354 wchar_t*_wcsupr(wchar_t*);
356 wchar_t*wcscat(wchar_t*,const wchar_t*);
357 wchar_t*wcschr(const wchar_t*,wchar_t);
358 int wcscmp(const wchar_t*,const wchar_t*);
359 int wcscoll(const wchar_t*,const wchar_t*);
360 wchar_t*wcscpy(wchar_t*,const wchar_t*);
361 size_t wcscspn(const wchar_t*,const wchar_t*);
362 size_t wcslen(const wchar_t*);
363 wchar_t*wcsncat(wchar_t*,const wchar_t*,size_t);
364 int wcsncmp(const wchar_t*,const wchar_t*,size_t);
365 wchar_t*wcsncpy(wchar_t*,const wchar_t*,size_t);
366 wchar_t*wcspbrk(const wchar_t*,const wchar_t*);
367 wchar_t*wcsrchr(const wchar_t*,wchar_t wcFor);
368 size_t wcsspn(const wchar_t*,const wchar_t*);
369 wchar_t*wcsstr(const wchar_t*,const wchar_t*);
370 wchar_t*wcstok(wchar_t*,const wchar_t*);
371 size_t wcsxfrm(wchar_t*,const wchar_t*,size_t);
372 #endif /* _WSTRING_DEFINED */
374 #ifndef _WTIME_DEFINED
375 #define _WTIME_DEFINED
376 wchar_t*_wasctime(const struct tm*);
377 size_t wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*);
378 wchar_t*_wctime(const time_t*);
379 wchar_t*_wstrdate(wchar_t*);
380 wchar_t*_wstrtime(wchar_t*);
381 #endif /* _WTIME_DEFINED */
383 wchar_t btowc(int);
384 size_t mbrlen(const char *,size_t,mbstate_t*);
385 size_t mbrtowc(wchar_t*,const char*,size_t,mbstate_t*);
386 size_t mbsrtowcs(wchar_t*,const char**,size_t,mbstate_t*);
387 size_t wcrtomb(char*,wchar_t,mbstate_t*);
388 size_t wcsrtombs(char*,const wchar_t**,size_t,mbstate_t*);
389 int wctob(wint_t);
391 #ifdef __cplusplus
393 #endif
395 #endif /* __WINE_WCHAR_H */