4 #pragma GCC system_header
15 #define _WIN32_WINNT WINVER
37 #define NULL ((void*)0)
53 #define PACKED __attribute__((packed))
55 #define _stdcall __attribute__((stdcall))
58 #define __stdcall __attribute__((stdcall))
61 #define _cdecl __attribute__((cdecl))
64 #define __cdecl __attribute__((cdecl))
67 #define __declspec(e) __attribute__((e))
70 #define _declspec(e) __attribute__((e))
81 #define pascal __stdcall
82 #define _pascal __stdcall
83 #define __pascal __stdcall
84 #define PASCAL _pascal
86 #define STDCALL __stdcall
87 #define WINAPI __stdcall
88 #define WINAPIV __cdecl
89 #define APIENTRY __stdcall
90 #define CALLBACK __stdcall
91 #define APIPRIVATE __stdcall
93 #define DECLSPEC_IMPORT __declspec(dllimport)
94 #define DECLSPEC_EXPORT __declspec(dllexport)
96 #define DECLSPEC_NORETURN __declspec(noreturn)
97 #define DECLARE_STDCALL_P( type ) __stdcall type
98 #elif defined(__WATCOMC__)
99 #define DECLSPEC_NORETURN
100 #define DECLARE_STDCALL_P( type ) type __stdcall
101 #endif /* __GNUC__/__WATCOMC__ */
102 #define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
103 #define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
104 #define LOWORD(l) ((WORD)((DWORD)(l)))
105 #define HIWORD(l) ((WORD)(((DWORD)(l)>>16)&0xFFFF))
106 #define LOBYTE(w) ((BYTE)(w))
107 #define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))
118 #define max(a,b) ((a)>(b)?(a):(b))
121 #define min(a,b) ((a)<(b)?(a):(b))
125 #define UNREFERENCED_PARAMETER(P) {(P)=(P);}
126 #define UNREFERENCED_LOCAL_VARIABLE(L) {(L)=(L);}
127 #define DBG_UNREFERENCED_PARAMETER(P)
128 #define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
130 typedef unsigned long DWORD
;
131 typedef int WINBOOL
,*PWINBOOL
,*LPWINBOOL
;
132 /* FIXME: Is there a good solution to this? */
133 #ifndef XFree86Server
135 typedef WINBOOL BOOL
;
139 typedef unsigned char BYTE
;
140 #endif /* ndef XFree86Server */
141 typedef BOOL
*PBOOL
,*LPBOOL
;
142 typedef unsigned short WORD
;
144 typedef FLOAT
*PFLOAT
;
145 typedef BYTE
*PBYTE
,*LPBYTE
;
146 typedef int *PINT
,*LPINT
;
147 typedef WORD
*PWORD
,*LPWORD
;
148 typedef long *LPLONG
;
149 typedef DWORD
*PDWORD
,*LPDWORD
;
150 typedef void *PVOID
,*LPVOID
;
151 typedef CONST
void *PCVOID
,*LPCVOID
;
153 typedef unsigned int UINT
,*PUINT
,*LPUINT
;
159 typedef LONG LRESULT
;
160 #ifndef _HRESULT_DEFINED
161 typedef LONG HRESULT
;
162 #define _HRESULT_DEFINED
164 #ifndef XFree86Server
166 #endif /* XFree86Server */
167 typedef HANDLE HGLOBAL
;
168 typedef HANDLE HLOCAL
;
169 typedef HANDLE GLOBALHANDLE
;
170 typedef HANDLE LOCALHANDLE
;
171 typedef void *HGDIOBJ
;
172 DECLARE_HANDLE(HACCEL
);
173 DECLARE_HANDLE(HBITMAP
);
174 DECLARE_HANDLE(HBRUSH
);
175 DECLARE_HANDLE(HCOLORSPACE
);
177 DECLARE_HANDLE(HGLRC
);
178 DECLARE_HANDLE(HDESK
);
179 DECLARE_HANDLE(HENHMETAFILE
);
180 DECLARE_HANDLE(HFONT
);
181 DECLARE_HANDLE(HICON
);
182 DECLARE_HANDLE(HKEY
);
183 /* FIXME: How to handle these. SM_CMONITORS etc in winuser.h also. */
184 /* #if (WINVER >= 0x0500) */
185 DECLARE_HANDLE(HMONITOR
);
186 #define HMONITOR_DECLARED 1
187 DECLARE_HANDLE(HTERMINAL
);
188 DECLARE_HANDLE(HWINEVENTHOOK
);
191 DECLARE_HANDLE(HMENU
);
192 DECLARE_HANDLE(HMETAFILE
);
193 DECLARE_HANDLE(HINSTANCE
);
194 typedef HINSTANCE HMODULE
;
195 DECLARE_HANDLE(HPALETTE
);
196 DECLARE_HANDLE(HPEN
);
197 DECLARE_HANDLE(HRGN
);
198 DECLARE_HANDLE(HRSRC
);
199 DECLARE_HANDLE(HSTR
);
200 DECLARE_HANDLE(HTASK
);
201 DECLARE_HANDLE(HWND
);
202 DECLARE_HANDLE(HWINSTA
);
205 typedef HICON HCURSOR
;
206 typedef DWORD COLORREF
;
207 typedef int (WINAPI
*FARPROC
)();
208 typedef int (WINAPI
*NEARPROC
)();
209 typedef int (WINAPI
*PROC
)();
210 typedef struct tagRECT
{
215 } RECT
,*PRECT
,*LPRECT
;
216 typedef const RECT
*LPCRECT
;
217 typedef struct tagRECTL
{
222 } RECTL
,*PRECTL
,*LPRECTL
;
223 typedef const RECTL
*LPCRECTL
;
224 typedef struct tagPOINT
{
227 } POINT
,POINTL
,*PPOINT
,*LPPOINT
,*PPOINTL
,*LPPOINTL
;
228 typedef struct tagSIZE
{
231 } SIZE
,SIZEL
,*PSIZE
,*LPSIZE
,*PSIZEL
,*LPSIZEL
;
232 typedef struct tagPOINTS
{
235 } POINTS
,*PPOINTS
,*LPPOINTS
;