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

Last change on this file since 8082 was 7925, checked in by sandervl, 24 years ago

header updates

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