Remove trailing whitespace from most files
[mplayer/glamo.git] / loader / wine / windef.h
blobddf0228dd0a969e71b885a788b22324072190cb5
1 /*
2 * Basic types definitions
4 * Copyright 1996 Alexandre Julliard
6 * Modified for use with MPlayer, detailed changelog at
7 * http://svn.mplayerhq.hu/mplayer/trunk/
9 */
11 #ifndef MPLAYER_WINDEF_H
12 #define MPLAYER_WINDEF_H
14 # include "config.h"
16 #ifdef _EGCS_
17 #define __stdcall
18 #endif
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
24 /* Misc. constants. */
26 #ifdef FALSE
27 #undef FALSE
28 #endif
29 #define FALSE 0
31 #ifdef TRUE
32 #undef TRUE
33 #endif
34 #define TRUE 1
36 #ifdef NULL
37 #undef NULL
38 #endif
39 #define NULL 0
41 /* Macros to map Winelib names to the correct implementation name */
42 /* Note that Winelib is purely Win32. */
44 # define WINELIB_NAME_AW(func) \
45 func##_must_be_suffixed_with_W_or_A_in_this_context \
46 func##_must_be_suffixed_with_W_or_A_in_this_context
48 # define DECL_WINELIB_TYPE_AW(type) /* nothing */
50 #ifndef NONAMELESSSTRUCT
51 # define NONAMELESSSTRUCT
52 #endif /* !defined(NONAMELESSSTRUCT) */
54 #ifndef NONAMELESSUNION
55 # define NONAMELESSUNION
56 #endif /* !defined(NONAMELESSUNION) */
58 #ifndef NONAMELESSSTRUCT
59 #define DUMMYSTRUCTNAME
60 #define DUMMYSTRUCTNAME1
61 #define DUMMYSTRUCTNAME2
62 #define DUMMYSTRUCTNAME3
63 #define DUMMYSTRUCTNAME4
64 #define DUMMYSTRUCTNAME5
65 #else /* !defined(NONAMELESSSTRUCT) */
66 #define DUMMYSTRUCTNAME s
67 #define DUMMYSTRUCTNAME1 s1
68 #define DUMMYSTRUCTNAME2 s2
69 #define DUMMYSTRUCTNAME3 s3
70 #define DUMMYSTRUCTNAME4 s4
71 #define DUMMYSTRUCTNAME5 s5
72 #endif /* !defined(NONAMELESSSTRUCT) */
74 #ifndef NONAMELESSUNION
75 #define DUMMYUNIONNAME
76 #define DUMMYUNIONNAME1
77 #define DUMMYUNIONNAME2
78 #define DUMMYUNIONNAME3
79 #define DUMMYUNIONNAME4
80 #define DUMMYUNIONNAME5
81 #else /* !defined(NONAMELESSUNION) */
82 #define DUMMYUNIONNAME u
83 #define DUMMYUNIONNAME1 u1
84 #define DUMMYUNIONNAME2 u2
85 #define DUMMYUNIONNAME3 u3
86 #define DUMMYUNIONNAME4 u4
87 #define DUMMYUNIONNAME5 u5
88 #endif /* !defined(NONAMELESSUNION) */
90 /* Calling conventions definitions */
92 #ifdef __i386__
93 # if defined(__GNUC__) && ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
94 # ifndef _EGCS_
95 #define __stdcall __attribute__((__stdcall__))
96 #define __cdecl __attribute__((__cdecl__))
97 # define RESTORE_ES __asm__ volatile("pushl %ds\n\tpopl %es")
98 # endif
99 # else
100 // # error You need gcc >= 2.7 to build Wine on a 386
101 # endif
102 #else
103 # define __stdcall
104 # define __cdecl
105 # define RESTORE_ES
106 #endif
108 #define CALLBACK __stdcall
109 #define WINAPI __stdcall
110 #define APIPRIVATE __stdcall
111 #define PASCAL __stdcall
112 #define pascal __stdcall
113 #define _pascal __stdcall
114 #if !defined(__CYGWIN__) && !defined(__MINGW32__)
115 #define _stdcall __stdcall
116 #define _fastcall __stdcall
117 #define __fastcall __stdcall
118 #endif
119 #define __export __stdcall
120 #define CDECL __cdecl
121 #define _CDECL __cdecl
122 #define cdecl __cdecl
123 #if !defined(__CYGWIN__) && !defined(__MINGW32__)
124 #define _cdecl __cdecl
125 #endif
126 #define WINAPIV __cdecl
127 #define APIENTRY WINAPI
129 #if !defined(__CYGWIN__) && !defined(__MINGW32__)
130 #define __declspec(x)
131 #endif
132 #define dllimport
133 #define dllexport
135 #define CONST const
137 /* Standard data types. These are the same for emulator and library. */
139 typedef void VOID;
140 typedef int INT;
141 typedef unsigned int UINT;
142 typedef unsigned short WORD;
143 typedef unsigned long DWORD;
144 typedef unsigned long ULONG;
145 typedef unsigned char BYTE;
146 typedef long LONG;
147 typedef short SHORT;
148 typedef unsigned short USHORT;
149 typedef char CHAR;
150 typedef unsigned char UCHAR;
152 typedef LONG SCODE;
154 /* Some systems might have wchar_t, but we really need 16 bit characters */
155 typedef unsigned short WCHAR;
156 typedef int WIN_BOOL;
157 typedef double DATE;
158 typedef double DOUBLE;
159 typedef long long LONGLONG;
160 typedef unsigned long long ULONGLONG;
162 /* FIXME: Wine does not compile with strict on, therefore strict
163 * handles are presently only usable on machines where sizeof(UINT) ==
164 * sizeof(void*). HANDLEs are supposed to be void* but a large amount
165 * of WINE code operates on HANDLES as if they are UINTs. So to WINE
166 * they exist as UINTs but to the Winelib user who turns on strict,
167 * they exist as void*. If there is a size difference between UINT and
168 * void* then things get ugly. */
169 #ifdef STRICT
170 typedef VOID* HANDLE;
171 #else
172 typedef UINT HANDLE;
173 #endif
176 typedef HANDLE *LPHANDLE;
178 /* Integer types. These are the same for emulator and library. */
179 typedef UINT WPARAM;
180 typedef LONG LPARAM;
181 typedef LONG HRESULT;
182 typedef LONG LRESULT;
183 typedef WORD ATOM;
184 typedef WORD CATCHBUF[9];
185 typedef WORD *LPCATCHBUF;
186 typedef HANDLE HHOOK;
187 typedef HANDLE HMONITOR;
188 typedef DWORD LCID;
189 typedef WORD LANGID;
190 typedef DWORD LCTYPE;
191 typedef float FLOAT;
193 /* Pointers types. These are the same for emulator and library. */
194 /* winnt types */
195 typedef VOID *PVOID;
196 typedef const void *PCVOID;
197 typedef CHAR *PCHAR;
198 typedef UCHAR *PUCHAR;
199 typedef BYTE *PBYTE;
200 typedef WORD *PWORD;
201 typedef USHORT *PUSHORT;
202 typedef SHORT *PSHORT;
203 typedef ULONG *PULONG;
204 typedef LONG *PLONG;
205 typedef DWORD *PDWORD;
206 /* common win32 types */
207 typedef CHAR *LPSTR;
208 typedef CHAR *PSTR;
209 typedef const CHAR *LPCSTR;
210 typedef const CHAR *PCSTR;
211 typedef WCHAR *LPWSTR;
212 typedef WCHAR *PWSTR;
213 typedef const WCHAR *LPCWSTR;
214 typedef const WCHAR *PCWSTR;
215 typedef BYTE *LPBYTE;
216 typedef WORD *LPWORD;
217 typedef DWORD *LPDWORD;
218 typedef LONG *LPLONG;
219 typedef VOID *LPVOID;
220 typedef const VOID *LPCVOID;
221 typedef INT *PINT;
222 typedef INT *LPINT;
223 typedef UINT *PUINT;
224 typedef UINT *LPUINT;
225 typedef FLOAT *PFLOAT;
226 typedef FLOAT *LPFLOAT;
227 typedef WIN_BOOL *PWIN_BOOL;
228 typedef WIN_BOOL *LPWIN_BOOL;
230 /* Special case: a segmented pointer is just a pointer in the user's code. */
232 typedef DWORD SEGPTR;
234 /* Handle types that exist both in Win16 and Win32. */
236 #ifdef STRICT
237 #define DECLARE_HANDLE(a) \
238 typedef struct a##__ { int unused; } *a; \
239 typedef a *P##a; \
240 typedef a *LP##a
241 #else /*STRICT*/
242 #define DECLARE_HANDLE(a) \
243 typedef HANDLE a; \
244 typedef a *P##a; \
245 typedef a *LP##a
246 #endif /*STRICT*/
248 DECLARE_HANDLE(HACMDRIVERID);
249 DECLARE_HANDLE(HACMDRIVER);
250 DECLARE_HANDLE(HACMOBJ);
251 DECLARE_HANDLE(HACMSTREAM);
252 DECLARE_HANDLE(HMETAFILEPICT);
254 DECLARE_HANDLE(HACCEL);
255 DECLARE_HANDLE(HBITMAP);
256 DECLARE_HANDLE(HBRUSH);
257 DECLARE_HANDLE(HCOLORSPACE);
258 DECLARE_HANDLE(HCURSOR);
259 DECLARE_HANDLE(HDC);
260 DECLARE_HANDLE(HDROP);
261 DECLARE_HANDLE(HDRVR);
262 DECLARE_HANDLE(HDWP);
263 DECLARE_HANDLE(HENHMETAFILE);
264 DECLARE_HANDLE(HFILE);
265 DECLARE_HANDLE(HFONT);
266 DECLARE_HANDLE(HICON);
267 DECLARE_HANDLE(HINSTANCE);
268 DECLARE_HANDLE(HKEY);
269 DECLARE_HANDLE(HMENU);
270 DECLARE_HANDLE(HMETAFILE);
271 DECLARE_HANDLE(HMIDI);
272 DECLARE_HANDLE(HMIDIIN);
273 DECLARE_HANDLE(HMIDIOUT);
274 DECLARE_HANDLE(HMIDISTRM);
275 DECLARE_HANDLE(HMIXER);
276 DECLARE_HANDLE(HMIXEROBJ);
277 DECLARE_HANDLE(HMMIO);
278 DECLARE_HANDLE(HPALETTE);
279 DECLARE_HANDLE(HPEN);
280 DECLARE_HANDLE(HQUEUE);
281 DECLARE_HANDLE(HRGN);
282 DECLARE_HANDLE(HRSRC);
283 DECLARE_HANDLE(HTASK);
284 DECLARE_HANDLE(HWAVE);
285 DECLARE_HANDLE(HWAVEIN);
286 DECLARE_HANDLE(HWAVEOUT);
287 DECLARE_HANDLE(HWINSTA);
288 DECLARE_HANDLE(HDESK);
289 DECLARE_HANDLE(HWND);
290 DECLARE_HANDLE(HKL);
291 DECLARE_HANDLE(HIC);
292 DECLARE_HANDLE(HRASCONN);
294 /* Handle types that must remain interchangeable even with strict on */
296 typedef HINSTANCE HMODULE;
297 typedef HANDLE HGDIOBJ;
298 typedef HANDLE HGLOBAL;
299 typedef HANDLE HLOCAL;
300 typedef HANDLE GLOBALHANDLE;
301 typedef HANDLE LOCALHANDLE;
303 /* Callback function pointers types */
304 //WIN_BOOL CALLBACK DATEFMT_ENUMPROCA(LPSTR);
306 typedef WIN_BOOL CALLBACK (* DATEFMT_ENUMPROCA)(LPSTR);
307 typedef WIN_BOOL CALLBACK (* DATEFMT_ENUMPROCW)(LPWSTR);
308 DECL_WINELIB_TYPE_AW(DATEFMT_ENUMPROC)
309 typedef WIN_BOOL CALLBACK (*DLGPROC)(HWND,UINT,WPARAM,LPARAM);
310 typedef LRESULT CALLBACK (*DRIVERPROC)(DWORD,HDRVR,UINT,LPARAM,LPARAM);
311 typedef INT CALLBACK (*EDITWORDBREAKPROCA)(LPSTR,INT,INT,INT);
312 typedef INT CALLBACK (*EDITWORDBREAKPROCW)(LPWSTR,INT,INT,INT);
313 DECL_WINELIB_TYPE_AW(EDITWORDBREAKPROC)
314 typedef LRESULT CALLBACK (*FARPROC)();
315 typedef INT CALLBACK (*PROC)();
316 typedef WIN_BOOL CALLBACK (*GRAYSTRINGPROC)(HDC,LPARAM,INT);
317 typedef LRESULT CALLBACK (*HOOKPROC)(INT,WPARAM,LPARAM);
318 typedef WIN_BOOL CALLBACK (*PROPENUMPROCA)(HWND,LPCSTR,HANDLE);
319 typedef WIN_BOOL CALLBACK (*PROPENUMPROCW)(HWND,LPCWSTR,HANDLE);
320 DECL_WINELIB_TYPE_AW(PROPENUMPROC)
321 typedef WIN_BOOL CALLBACK (*PROPENUMPROCEXA)(HWND,LPCSTR,HANDLE,LPARAM);
322 typedef WIN_BOOL CALLBACK (*PROPENUMPROCEXW)(HWND,LPCWSTR,HANDLE,LPARAM);
323 DECL_WINELIB_TYPE_AW(PROPENUMPROCEX)
324 typedef WIN_BOOL CALLBACK (* TIMEFMT_ENUMPROCA)(LPSTR);
325 typedef WIN_BOOL CALLBACK (* TIMEFMT_ENUMPROCW)(LPWSTR);
326 DECL_WINELIB_TYPE_AW(TIMEFMT_ENUMPROC)
327 typedef VOID CALLBACK (*TIMERPROC)(HWND,UINT,UINT,DWORD);
328 typedef WIN_BOOL CALLBACK (*WNDENUMPROC)(HWND,LPARAM);
329 typedef LRESULT CALLBACK (*WNDPROC)(HWND,UINT,WPARAM,LPARAM);
331 /*----------------------------------------------------------------------------
332 ** FIXME: Better isolate Wine's reliance on the xxx16 type definitions.
333 ** For now, we just isolate them to make the situation clear.
334 **--------------------------------------------------------------------------*/
336 * Basic type definitions for 16 bit variations on Windows types.
337 * These types are provided mostly to insure compatibility with
338 * 16 bit windows code.
341 #ifndef MPLAYER_WINDEF16_H
342 #define MPLAYER_WINDEF16_H
344 #include "windef.h"
346 /* Standard data types */
348 typedef short INT16;
349 typedef unsigned short UINT16;
350 typedef unsigned short WIN_BOOL16;
352 typedef UINT16 HANDLE16;
353 typedef HANDLE16 *LPHANDLE16;
355 typedef UINT16 WPARAM16;
356 typedef INT16 *LPINT16;
357 typedef UINT16 *LPUINT16;
359 #define DECLARE_HANDLE16(a) \
360 typedef HANDLE16 a##16; \
361 typedef a##16 *P##a##16; \
362 typedef a##16 *NP##a##16; \
363 typedef a##16 *LP##a##16
365 DECLARE_HANDLE16(HACMDRIVERID);
366 DECLARE_HANDLE16(HACMDRIVER);
367 DECLARE_HANDLE16(HACMOBJ);
368 DECLARE_HANDLE16(HACMSTREAM);
369 DECLARE_HANDLE16(HMETAFILEPICT);
371 DECLARE_HANDLE16(HACCEL);
372 DECLARE_HANDLE16(HBITMAP);
373 DECLARE_HANDLE16(HBRUSH);
374 DECLARE_HANDLE16(HCOLORSPACE);
375 DECLARE_HANDLE16(HCURSOR);
376 DECLARE_HANDLE16(HDC);
377 DECLARE_HANDLE16(HDROP);
378 DECLARE_HANDLE16(HDRVR);
379 DECLARE_HANDLE16(HDWP);
380 DECLARE_HANDLE16(HENHMETAFILE);
381 DECLARE_HANDLE16(HFILE);
382 DECLARE_HANDLE16(HFONT);
383 DECLARE_HANDLE16(HICON);
384 DECLARE_HANDLE16(HINSTANCE);
385 DECLARE_HANDLE16(HKEY);
386 DECLARE_HANDLE16(HMENU);
387 DECLARE_HANDLE16(HMETAFILE);
388 DECLARE_HANDLE16(HMIDI);
389 DECLARE_HANDLE16(HMIDIIN);
390 DECLARE_HANDLE16(HMIDIOUT);
391 DECLARE_HANDLE16(HMIDISTRM);
392 DECLARE_HANDLE16(HMIXER);
393 DECLARE_HANDLE16(HMIXEROBJ);
394 DECLARE_HANDLE16(HMMIO);
395 DECLARE_HANDLE16(HPALETTE);
396 DECLARE_HANDLE16(HPEN);
397 DECLARE_HANDLE16(HQUEUE);
398 DECLARE_HANDLE16(HRGN);
399 DECLARE_HANDLE16(HRSRC);
400 DECLARE_HANDLE16(HTASK);
401 DECLARE_HANDLE16(HWAVE);
402 DECLARE_HANDLE16(HWAVEIN);
403 DECLARE_HANDLE16(HWAVEOUT);
404 DECLARE_HANDLE16(HWINSTA);
405 DECLARE_HANDLE16(HDESK);
406 DECLARE_HANDLE16(HWND);
407 DECLARE_HANDLE16(HKL);
408 DECLARE_HANDLE16(HIC);
409 DECLARE_HANDLE16(HRASCONN);
410 #undef DECLARE_HANDLE16
412 typedef HINSTANCE16 HMODULE16;
413 typedef HANDLE16 HGDIOBJ16;
414 typedef HANDLE16 HGLOBAL16;
415 typedef HANDLE16 HLOCAL16;
417 /* The SIZE structure */
418 typedef struct
420 INT16 cx;
421 INT16 cy;
422 } SIZE16, *PSIZE16, *LPSIZE16;
424 /* The POINT structure */
426 typedef struct
428 INT16 x;
429 INT16 y;
430 } POINT16, *PPOINT16, *LPPOINT16;
432 /* The RECT structure */
434 typedef struct
436 INT16 left;
437 INT16 top;
438 INT16 right;
439 INT16 bottom;
440 } RECT16, *LPRECT16;
442 /* Callback function pointers types */
444 typedef LRESULT CALLBACK (*DRIVERPROC16)(DWORD,HDRVR16,UINT16,LPARAM,LPARAM);
445 typedef WIN_BOOL16 CALLBACK (*DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
446 typedef INT16 CALLBACK (*EDITWORDBREAKPROC16)(LPSTR,INT16,INT16,INT16);
447 typedef LRESULT CALLBACK (*FARPROC16)();
448 typedef INT16 CALLBACK (*PROC16)();
449 typedef WIN_BOOL16 CALLBACK (*GRAYSTRINGPROC16)(HDC16,LPARAM,INT16);
450 typedef LRESULT CALLBACK (*HOOKPROC16)(INT16,WPARAM16,LPARAM);
451 typedef WIN_BOOL16 CALLBACK (*PROPENUMPROC16)(HWND16,SEGPTR,HANDLE16);
452 typedef VOID CALLBACK (*TIMERPROC16)(HWND16,UINT16,UINT16,DWORD);
453 typedef LRESULT CALLBACK (*WNDENUMPROC16)(HWND16,LPARAM);
454 typedef LRESULT CALLBACK (*WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
456 #endif /* MPLAYER_WINDEF16_H */
458 /* Define some empty macros for compatibility with Windows code. */
460 /* Macro for structure packing. */
462 #ifdef __GNUC__
463 #ifndef _EGCS_
464 #define WINE_PACKED __attribute__((packed))
465 #define WINE_UNUSED __attribute__((unused))
466 #define WINE_NORETURN __attribute__((noreturn))
467 #endif
468 #else
469 #define WINE_PACKED /* nothing */
470 #define WINE_UNUSED /* nothing */
471 #define WINE_NORETURN /* nothing */
472 #endif
474 /* Macros to split words and longs. */
476 #define LOBYTE(w) ((BYTE)(WORD)(w))
477 #define HIBYTE(w) ((BYTE)((WORD)(w) >> 8))
479 #define LOWORD(l) ((WORD)(DWORD)(l))
480 #define HIWORD(l) ((WORD)((DWORD)(l) >> 16))
482 #define SLOWORD(l) ((INT16)(LONG)(l))
483 #define SHIWORD(l) ((INT16)((LONG)(l) >> 16))
485 #define MAKEWORD(low,high) ((WORD)(((BYTE)(low)) | ((WORD)((BYTE)(high))) << 8))
486 #define MAKELONG(low,high) ((LONG)(((WORD)(low)) | (((DWORD)((WORD)(high))) << 16)))
487 #define MAKELPARAM(low,high) ((LPARAM)MAKELONG(low,high))
488 #define MAKEWPARAM(low,high) ((WPARAM)MAKELONG(low,high))
489 #define MAKELRESULT(low,high) ((LRESULT)MAKELONG(low,high))
490 #define MAKEINTATOM(atom) ((LPCSTR)MAKELONG((atom),0))
492 #define SELECTOROF(ptr) (HIWORD(ptr))
493 #define OFFSETOF(ptr) (LOWORD(ptr))
495 /* macros to set parts of a DWORD (not in the Windows API) */
496 #define SET_LOWORD(dw,val) ((dw) = ((dw) & 0xffff0000) | LOWORD(val))
497 #define SET_LOBYTE(dw,val) ((dw) = ((dw) & 0xffffff00) | LOBYTE(val))
498 #define SET_HIBYTE(dw,val) ((dw) = ((dw) & 0xffff00ff) | (LOWORD(val) & 0xff00))
499 #define ADD_LOWORD(dw,val) ((dw) = ((dw) & 0xffff0000) | LOWORD((DWORD)(dw)+(val)))
501 /* Macros to access unaligned or wrong-endian WORDs and DWORDs. */
502 /* Note: These macros are semantically broken, at least for wrc. wrc
503 spits out data in the platform's current binary format, *not* in
504 little-endian format. These macros are used throughout the resource
505 code to load and store data to the resources. Since it is unlikely
506 that we'll ever be dealing with little-endian resource data, the
507 byte-swapping nature of these macros has been disabled. Rather than
508 remove the use of these macros from the resource loading code, the
509 macros have simply been disabled. In the future, someone may want
510 to reactivate these macros for other purposes. In that case, the
511 resource code will have to be modified to use different macros. */
513 #if 1
514 #define PUT_WORD(ptr,w) (*(WORD *)(ptr) = (w))
515 #define GET_WORD(ptr) (*(WORD *)(ptr))
516 #define PUT_DWORD(ptr,dw) (*(DWORD *)(ptr) = (dw))
517 #define GET_DWORD(ptr) (*(DWORD *)(ptr))
518 #else
519 #define PUT_WORD(ptr,w) (*(BYTE *)(ptr) = LOBYTE(w), \
520 *((BYTE *)(ptr) + 1) = HIBYTE(w))
521 #define GET_WORD(ptr) ((WORD)(*(BYTE *)(ptr) | \
522 (WORD)(*((BYTE *)(ptr)+1) << 8)))
523 #define PUT_DWORD(ptr,dw) (PUT_WORD((ptr),LOWORD(dw)), \
524 PUT_WORD((WORD *)(ptr)+1,HIWORD(dw)))
525 #define GET_DWORD(ptr) ((DWORD)(GET_WORD(ptr) | \
526 ((DWORD)GET_WORD((WORD *)(ptr)+1) << 16)))
527 #endif /* 1 */
529 /* min and max macros */
530 #define __max(a,b) (((a) > (b)) ? (a) : (b))
531 #define __min(a,b) (((a) < (b)) ? (a) : (b))
532 #ifndef max
533 #define max(a,b) (((a) > (b)) ? (a) : (b))
534 #endif
535 #ifndef min
536 #define min(a,b) (((a) < (b)) ? (a) : (b))
537 #endif
539 #ifndef _MAX_PATH
540 #define _MAX_PATH 260
541 #endif
542 #ifndef MAX_PATH
543 #define MAX_PATH 260
544 #endif
545 #ifndef _MAX_DRIVE
546 #define _MAX_DRIVE 3
547 #endif
548 #ifndef _MAX_DIR
549 #define _MAX_DIR 256
550 #endif
551 #ifndef _MAX_FNAME
552 #define _MAX_FNAME 255
553 #endif
554 #ifndef _MAX_EXT
555 #define _MAX_EXT 256
556 #endif
558 #define HFILE_ERROR16 ((HFILE16)-1)
559 #define HFILE_ERROR ((HFILE)-1)
561 /* The SIZE structure */
562 typedef struct tagSIZE
564 INT cx;
565 INT cy;
566 } SIZE, *PSIZE, *LPSIZE;
569 typedef SIZE SIZEL, *PSIZEL, *LPSIZEL;
571 #define CONV_SIZE16TO32(s16,s32) \
572 ((s32)->cx = (INT)(s16)->cx, (s32)->cy = (INT)(s16)->cy)
573 #define CONV_SIZE32TO16(s32,s16) \
574 ((s16)->cx = (INT16)(s32)->cx, (s16)->cy = (INT16)(s32)->cy)
576 /* The POINT structure */
577 typedef struct tagPOINT
579 LONG x;
580 LONG y;
581 } POINT, *PPOINT, *LPPOINT;
583 typedef struct POINTL
585 LONG x;
586 LONG y;
587 } POINTL;
589 #define CONV_POINT16TO32(p16,p32) \
590 ((p32)->x = (INT)(p16)->x, (p32)->y = (INT)(p16)->y)
591 #define CONV_POINT32TO16(p32,p16) \
592 ((p16)->x = (INT16)(p32)->x, (p16)->y = (INT16)(p32)->y)
594 #define MAKEPOINT16(l) (*((POINT16 *)&(l)))
596 /* The POINTS structure */
598 typedef struct tagPOINTS
600 SHORT x;
601 SHORT y;
602 } POINTS, *PPOINTS, *LPPOINTS;
605 #define MAKEPOINTS(l) (*((POINTS *)&(l)))
608 /* The RECT structure */
609 typedef struct tagRECT
611 short left;
612 short top;
613 short right;
614 short bottom;
615 } RECT, *PRECT, *LPRECT;
616 typedef const RECT *LPCRECT;
619 typedef struct tagRECTL
621 LONG left;
622 LONG top;
623 LONG right;
624 LONG bottom;
625 } RECTL, *PRECTL, *LPRECTL;
627 typedef const RECTL *LPCRECTL;
629 #define CONV_RECT16TO32(r16,r32) \
630 ((r32)->left = (INT)(r16)->left, (r32)->top = (INT)(r16)->top, \
631 (r32)->right = (INT)(r16)->right, (r32)->bottom = (INT)(r16)->bottom)
632 #define CONV_RECT32TO16(r32,r16) \
633 ((r16)->left = (INT16)(r32)->left, (r16)->top = (INT16)(r32)->top, \
634 (r16)->right = (INT16)(r32)->right, (r16)->bottom = (INT16)(r32)->bottom)
636 #ifdef __cplusplus
638 #endif
640 #endif /* MPLAYER_WINDEF_H */