source: trunk/include/win/windef.h@ 6402

Last change on this file since 6402 was 6371, checked in by sandervl, 24 years ago

header updates

File size: 18.2 KB
Line 
1/*
2 * Basic types definitions
3 *
4 * Copyright 1996 Alexandre Julliard
5 */
6
7#ifndef __WINE_WINDEF_H
8#define __WINE_WINDEF_H
9
10#ifdef __WINE__
11# include "config.h"
12# undef UNICODE
13#endif /* __WINE__ */
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/* Misc. constants. */
20
21#ifdef FALSE
22#undef FALSE
23#endif
24#define FALSE 0
25
26#ifdef TRUE
27#undef TRUE
28#endif
29#define TRUE 1
30
31#ifdef NULL
32#undef NULL
33#endif
34#define NULL 0
35
36/* Macros to map Winelib names to the correct implementation name */
37/* depending on __WINE__ and UNICODE macros. */
38/* Note that Winelib is purely Win32. */
39
40#ifdef __WINE__
41#ifdef __WIN32OS2__
42# define WINELIB_NAME_AW(func) func
43#else
44# define WINELIB_NAME_AW(func) this_is_a_syntax_error this_is_a_syntax_error
45#endif
46#else /* __WINE__ */
47# ifdef UNICODE
48# define WINELIB_NAME_AW(func) func##W
49# else
50# define WINELIB_NAME_AW(func) func##A
51# endif /* UNICODE */
52#endif /* __WINE__ */
53
54#ifdef __WINE__
55# define DECL_WINELIB_TYPE_AW(type) /* nothing */
56#else /* __WINE__ */
57# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
58#endif /* __WINE__ */
59
60
61/* Calling conventions definitions */
62
63#ifndef __WIN32OS2__
64#ifdef __i386__
65# if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)
66# define __stdcall __attribute__((__stdcall__))
67# define __cdecl __attribute__((__cdecl__))
68# define __RESTORE_ES __asm__ __volatile__("pushl %ds\n\tpopl %es")
69# else
70# error You need gcc >= 2.7 to build Wine on a 386
71# endif /* __GNUC__ */
72#else /* __i386__ */
73# define __stdcall
74# define __cdecl
75# define __RESTORE_ES
76#endif /* __i386__ */
77#endif
78
79
80#include <odin.h>
81
82/* define needed macros as required */
83#ifndef CALLBACK
84 #define CALLBACK __stdcall
85#endif
86
87#ifndef WINAPI
88 #define WINAPI __stdcall
89#endif
90
91#ifndef APIPRIVATE
92 #define APIPRIVATE __stdcall
93#endif
94
95#ifndef PASCAL
96 #define PASCAL __stdcall
97#endif
98
99#ifndef pascal
100 #define pascal __stdcall
101#endif
102
103#ifndef _pascal
104 #define _pascal __stdcall
105#endif
106
107#ifndef _stdcall
108 #define _stdcall __stdcall
109#endif
110
111#ifndef _fastcall
112 #define _fastcall __stdcall
113#endif
114
115#ifndef __export
116 #define __export
117#endif
118
119#ifndef CDECL
120 #define CDECL __cdecl
121#endif
122
123#ifndef _CDECL
124 #define _CDECL __cdecl
125#endif
126
127#ifndef cdecl
128 #define cdecl __cdecl
129#endif
130
131#ifndef _cdecl
132 #define _cdecl __cdecl
133#endif
134
135#ifndef WINAPIV
136 #define WINAPIV __cdecl
137#endif
138
139#ifndef APIENTRY
140 #define APIENTRY WINAPI
141#endif
142
143#ifndef WIN32API
144 #define WIN32API WINAPI
145#endif
146
147
148#if (__IBMC__ < 400) && (__IBMCPP__ < 360)
149#ifndef __declspec
150 #define __declspec(x)
151#endif
152
153#ifndef dllimport
154 #define dllimport
155#endif
156
157#ifndef dllexport
158 #define dllexport
159#endif
160#endif // (__IBMC__ < 400) && (__IBMCPP__ < 360)
161
162#ifndef CONST
163 #define CONST const
164#endif
165
166/* Anonymous union/struct handling */
167
168#ifndef NONAMELESSSTRUCT
169#define DUMMYSTRUCTNAME
170#define DUMMYSTRUCTNAME1
171#define DUMMYSTRUCTNAME2
172#define DUMMYSTRUCTNAME3
173#define DUMMYSTRUCTNAME4
174#define DUMMYSTRUCTNAME5
175#else /* !defined(NONAMELESSSTRUCT) */
176#define DUMMYSTRUCTNAME s
177#define DUMMYSTRUCTNAME1 s1
178#define DUMMYSTRUCTNAME2 s2
179#define DUMMYSTRUCTNAME3 s3
180#define DUMMYSTRUCTNAME4 s4
181#define DUMMYSTRUCTNAME5 s5
182#endif /* !defined(NONAMELESSSTRUCT) */
183
184#ifndef NONAMELESSUNION
185#define DUMMYUNIONNAME
186#define DUMMYUNIONNAME1
187#define DUMMYUNIONNAME2
188#define DUMMYUNIONNAME3
189#define DUMMYUNIONNAME4
190#define DUMMYUNIONNAME5
191#define DUMMYUNIONNAME6
192#define DUMMYUNIONNAME7
193#define DUMMYUNIONNAME8
194#else /* !defined(NONAMELESSUNION) */
195#define DUMMYUNIONNAME u
196#define DUMMYUNIONNAME1 u1
197#define DUMMYUNIONNAME2 u2
198#define DUMMYUNIONNAME3 u3
199#define DUMMYUNIONNAME4 u4
200#define DUMMYUNIONNAME5 u5
201#define DUMMYUNIONNAME6 u6
202#define DUMMYUNIONNAME7 u7
203#define DUMMYUNIONNAME8 u8
204#endif /* !defined(NONAMELESSUNION) */
205
206
207/* Standard data types. These are the same for emulator and library. */
208
209typedef void VOID;
210typedef short INT16;
211typedef unsigned short UINT16;
212typedef int INT;
213typedef unsigned int UINT;
214typedef unsigned short WORD;
215typedef unsigned long DWORD;
216typedef unsigned long ULONG;
217typedef unsigned char BYTE;
218typedef long LONG;
219typedef short SHORT;
220typedef unsigned short USHORT;
221typedef char CHAR;
222typedef unsigned char UCHAR;
223/* Some systems might have wchar_t, but we really need 16 bit characters */
224typedef unsigned short WCHAR;
225typedef unsigned short BOOL16;
226typedef unsigned long BOOL;
227typedef double DATE;
228typedef long LONG_PTR;
229typedef unsigned long ULONG_PTR;
230typedef double DOUBLE;
231#if (__IBMC__ < 360) && (__IBMCPP__ < 360)
232typedef double LONGLONG;
233typedef double ULONGLONG;
234typedef double ULONGULONG;
235#else
236#include <inttypes.h>
237typedef int64_t LONGLONG;
238typedef uint64_t ULONGLONG;
239typedef uint64_t ULONGULONG;
240#endif
241
242/* FIXME: Wine does not compile with strict on, therefore strict
243 * handles are presently only usable on machines where sizeof(UINT) ==
244 * sizeof(void*). HANDLEs are supposed to be void* but a large amount
245 * of WINE code operates on HANDLES as if they are UINTs. So to WINE
246 * they exist as UINTs but to the Winelib user who turns on strict,
247 * they exist as void*. If there is a size difference between UINT and
248 * void* then things get ugly. */
249#ifdef STRICT
250typedef UINT16 HANDLE16;
251typedef VOID* HANDLE;
252#else
253typedef UINT16 HANDLE16;
254typedef ULONG HANDLE;
255#endif
256
257typedef HANDLE16 *LPHANDLE16;
258typedef HANDLE *LPHANDLE;
259
260/* Integer types. These are the same for emulator and library. */
261typedef UINT16 WPARAM16;
262typedef UINT WPARAM;
263typedef LONG LPARAM;
264typedef LONG HRESULT;
265typedef LONG LRESULT;
266typedef WORD ATOM;
267typedef WORD CATCHBUF[9];
268typedef WORD *LPCATCHBUF;
269typedef DWORD REGSAM;
270typedef HANDLE HHOOK;
271typedef HANDLE HKEY;
272typedef HANDLE HMONITOR;
273typedef DWORD LCID;
274typedef WORD LANGID;
275typedef DWORD LCTYPE;
276typedef float FLOAT;
277#ifdef __WIN32OS2__
278#if (__IBMC__ < 400) && (__IBMCPP__ < 360) && !defined(__WATCOMC__)
279typedef double __int64;
280#endif
281#else
282typedef long long __int64;
283#endif
284
285/* Pointers types. These are the same for emulator and library. */
286/* winnt types */
287typedef VOID *PVOID;
288typedef const void *PCVOID;
289typedef CHAR *PCHAR;
290typedef UCHAR *PUCHAR;
291typedef BYTE *PBYTE;
292typedef ULONG *PULONG;
293typedef LONG *PLONG;
294typedef DWORD *PDWORD;
295/* common win32 types */
296#ifdef __WINE__
297typedef CHAR *LPTSTR;
298typedef const CHAR *LPCTSTR;
299#endif
300typedef CHAR *LPSTR;
301typedef CHAR *PSTR;
302typedef const CHAR *LPCSTR;
303typedef const CHAR *PCSTR;
304typedef WCHAR *LPWSTR;
305typedef WCHAR *PWSTR;
306typedef const WCHAR *LPCWSTR;
307typedef const WCHAR *PCWSTR;
308typedef BYTE *LPBYTE;
309typedef WORD *LPWORD;
310typedef DWORD *LPDWORD;
311typedef LONG *LPLONG;
312typedef VOID *LPVOID;
313typedef const VOID *LPCVOID;
314typedef INT16 *LPINT16;
315typedef UINT16 *LPUINT16;
316typedef INT *PINT;
317typedef INT *LPINT;
318typedef UINT *PUINT;
319typedef UINT *LPUINT;
320typedef HKEY *LPHKEY;
321typedef HKEY *PHKEY;
322typedef FLOAT *PFLOAT;
323typedef FLOAT *LPFLOAT;
324typedef BOOL *PBOOL;
325typedef BOOL *LPBOOL;
326
327/* Special case: a segmented pointer is just a pointer in the user's code. */
328
329#ifdef __WINE__
330typedef DWORD SEGPTR;
331#else
332typedef void* SEGPTR;
333#endif /* __WINE__ */
334
335/* Handle types that exist both in Win16 and Win32. */
336
337#ifdef STRICT
338#define DECLARE_HANDLE(a) \
339 typedef HANDLE16 a##16; \
340 typedef a##16 *P##a##16; \
341 typedef a##16 *NP##a##16; \
342 typedef a##16 *LP##a##16; \
343 typedef struct a##__ { int unused; } *a; \
344 typedef a *P##a; \
345 typedef a *LP##a
346#else /*STRICT*/
347#define DECLARE_HANDLE(a) \
348 typedef HANDLE16 a##16; \
349 typedef a##16 *P##a##16; \
350 typedef a##16 *NP##a##16; \
351 typedef a##16 *LP##a##16; \
352 typedef HANDLE a; \
353 typedef a *P##a; \
354 typedef a *LP##a
355#endif /*STRICT*/
356
357DECLARE_HANDLE(HACMDRIVERID);
358DECLARE_HANDLE(HACMDRIVER);
359DECLARE_HANDLE(HACMOBJ);
360DECLARE_HANDLE(HACMSTREAM);
361DECLARE_HANDLE(HMETAFILEPICT);
362
363DECLARE_HANDLE(HACCEL);
364DECLARE_HANDLE(HBITMAP);
365DECLARE_HANDLE(HBRUSH);
366DECLARE_HANDLE(HCOLORSPACE);
367DECLARE_HANDLE(HCURSOR);
368DECLARE_HANDLE(HDC);
369DECLARE_HANDLE(HGLRC); // OpenGL
370DECLARE_HANDLE(HDROP);
371DECLARE_HANDLE(HDRVR);
372DECLARE_HANDLE(HDWP);
373DECLARE_HANDLE(HENHMETAFILE);
374DECLARE_HANDLE(HFILE);
375DECLARE_HANDLE(HFONT);
376DECLARE_HANDLE(HICON);
377DECLARE_HANDLE(HINSTANCE);
378DECLARE_HANDLE(HMENU);
379DECLARE_HANDLE(HMETAFILE);
380DECLARE_HANDLE(HMIDI);
381DECLARE_HANDLE(HMIDIIN);
382DECLARE_HANDLE(HMIDIOUT);
383DECLARE_HANDLE(HMIDISTRM);
384DECLARE_HANDLE(HMIXER);
385DECLARE_HANDLE(HMIXEROBJ);
386DECLARE_HANDLE(HMMIO);
387DECLARE_HANDLE(HPALETTE);
388DECLARE_HANDLE(HPEN);
389DECLARE_HANDLE(HQUEUE);
390DECLARE_HANDLE(HRGN);
391DECLARE_HANDLE(HRSRC);
392DECLARE_HANDLE(HTASK);
393DECLARE_HANDLE(HWAVE);
394DECLARE_HANDLE(HWAVEIN);
395DECLARE_HANDLE(HWAVEOUT);
396DECLARE_HANDLE(HWINSTA);
397DECLARE_HANDLE(HDESK);
398DECLARE_HANDLE(HWND);
399DECLARE_HANDLE(HKL);
400DECLARE_HANDLE(HIC);
401DECLARE_HANDLE(HRASCONN);
402DECLARE_HANDLE(HPRINTER);
403#undef DECLARE_HANDLE
404
405/* Handle types that must remain interchangeable even with strict on */
406
407typedef HINSTANCE16 HMODULE16;
408typedef HINSTANCE HMODULE;
409typedef HANDLE16 HGDIOBJ16;
410typedef HANDLE16 HGLOBAL16;
411typedef HANDLE16 HLOCAL16;
412typedef HANDLE HGDIOBJ;
413typedef HANDLE HGLOBAL;
414typedef HANDLE HLOCAL;
415
416/* Callback function pointers types */
417
418typedef BOOL (* CALLBACK DATEFMT_ENUMPROCA)(LPSTR);
419typedef BOOL (* CALLBACK DATEFMT_ENUMPROCW)(LPWSTR);
420DECL_WINELIB_TYPE_AW(DATEFMT_ENUMPROC)
421typedef BOOL16 (* CALLBACK DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
422typedef BOOL (* CALLBACK DLGPROC)(HWND,UINT,WPARAM,LPARAM);
423typedef LRESULT (* CALLBACK DRIVERPROC16)(DWORD,HDRVR16,UINT16,LPARAM,LPARAM);
424typedef LRESULT (* CALLBACK DRIVERPROC)(DWORD,HDRVR,UINT,LPARAM,LPARAM);
425typedef INT16 (* CALLBACK EDITWORDBREAKPROC16)(LPSTR,INT16,INT16,INT16);
426typedef INT (* CALLBACK EDITWORDBREAKPROCA)(LPSTR,INT,INT,INT);
427typedef INT (* CALLBACK EDITWORDBREAKPROCW)(LPWSTR,INT,INT,INT);
428DECL_WINELIB_TYPE_AW(EDITWORDBREAKPROC)
429typedef LRESULT (* CALLBACK FARPROC16)();
430typedef LRESULT (* CALLBACK FARPROC)();
431typedef INT16 (* CALLBACK PROC16)();
432typedef INT (* CALLBACK PROC)();
433typedef INT16 (* CALLBACK GOBJENUMPROC16)(SEGPTR,LPARAM);
434typedef INT (* CALLBACK GOBJENUMPROC)(LPVOID,LPARAM);
435typedef BOOL16 (* CALLBACK GRAYSTRINGPROC16)(HDC16,LPARAM,INT16);
436typedef BOOL (* CALLBACK GRAYSTRINGPROC)(HDC,LPARAM,INT);
437typedef LRESULT (* CALLBACK HOOKPROC16)(INT16,WPARAM16,LPARAM);
438typedef LRESULT (* CALLBACK HOOKPROC)(INT,WPARAM,LPARAM);
439typedef VOID (* CALLBACK LINEDDAPROC16)(INT16,INT16,LPARAM);
440typedef VOID (* CALLBACK LINEDDAPROC)(INT,INT,LPARAM);
441typedef BOOL16 (* CALLBACK PROPENUMPROC16)(HWND16,SEGPTR,HANDLE16);
442typedef BOOL (* CALLBACK PROPENUMPROCA)(HWND,LPCSTR,HANDLE);
443typedef BOOL (* CALLBACK PROPENUMPROCW)(HWND,LPCWSTR,HANDLE);
444DECL_WINELIB_TYPE_AW(PROPENUMPROC)
445typedef BOOL (* CALLBACK PROPENUMPROCEXA)(HWND,LPCSTR,HANDLE,LPARAM);
446typedef BOOL (* CALLBACK PROPENUMPROCEXW)(HWND,LPCWSTR,HANDLE,LPARAM);
447DECL_WINELIB_TYPE_AW(PROPENUMPROCEX)
448typedef BOOL (* CALLBACK TIMEFMT_ENUMPROCA)(LPSTR);
449typedef BOOL (* CALLBACK TIMEFMT_ENUMPROCW)(LPWSTR);
450DECL_WINELIB_TYPE_AW(TIMEFMT_ENUMPROC)
451typedef VOID (* CALLBACK TIMERPROC16)(HWND16,UINT16,UINT16,DWORD);
452typedef VOID (* CALLBACK TIMERPROC)(HWND,UINT,UINT,DWORD);
453typedef LRESULT (* CALLBACK WNDENUMPROC16)(HWND16,LPARAM);
454//typedef LRESULT (* CALLBACK WNDENUMPROC)(HWND,LPARAM);
455typedef BOOL (* CALLBACK WNDENUMPROC)(HWND,LPARAM);
456typedef LRESULT (* CALLBACK WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
457typedef LRESULT (* CALLBACK WNDPROC)(HWND,UINT,WPARAM,LPARAM);
458
459/* TCHAR data types definitions for Winelib. */
460/* These types are _not_ defined for the emulator, because they */
461/* depend on the UNICODE macro that only exists in user's code. */
462
463#ifndef __WINE__
464# ifdef UNICODE
465typedef WCHAR TCHAR;
466typedef LPWSTR LPTSTR;
467typedef LPCWSTR LPCTSTR;
468#define __TEXT(string) L##string /*probably wrong */
469# else /* UNICODE */
470typedef CHAR TCHAR;
471typedef LPSTR LPTSTR;
472typedef LPCSTR LPCTSTR;
473#define __TEXT(string) string
474# endif /* UNICODE */
475#endif /* __WINE__ */
476#define TEXT(quote) __TEXT(quote)
477
478/* Data types specific to the library. These do _not_ exist in the emulator. */
479
480
481
482/* Define some empty macros for compatibility with Windows code. */
483
484#ifndef __WINE__
485#define NEAR
486#define FAR
487#define near
488#define far
489#define _near
490#define _far
491#define IN
492#define OUT
493#define OPTIONAL
494#endif /* __WINE__ */
495
496/* Macro for structure packing. */
497
498#ifdef __GNUC__
499#define WINE_PACKED __attribute__ ((packed))
500#define WINE_UNUSED __attribute__ ((unused))
501#else
502#define WINE_PACKED /* nothing */
503#define WINE_UNUSED /* nothing */
504#endif
505
506/* Macros to split words and longs. */
507
508#define LOBYTE(w) ((BYTE)(WORD)(w))
509#define HIBYTE(w) ((BYTE)((WORD)(w) >> 8))
510
511#define LOWORD(l) ((WORD)(DWORD)(l))
512#define HIWORD(l) ((WORD)((DWORD)(l) >> 16))
513
514#define SLOWORD(l) ((INT16)(LONG)(l))
515#define SHIWORD(l) ((INT16)((LONG)(l) >> 16))
516
517#define MAKEWORD(low,high) ((WORD)(((BYTE)(low)) | ((WORD)((BYTE)(high))) << 8))
518#define MAKELONG(low,high) ((LONG)(((WORD)(low)) | (((DWORD)((WORD)(high))) << 16)))
519#define MAKELPARAM(low,high) ((LPARAM)MAKELONG(low,high))
520#define MAKEWPARAM(low,high) ((WPARAM)MAKELONG(low,high))
521#define MAKELRESULT(low,high) ((LRESULT)MAKELONG(low,high))
522#define MAKEINTATOM(atom) ((LPCSTR)MAKELONG((atom),0))
523
524#define SELECTOROF(ptr) (HIWORD(ptr))
525#define OFFSETOF(ptr) (LOWORD(ptr))
526
527/* Macros to access unaligned or wrong-endian WORDs and DWORDs. */
528/* Note: These macros are semantically broken, at least for wrc. wrc
529 spits out data in the platform's current binary format, *not* in
530 little-endian format. These macros are used throughout the resource
531 code to load and store data to the resources. Since it is unlikely
532 that we'll ever be dealing with little-endian resource data, the
533 byte-swapping nature of these macros has been disabled. Rather than
534 remove the use of these macros from the resource loading code, the
535 macros have simply been disabled. In the future, someone may want
536 to reactivate these macros for other purposes. In that case, the
537 resource code will have to be modified to use different macros. */
538
539#if 1
540#define PUT_WORD(ptr,w) (*(WORD *)(ptr) = (w))
541#define GET_WORD(ptr) (*(WORD *)(ptr))
542#define PUT_DWORD(ptr,dw) (*(DWORD *)(ptr) = (dw))
543#define GET_DWORD(ptr) (*(DWORD *)(ptr))
544#else
545#define PUT_WORD(ptr,w) (*(BYTE *)(ptr) = LOBYTE(w), \
546 *((BYTE *)(ptr) + 1) = HIBYTE(w))
547#define GET_WORD(ptr) ((WORD)(*(BYTE *)(ptr) | \
548 (WORD)(*((BYTE *)(ptr)+1) << 8)))
549#define PUT_DWORD(ptr,dw) (PUT_WORD((ptr),LOWORD(dw)), \
550 PUT_WORD((WORD *)(ptr)+1,HIWORD(dw)))
551#define GET_DWORD(ptr) ((DWORD)(GET_WORD(ptr) | \
552 ((DWORD)GET_WORD((WORD *)(ptr)+1) << 16)))
553#endif /* 1 */
554
555/* MIN and MAX macros */
556
557#ifdef MAX
558#undef MAX
559#endif
560#define MAX(a,b) (((a) > (b)) ? (a) : (b))
561
562#ifdef MIN
563#undef MIN
564#endif
565#define MIN(a,b) (((a) < (b)) ? (a) : (b))
566
567#define __max(a,b) MAX(a,b)
568#define __min(a,b) MIN(a,b)
569#ifndef RC_INVOKED
570#include <stdlib.h>
571#endif
572
573#define _MAX_PATH 260
574#define MAX_PATH 260
575#define _MAX_DRIVE 3
576#define _MAX_DIR 256
577#if !defined(__WIN32OS2__) && !defined(_MAX_FNAME)
578#define _MAX_FNAME 255
579#endif
580#define _MAX_EXT 256
581
582#define HFILE_ERROR16 ((HFILE16)-1)
583#define HFILE_ERROR ((HFILE)-1)
584
585/* Winelib run-time flag */
586
587#ifdef __WINE__
588extern int __winelib;
589#endif /* __WINE__ */
590
591/* The SIZE structure */
592
593typedef struct
594{
595 INT16 cx;
596 INT16 cy;
597} SIZE16, *PSIZE16, *LPSIZE16;
598
599typedef struct tagSIZE
600{
601 INT cx;
602 INT cy;
603} SIZE, *PSIZE, *LPSIZE;
604
605
606typedef SIZE SIZEL, *PSIZEL, *LPSIZEL;
607
608#define CONV_SIZE16TO32(s16,s32) \
609 ((s32)->cx = (INT)(s16)->cx, (s32)->cy = (INT)(s16)->cy)
610#define CONV_SIZE32TO16(s32,s16) \
611 ((s16)->cx = (INT16)(s32)->cx, (s16)->cy = (INT16)(s32)->cy)
612
613/* The POINT structure */
614
615typedef struct
616{
617 INT16 x;
618 INT16 y;
619} POINT16, *PPOINT16, *LPPOINT16;
620
621typedef struct tagPOINT
622{
623 LONG x;
624 LONG y;
625} POINT, *PPOINT, *LPPOINT;
626
627typedef struct _POINTL
628{
629 LONG x;
630 LONG y;
631} POINTL;
632
633#define CONV_POINT16TO32(p16,p32) \
634 ((p32)->x = (INT)(p16)->x, (p32)->y = (INT)(p16)->y)
635#define CONV_POINT32TO16(p32,p16) \
636 ((p16)->x = (INT16)(p32)->x, (p16)->y = (INT16)(p32)->y)
637
638#define MAKEPOINT(l) (*((POINT *)&(l)))
639
640#define MAKEPOINT16(l) (*((POINT16 *)&(l)))
641
642/* The POINTS structure */
643
644typedef struct tagPOINTS
645{
646 SHORT x;
647 SHORT y;
648} POINTS, *PPOINTS, *LPPOINTS;
649
650
651#define MAKEPOINTS(l) (*((POINTS *)&(l)))
652
653
654/* The RECT structure */
655
656typedef struct
657{
658 INT16 left;
659 INT16 top;
660 INT16 right;
661 INT16 bottom;
662} RECT16, *LPRECT16;
663
664typedef struct tagRECT
665{
666 INT left;
667 INT top;
668 INT right;
669 INT bottom;
670} RECT, *PRECT, *LPRECT;
671typedef const RECT *LPCRECT;
672
673
674typedef struct tagRECTL
675{
676 LONG left;
677 LONG top;
678 LONG right;
679 LONG bottom;
680} RECTL, *PRECTL, *LPRECTL;
681
682typedef const RECTL *LPCRECTL;
683
684#define CONV_RECT16TO32(r16,r32) \
685 ((r32)->left = (INT)(r16)->left, (r32)->top = (INT)(r16)->top, \
686 (r32)->right = (INT)(r16)->right, (r32)->bottom = (INT)(r16)->bottom)
687#define CONV_RECT32TO16(r32,r16) \
688 ((r16)->left = (INT16)(r32)->left, (r16)->top = (INT16)(r32)->top, \
689 (r16)->right = (INT16)(r32)->right, (r16)->bottom = (INT16)(r32)->bottom)
690
691/*
692 * 8.9.99 DJR DECIMAL support
693 */
694typedef struct tagDEC
695{
696 USHORT wReserved;
697 union
698 {
699 struct
700 {
701 BYTE scale;
702 BYTE sign;
703 } a;
704 USHORT signscale;
705 } b;
706 ULONG Hi32;
707 union
708 {
709 struct
710 {
711 ULONG Lo32;
712 ULONG Mid32;
713 } c;
714 ULONGLONG Lo64;
715 } d;
716} DECIMAL;
717
718#ifdef __cplusplus
719}
720#endif
721
722#endif /* __WINE_WINDEF_H */
Note: See TracBrowser for help on using the repository browser.