5 #if !defined(__ROS_LONG64__)
18 #pragma warning(disable:4255)
24 * If you need Win32 API features newer the Win95 and WinNT then you must
25 * define WINVER before including windows.h or any other method of including
26 * the windef.h header.
30 #define _WIN32_WINNT WINVER
32 * There may be the need to define _WIN32_WINNT to a value different from
33 * the value of WINVER. I don't have any example of why you would do that.
34 * However, if you must then define _WIN32_WINNT to the value required before
35 * including windows.h or any other method of including the windef.h header.
58 #define NULL ((void*)0)
73 /* needed by header files generated by WIDL */
75 #define WINE_NO_UNICODE_MACROS
78 #ifdef WINE_NO_UNICODE_MACROS
79 # define WINELIB_NAME_AW(func) \
80 func##_must_be_suffixed_with_W_or_A_in_this_context \
81 func##_must_be_suffixed_with_W_or_A_in_this_context
82 #else /* WINE_NO_UNICODE_MACROS */
84 # define WINELIB_NAME_AW(func) func##W
86 # define WINELIB_NAME_AW(func) func##A
88 #endif /* WINE_NO_UNICODE_MACROS */
90 #ifdef WINE_NO_UNICODE_MACROS
91 # define DECL_WINELIB_TYPE_AW(type) /* nothing */
93 # define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
97 #define PACKED __attribute__((packed))
99 #define _fastcall __attribute__((fastcall))
102 #define __fastcall __attribute__((fastcall))
105 #define _stdcall __attribute__((stdcall))
108 #define __stdcall __attribute__((stdcall))
111 #define _cdecl __attribute__((cdecl))
114 #define __cdecl __attribute__((cdecl))
117 #define __declspec(e) __attribute__((e))
120 #define _declspec(e) __attribute__((e))
122 #elif defined(__WATCOMC__)
133 #define pascal __stdcall
134 #define _pascal __stdcall
135 #define __pascal __stdcall
139 #if !defined(__x86_64__) //defined(_STDCALL_SUPPORTED)
140 #define CALLBACK __stdcall
141 #define WINAPI __stdcall
142 #define WINAPIV __cdecl
143 #define APIENTRY WINAPI
144 #define APIPRIVATE __stdcall
145 #define PASCAL __stdcall
150 #define APIENTRY WINAPI
152 #define PASCAL pascal
155 #define DECLSPEC_IMPORT __declspec(dllimport)
156 #define DECLSPEC_EXPORT __declspec(dllexport)
157 #ifndef DECLSPEC_NOINLINE
158 #if (_MSC_VER >= 1300)
159 #define DECLSPEC_NOINLINE __declspec(noinline)
160 #elif defined(__GNUC__)
161 #define DECLSPEC_NOINLINE __attribute__((noinline))
163 #define DECLSPEC_NOINLINE
167 #define DECLSPEC_NORETURN __declspec(noreturn)
168 #define DECLARE_STDCALL_P( type ) __stdcall type
169 #elif defined(__WATCOMC__)
170 #define DECLSPEC_NORETURN
171 #define DECLARE_STDCALL_P( type ) type __stdcall
172 #elif defined(_MSC_VER)
173 #define DECLSPEC_NORETURN __declspec(noreturn)
174 #define DECLARE_STDCALL_P( type ) type __stdcall
175 #endif /* __GNUC__/__WATCOMC__ */
176 #define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
177 #define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
178 #define LOWORD(l) ((WORD)((DWORD_PTR)(l)))
179 #define HIWORD(l) ((WORD)(((DWORD_PTR)(l)>>16)&0xFFFF))
180 #define LOBYTE(w) ((BYTE)(w))
181 #define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))
194 #define max(a,b) ((a)>(b)?(a):(b))
198 #define min(a,b) ((a)<(b)?(a):(b))
202 #define UNREFERENCED_PARAMETER(P) {(P)=(P);}
203 #define UNREFERENCED_LOCAL_VARIABLE(L) {(L)=(L);}
204 #define DBG_UNREFERENCED_PARAMETER(P)
205 #define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
207 #ifndef __ANONYMOUS_DEFINED
208 #define __ANONYMOUS_DEFINED
210 #ifndef NONAMELESSUNION
212 #define _ANONYMOUS_UNION __extension__
213 #define _ANONYMOUS_STRUCT __extension__
214 #elif defined(__WATCOMC__) || defined(_MSC_VER)
215 #define _ANONYMOUS_UNION
216 #define _ANONYMOUS_STRUCT
217 #endif /* __GNUC__/__WATCOMC__ */
218 #endif /* NONAMELESSUNION */
220 #ifndef _ANONYMOUS_UNION
221 #define _ANONYMOUS_UNION
222 #define _UNION_NAME(x) x
223 #define DUMMYUNIONNAME u
224 #define DUMMYUNIONNAME1 u1
225 #define DUMMYUNIONNAME2 u2
226 #define DUMMYUNIONNAME3 u3
227 #define DUMMYUNIONNAME4 u4
228 #define DUMMYUNIONNAME5 u5
229 #define DUMMYUNIONNAME6 u6
230 #define DUMMYUNIONNAME7 u7
231 #define DUMMYUNIONNAME8 u8
233 #define _UNION_NAME(x)
234 #define DUMMYUNIONNAME
235 #define DUMMYUNIONNAME1
236 #define DUMMYUNIONNAME2
237 #define DUMMYUNIONNAME3
238 #define DUMMYUNIONNAME4
239 #define DUMMYUNIONNAME5
240 #define DUMMYUNIONNAME6
241 #define DUMMYUNIONNAME7
242 #define DUMMYUNIONNAME8
244 #ifndef _ANONYMOUS_STRUCT
245 #define _ANONYMOUS_STRUCT
246 #define _STRUCT_NAME(x) x
247 #define DUMMYSTRUCTNAME s
248 #define DUMMYSTRUCTNAME1 s1
249 #define DUMMYSTRUCTNAME2 s2
250 #define DUMMYSTRUCTNAME3 s3
251 #define DUMMYSTRUCTNAME4 s4
252 #define DUMMYSTRUCTNAME5 s5
254 #define _STRUCT_NAME(x)
255 #define DUMMYSTRUCTNAME
256 #define DUMMYSTRUCTNAME1
257 #define DUMMYSTRUCTNAME2
258 #define DUMMYSTRUCTNAME3
259 #define DUMMYSTRUCTNAME4
260 #define DUMMYSTRUCTNAME5
263 #endif /* __ANONYMOUS_DEFINED */
271 #ifndef DWORD_DEFINED
272 #define DWORD_DEFINED
273 #ifndef __ROS_LONG64__
274 typedef unsigned long DWORD
;
276 typedef unsigned int DWORD
;
278 #endif//DWORD_DEFINED
280 typedef int WINBOOL
,*PWINBOOL
,*LPWINBOOL
;
281 /* FIXME: Is there a good solution to this? */
282 #ifndef XFree86Server
284 typedef WINBOOL BOOL
;
288 typedef unsigned char BYTE
;
289 #endif /* ndef XFree86Server */
290 typedef BOOL
*PBOOL
,*LPBOOL
;
291 typedef unsigned short WORD
;
293 typedef FLOAT
*PFLOAT
;
294 typedef BYTE
*PBYTE
,*LPBYTE
;
295 typedef int *PINT
,*LPINT
;
296 typedef WORD
*PWORD
,*LPWORD
;
297 #ifndef __ROS_LONG64__
298 typedef long *LPLONG
;
302 typedef DWORD
*PDWORD
,*LPDWORD
;
303 typedef CONST
void *PCVOID
,*LPCVOID
;
305 typedef unsigned int UINT
,*PUINT
,*LPUINT
;
307 typedef void *LPVOID
;
310 # if defined(__x86_64__) && defined (__GNUC__)
311 # define __ms_va_list __builtin_ms_va_list
312 # define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
313 # define __ms_va_end(list) __builtin_ms_va_end(list)
315 # define __ms_va_list va_list
316 # define __ms_va_start(list,arg) va_start(list,arg)
317 # define __ms_va_end(list) va_end(list)
322 // Check if ntdef.h already defined these for us
326 #ifndef __ROS_LONG64__
327 typedef unsigned long ULONG
, *PULONG
;
329 typedef unsigned int ULONG
, *PULONG
;
331 typedef unsigned short USHORT
, *PUSHORT
;
332 typedef unsigned char UCHAR
, *PUCHAR
;
335 #endif /* BASETYPES */
341 typedef HANDLE
*LPHANDLE
;
342 typedef UINT_PTR WPARAM
;
343 typedef LONG_PTR LPARAM
;
344 typedef LONG_PTR LRESULT
;
345 #ifndef _HRESULT_DEFINED
346 typedef LONG HRESULT
;
347 #define _HRESULT_DEFINED
349 #ifndef XFree86Server
351 #endif /* XFree86Server */
352 typedef HANDLE HGLOBAL
;
353 typedef HANDLE HLOCAL
;
354 typedef HANDLE GLOBALHANDLE
;
355 typedef HANDLE LOCALHANDLE
;
356 typedef void *HGDIOBJ
;
357 DECLARE_HANDLE(HACCEL
);
358 DECLARE_HANDLE(HBITMAP
);
359 DECLARE_HANDLE(HBRUSH
);
360 DECLARE_HANDLE(HCOLORSPACE
);
362 DECLARE_HANDLE(HGLRC
);
363 DECLARE_HANDLE(HDESK
);
364 DECLARE_HANDLE(HENHMETAFILE
);
365 DECLARE_HANDLE(HFONT
);
366 DECLARE_HANDLE(HICON
);
367 DECLARE_HANDLE(HKEY
);
368 /* FIXME: How to handle these. SM_CMONITORS etc in winuser.h also. */
369 /* #if (WINVER >= 0x0500) */
370 DECLARE_HANDLE(HMONITOR
);
371 DECLARE_HANDLE(HUMPD
);
372 #define HMONITOR_DECLARED 1
373 DECLARE_HANDLE(HTERMINAL
);
374 DECLARE_HANDLE(HWINEVENTHOOK
);
377 DECLARE_HANDLE(HMENU
);
378 DECLARE_HANDLE(HMETAFILE
);
379 DECLARE_HANDLE(HINSTANCE
);
380 typedef HINSTANCE HMODULE
;
381 DECLARE_HANDLE(HPALETTE
);
382 DECLARE_HANDLE(HPEN
);
383 DECLARE_HANDLE(HRGN
);
384 DECLARE_HANDLE(HRSRC
);
385 DECLARE_HANDLE(HSTR
);
386 DECLARE_HANDLE(HTASK
);
387 DECLARE_HANDLE(HWND
);
388 DECLARE_HANDLE(HWINSTA
);
391 typedef HICON HCURSOR
;
392 typedef DWORD COLORREF
;
394 typedef INT_PTR (FAR WINAPI
*FARPROC
)();
395 typedef INT_PTR (NEAR WINAPI
*NEARPROC
)();
396 typedef INT_PTR (WINAPI
*PROC
)();
398 typedef int (FAR WINAPI
*FARPROC
)();
399 typedef int (NEAR WINAPI
*NEARPROC
)();
400 typedef int (WINAPI
*PROC
)();
402 typedef struct tagRECT
{
407 } RECT
,*PRECT
,*LPRECT
;
408 typedef const RECT
*LPCRECT
;
409 typedef struct tagRECTL
{
414 } RECTL
,*PRECTL
,*LPRECTL
;
415 typedef const RECTL
*LPCRECTL
;
416 typedef struct tagPOINT
{
419 } POINT
,POINTL
,*PPOINT
,*LPPOINT
,*PPOINTL
,*LPPOINTL
;
420 typedef struct tagSIZE
{
423 } SIZE
,SIZEL
,*PSIZE
,*LPSIZE
,*PSIZEL
,*LPSIZEL
;
424 typedef struct tagPOINTS
{
427 } POINTS
,*PPOINTS
,*LPPOINTS
;