4 #if !defined(__ROS_LONG64__)
6 //#define __ROS_LONG64__
17 * If you need Win32 API features newer the Win95 and WinNT then you must
18 * define WINVER before including windows.h or any other method of including
19 * the windef.h header.
23 #define _WIN32_WINNT WINVER
25 * There may be the need to define _WIN32_WINNT to a value different from
26 * the value of WINVER. I don't have any example of why you would do that.
27 * However, if you must then define _WIN32_WINNT to the value required before
28 * including windows.h or any other method of including the windef.h header.
51 #define NULL ((void*)0)
66 /* needed by header files generated by WIDL */
68 #define WINE_NO_UNICODE_MACROS
71 #ifdef WINE_NO_UNICODE_MACROS
72 # define WINELIB_NAME_AW(func) \
73 func##_must_be_suffixed_with_W_or_A_in_this_context \
74 func##_must_be_suffixed_with_W_or_A_in_this_context
75 #else /* WINE_NO_UNICODE_MACROS */
77 # define WINELIB_NAME_AW(func) func##W
79 # define WINELIB_NAME_AW(func) func##A
81 #endif /* WINE_NO_UNICODE_MACROS */
83 #ifdef WINE_NO_UNICODE_MACROS
84 # define DECL_WINELIB_TYPE_AW(type) /* nothing */
86 # define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
90 #define PACKED __attribute__((packed))
92 #define _fastcall __attribute__((fastcall))
95 #define __fastcall __attribute__((fastcall))
98 #define _stdcall __attribute__((stdcall))
101 #define __stdcall __attribute__((stdcall))
104 #define _cdecl __attribute__((cdecl))
107 #define __cdecl __attribute__((cdecl))
110 #define __declspec(e) __attribute__((e))
113 #define _declspec(e) __attribute__((e))
115 #elif defined(__WATCOMC__)
126 #define pascal __stdcall
127 #define _pascal __stdcall
128 #define __pascal __stdcall
132 #if !defined(__x86_64__) //defined(_STDCALL_SUPPORTED)
133 #define CALLBACK __stdcall
134 #define WINAPI __stdcall
135 #define WINAPIV __cdecl
136 #define APIENTRY WINAPI
137 #define APIPRIVATE __stdcall
138 #define PASCAL __stdcall
143 #define APIENTRY WINAPI
145 #define PASCAL pascal
148 #define DECLSPEC_IMPORT __declspec(dllimport)
149 #define DECLSPEC_EXPORT __declspec(dllexport)
150 #ifndef DECLSPEC_NOINLINE
151 #if (_MSC_VER >= 1300)
152 #define DECLSPEC_NOINLINE __declspec(noinline)
153 #elif defined(__GNUC__)
154 #define DECLSPEC_NOINLINE __attribute__((noinline))
156 #define DECLSPEC_NOINLINE
160 #define DECLSPEC_NORETURN __declspec(noreturn)
161 #define DECLARE_STDCALL_P( type ) __stdcall type
162 #elif defined(__WATCOMC__)
163 #define DECLSPEC_NORETURN
164 #define DECLARE_STDCALL_P( type ) type __stdcall
165 #elif defined(_MSC_VER)
166 #define DECLSPEC_NORETURN __declspec(noreturn)
167 #define DECLARE_STDCALL_P( type ) type __stdcall
168 #endif /* __GNUC__/__WATCOMC__ */
169 #define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
170 #define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
171 #define LOWORD(l) ((WORD)((DWORD_PTR)(l)))
172 #define HIWORD(l) ((WORD)(((DWORD_PTR)(l)>>16)&0xFFFF))
173 #define LOBYTE(w) ((BYTE)(w))
174 #define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))
187 #define max(a,b) ((a)>(b)?(a):(b))
191 #define min(a,b) ((a)<(b)?(a):(b))
195 #define UNREFERENCED_PARAMETER(P) {(P)=(P);}
196 #define UNREFERENCED_LOCAL_VARIABLE(L) {(L)=(L);}
197 #define DBG_UNREFERENCED_PARAMETER(P)
198 #define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
201 #ifndef NONAMELESSUNION
202 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
203 #define _ANONYMOUS_UNION __extension__
204 #define _ANONYMOUS_STRUCT __extension__
206 #if defined(__cplusplus)
207 #define _ANONYMOUS_UNION __extension__
208 #endif /* __cplusplus */
209 #endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
210 #endif /* NONAMELESSUNION */
211 #elif defined(__WATCOMC__) || defined(_MSC_VER)
212 #define _ANONYMOUS_UNION
213 #define _ANONYMOUS_STRUCT
214 #endif /* __GNUC__/__WATCOMC__ */
216 #ifndef _ANONYMOUS_UNION
217 #define _ANONYMOUS_UNION
218 #define _UNION_NAME(x) x
219 #define DUMMYUNIONNAME u
220 #define DUMMYUNIONNAME1 u1
221 #define DUMMYUNIONNAME2 u2
222 #define DUMMYUNIONNAME3 u3
223 #define DUMMYUNIONNAME4 u4
224 #define DUMMYUNIONNAME5 u5
225 #define DUMMYUNIONNAME6 u6
226 #define DUMMYUNIONNAME7 u7
227 #define DUMMYUNIONNAME8 u8
229 #define _UNION_NAME(x)
230 #define DUMMYUNIONNAME
231 #define DUMMYUNIONNAME1
232 #define DUMMYUNIONNAME2
233 #define DUMMYUNIONNAME3
234 #define DUMMYUNIONNAME4
235 #define DUMMYUNIONNAME5
236 #define DUMMYUNIONNAME6
237 #define DUMMYUNIONNAME7
238 #define DUMMYUNIONNAME8
240 #ifndef _ANONYMOUS_STRUCT
241 #define _ANONYMOUS_STRUCT
242 #define _STRUCT_NAME(x) x
243 #define DUMMYSTRUCTNAME s
244 #define DUMMYSTRUCTNAME1 s1
245 #define DUMMYSTRUCTNAME2 s2
246 #define DUMMYSTRUCTNAME3 s3
247 #define DUMMYSTRUCTNAME4 s4
248 #define DUMMYSTRUCTNAME5 s5
250 #define _STRUCT_NAME(x)
251 #define DUMMYSTRUCTNAME
252 #define DUMMYSTRUCTNAME1
253 #define DUMMYSTRUCTNAME2
254 #define DUMMYSTRUCTNAME3
255 #define DUMMYSTRUCTNAME4
256 #define DUMMYSTRUCTNAME5
265 #ifndef DWORD_DEFINED
266 #define DWORD_DEFINED
267 #ifndef __ROS_LONG64__
268 typedef unsigned long DWORD
;
270 typedef unsigned int DWORD
;
272 #endif//DWORD_DEFINED
274 typedef int WINBOOL
,*PWINBOOL
,*LPWINBOOL
;
275 /* FIXME: Is there a good solution to this? */
276 #ifndef XFree86Server
278 typedef WINBOOL BOOL
;
282 typedef unsigned char BYTE
;
283 #endif /* ndef XFree86Server */
284 typedef BOOL
*PBOOL
,*LPBOOL
;
285 typedef unsigned short WORD
;
287 typedef FLOAT
*PFLOAT
;
288 typedef BYTE
*PBYTE
,*LPBYTE
;
289 typedef int *PINT
,*LPINT
;
290 typedef WORD
*PWORD
,*LPWORD
;
291 #ifndef __ROS_LONG64__
292 typedef long *LPLONG
;
296 typedef DWORD
*PDWORD
,*LPDWORD
;
297 typedef CONST
void *PCVOID
,*LPCVOID
;
299 typedef unsigned int UINT
,*PUINT
,*LPUINT
;
301 typedef void *LPVOID
;
304 # if defined(__x86_64__) && defined (__GNUC__)
305 # define __ms_va_list __builtin_ms_va_list
306 # define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
307 # define __ms_va_end(list) __builtin_ms_va_end(list)
309 # define __ms_va_list va_list
310 # define __ms_va_start(list,arg) va_start(list,arg)
311 # define __ms_va_end(list) va_end(list)
316 // Check if ntdef.h already defined these for us
320 #ifndef __ROS_LONG64__
321 typedef unsigned long ULONG
, *PULONG
;
323 typedef unsigned int ULONG
, *PULONG
;
325 typedef unsigned short USHORT
, *PUSHORT
;
326 typedef unsigned char UCHAR
, *PUCHAR
;
329 #endif /* BASETYPES */
335 typedef HANDLE
*LPHANDLE
;
336 typedef UINT_PTR WPARAM
;
337 typedef LONG_PTR LPARAM
;
338 typedef LONG_PTR LRESULT
;
339 #ifndef _HRESULT_DEFINED
340 typedef LONG HRESULT
;
341 #define _HRESULT_DEFINED
343 #ifndef XFree86Server
345 #endif /* XFree86Server */
346 typedef HANDLE HGLOBAL
;
347 typedef HANDLE HLOCAL
;
348 typedef HANDLE GLOBALHANDLE
;
349 typedef HANDLE LOCALHANDLE
;
350 typedef void *HGDIOBJ
;
351 DECLARE_HANDLE(HACCEL
);
352 DECLARE_HANDLE(HBITMAP
);
353 DECLARE_HANDLE(HBRUSH
);
354 DECLARE_HANDLE(HCOLORSPACE
);
356 DECLARE_HANDLE(HGLRC
);
357 DECLARE_HANDLE(HDESK
);
358 DECLARE_HANDLE(HENHMETAFILE
);
359 DECLARE_HANDLE(HFONT
);
360 DECLARE_HANDLE(HICON
);
361 DECLARE_HANDLE(HKEY
);
362 /* FIXME: How to handle these. SM_CMONITORS etc in winuser.h also. */
363 /* #if (WINVER >= 0x0500) */
364 DECLARE_HANDLE(HMONITOR
);
365 DECLARE_HANDLE(HUMPD
);
366 #define HMONITOR_DECLARED 1
367 DECLARE_HANDLE(HTERMINAL
);
368 DECLARE_HANDLE(HWINEVENTHOOK
);
371 DECLARE_HANDLE(HMENU
);
372 DECLARE_HANDLE(HMETAFILE
);
373 DECLARE_HANDLE(HINSTANCE
);
374 typedef HINSTANCE HMODULE
;
375 DECLARE_HANDLE(HPALETTE
);
376 DECLARE_HANDLE(HPEN
);
377 DECLARE_HANDLE(HRGN
);
378 DECLARE_HANDLE(HRSRC
);
379 DECLARE_HANDLE(HSTR
);
380 DECLARE_HANDLE(HTASK
);
381 DECLARE_HANDLE(HWND
);
382 DECLARE_HANDLE(HWINSTA
);
385 typedef HICON HCURSOR
;
386 typedef DWORD COLORREF
;
388 typedef INT_PTR (FAR WINAPI
*FARPROC
)();
389 typedef INT_PTR (NEAR WINAPI
*NEARPROC
)();
390 typedef INT_PTR (WINAPI
*PROC
)();
392 typedef int (FAR WINAPI
*FARPROC
)();
393 typedef int (NEAR WINAPI
*NEARPROC
)();
394 typedef int (WINAPI
*PROC
)();
396 typedef struct tagRECT
{
401 } RECT
,*PRECT
,*LPRECT
;
402 typedef const RECT
*LPCRECT
;
403 typedef struct tagRECTL
{
408 } RECTL
,*PRECTL
,*LPRECTL
;
409 typedef const RECTL
*LPCRECTL
;
410 typedef struct tagPOINT
{
413 } POINT
,POINTL
,*PPOINT
,*LPPOINT
,*PPOINTL
,*LPPOINTL
;
414 typedef struct tagSIZE
{
417 } SIZE
,SIZEL
,*PSIZE
,*LPSIZE
,*PSIZEL
,*LPSIZEL
;
418 typedef struct tagPOINTS
{
421 } POINTS
,*PPOINTS
,*LPPOINTS
;