ReactOS  r76032
windef.h
Go to the documentation of this file.
1 
6 #ifndef _WINDEF_
7 #define _WINDEF_
8 #pragma once
9 
10 #define _WINDEF_H // wine ...
11 
12 #ifdef _MSC_VER
13 #pragma warning(push)
14 #pragma warning(disable:4255)
15 #endif
16 
17 #if defined(__LP64__) || (!defined(_M_AMD64) && defined(__WINESRC__))
18 #if !defined(__ROS_LONG64__)
19 #define __ROS_LONG64__
20 #endif
21 #endif
22 
23 #ifndef NO_STRICT
24 #ifndef STRICT
25 #define STRICT 1
26 #endif
27 #endif
28 
29 #ifndef WIN32
30 #define WIN32
31 #endif
32 
33 #if defined(_MAC) && !defined(_WIN32)
34 #define _WIN32
35 #endif
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 #ifndef WINVER
42 #define WINVER 0x0502
43 #endif
44 
45 #ifndef BASETYPES
46 #define BASETYPES
47 #ifndef __ROS_LONG64__
48 typedef unsigned long ULONG;
49 #else
50 typedef unsigned int ULONG;
51 #endif
52 typedef ULONG *PULONG;
53 typedef unsigned short USHORT;
54 typedef USHORT *PUSHORT;
55 typedef unsigned char UCHAR;
56 typedef UCHAR *PUCHAR;
57 typedef char *PSZ;
58 typedef int INT;
59 #endif /* BASETYPES */
60 
61 #undef MAX_PATH
62 #define MAX_PATH 260
63 
64 #ifndef NULL
65 #ifdef __cplusplus
66 #ifndef _WIN64
67 #define NULL 0
68 #else
69 #define NULL 0LL
70 #endif /* W64 */
71 #else
72 #define NULL ((void *)0)
73 #endif
74 #endif
75 
76 #ifndef FALSE
77 #define FALSE 0
78 #endif
79 
80 #ifndef TRUE
81 #define TRUE 1
82 #endif
83 
84 #ifndef _NO_W32_PSEUDO_MODIFIERS
85 #ifndef IN
86 #define IN
87 #endif
88 #ifndef OUT
89 #define OUT
90 #endif
91 #ifndef OPTIONAL
92 #define OPTIONAL
93 #endif
94 #endif
95 
96 #ifdef __GNUC__
97 #define PACKED __attribute__((packed))
98 #ifndef __declspec
99 #define __declspec(e) __attribute__((e))
100 #endif
101 #ifndef _declspec
102 #define _declspec(e) __attribute__((e))
103 #endif
104 #elif defined(__WATCOMC__)
105 #define PACKED
106 #else
107 #define PACKED
108 #endif
109 
110 #ifdef __GNUC__
111 #define DECLSPEC_NORETURN __declspec(noreturn)
112 #define DECLARE_STDCALL_P( type ) __stdcall type
113 #elif defined(__WATCOMC__)
114 #define DECLSPEC_NORETURN
115 #define DECLARE_STDCALL_P( type ) type __stdcall
116 #elif defined(_MSC_VER)
117 #define DECLSPEC_NORETURN __declspec(noreturn)
118 #define DECLARE_STDCALL_P( type ) type __stdcall
119 #endif /* __GNUC__/__WATCOMC__ */
120 
121 #define DECLSPEC_IMPORT __declspec(dllimport)
122 #define DECLSPEC_EXPORT __declspec(dllexport)
123 #ifndef DECLSPEC_NOINLINE
124 #if (_MSC_VER >= 1300)
125 #define DECLSPEC_NOINLINE __declspec(noinline)
126 #elif defined(__GNUC__)
127 #define DECLSPEC_NOINLINE __attribute__((noinline))
128 #else
129 #define DECLSPEC_NOINLINE
130 #endif
131 #endif
132 
133 #undef far
134 #undef near
135 #undef pascal
136 
137 #define far
138 #define near
139 #define pascal __stdcall
140 
141 #define cdecl
142 #ifndef CDECL
143 #define CDECL
144 #endif
145 
146 #if !defined(__x86_64__) //defined(_STDCALL_SUPPORTED)
147 #ifndef CALLBACK
148 #define CALLBACK __stdcall
149 #endif
150 #ifndef WINAPI
151 #define WINAPI __stdcall
152 #endif
153 #define WINAPIV __cdecl
154 #define APIENTRY WINAPI
155 #define APIPRIVATE WINAPI
156 #define PASCAL WINAPI
157 #else
158 #define CALLBACK
159 #define WINAPI
160 #define WINAPIV
161 #define APIENTRY WINAPI
162 #define APIPRIVATE
163 #define PASCAL pascal
164 #endif
165 
166 #undef FAR
167 #undef NEAR
168 #define FAR
169 #define NEAR
170 
171 #ifndef CONST
172 #define CONST const
173 #endif
174 
175 #ifndef _DEF_WINBOOL_
176 #define _DEF_WINBOOL_
177 typedef int WINBOOL;
178 #pragma push_macro("BOOL")
179 #undef BOOL
180 #if !defined(__OBJC__) && !defined(__OBJC_BOOL) && !defined(__objc_INCLUDE_GNU)
181 typedef int BOOL;
182 #endif
183 #define BOOL WINBOOL
184 typedef BOOL *PBOOL;
185 typedef BOOL *LPBOOL;
186 #pragma pop_macro("BOOL")
187 #endif /* _DEF_WINBOOL_ */
188 
189 typedef unsigned char BYTE;
190 typedef unsigned short WORD;
191 #ifndef __ROS_LONG64__
192  typedef unsigned long DWORD;
193 #else
194  typedef unsigned int DWORD;
195 #endif
196 typedef float FLOAT;
197 typedef FLOAT *PFLOAT;
198 typedef BYTE *PBYTE;
199 typedef BYTE *LPBYTE;
200 typedef int *PINT;
201 typedef int *LPINT;
202 typedef WORD *PWORD;
203 typedef WORD *LPWORD;
204 #ifndef __ROS_LONG64__
205 typedef long *LPLONG;
206 #else
207 typedef int *LPLONG;
208 #endif
209 typedef DWORD *PDWORD;
210 typedef DWORD *LPDWORD;
211 typedef void *LPVOID;
212 #ifndef _LPCVOID_DEFINED
213 #define _LPCVOID_DEFINED
214 typedef CONST void *LPCVOID;
215 #endif
216 //typedef int INT;
217 typedef unsigned int UINT;
218 typedef unsigned int *PUINT;
219 typedef unsigned int *LPUINT;
220 
221 
222 
223 
224 #ifndef NT_INCLUDED
225 #include <winnt.h>
226 #endif
227 
228 //#include <specstrings.h>
229 
230 typedef UINT_PTR WPARAM;
231 typedef LONG_PTR LPARAM;
233 #ifndef _HRESULT_DEFINED
234 typedef LONG HRESULT;
235 #define _HRESULT_DEFINED
236 #endif
237 
238 #ifndef NOMINMAX
239 #ifndef max
240 #define max(a, b) (((a) > (b)) ? (a) : (b))
241 #endif
242 #ifndef min
243 #define min(a, b) (((a) < (b)) ? (a) : (b))
244 #endif
245 #endif
246 
247 #define MAKEWORD(bLow, bHigh) ((WORD)(((BYTE)((DWORD_PTR)(bLow) & 0xff )) | (((WORD)((BYTE)((DWORD_PTR)(bHigh) & 0xff))) << 8 )))
248 #define MAKELONG(wLow, wHigh) ((LONG)(((WORD)((DWORD_PTR)(wLow) & 0xffff)) | (((DWORD)((WORD)((DWORD_PTR)(wHigh) & 0xffff))) << 16)))
249 #define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xffff))
250 #define HIWORD(l) ((WORD)(((DWORD_PTR)(l) >> 16) & 0xffff))
251 #define LOBYTE(w) ((BYTE)((DWORD_PTR)(w) & 0xff))
252 #define HIBYTE(w) ((BYTE)(((DWORD_PTR)(w) >> 8) & 0xff))
253 
254 #ifndef WIN_INTERNAL
256 //DECLARE_HANDLE (HHOOK);
257 #ifdef WINABLE
259 #endif
260 #endif
261 
262 typedef WORD ATOM;
263 
264 typedef HANDLE *SPHANDLE;
265 typedef HANDLE *LPHANDLE;
266 typedef HANDLE HGLOBAL;
267 typedef HANDLE HLOCAL;
270 #ifdef _WIN64
271 typedef INT_PTR (WINAPI *FARPROC)();
272 typedef INT_PTR (WINAPI *NEARPROC)();
273 typedef INT_PTR (WINAPI *PROC)();
274 #else
275 typedef int (WINAPI *FARPROC)();
276 typedef int (WINAPI *NEARPROC)();
277 typedef int (WINAPI *PROC)();
278 #endif
279 
280 typedef void *HGDIOBJ;
281 
283 typedef HKEY *PHKEY;
284 
285 DECLARE_HANDLE(HACCEL);
287 DECLARE_HANDLE(HBRUSH);
288 DECLARE_HANDLE(HCOLORSPACE);
292 DECLARE_HANDLE(HENHMETAFILE);
294 DECLARE_HANDLE(HICON);
296 DECLARE_HANDLE(HMETAFILE);
299 DECLARE_HANDLE(HPALETTE);
300 DECLARE_HANDLE(HPEN);
302 DECLARE_HANDLE(HRSRC);
303 DECLARE_HANDLE(HSTR);
304 DECLARE_HANDLE(HTASK);
305 DECLARE_HANDLE(HWINSTA);
309 DECLARE_HANDLE(HUMPD);
310 
311 typedef int HFILE;
312 typedef HICON HCURSOR;
313 typedef DWORD COLORREF;
314 typedef DWORD *LPCOLORREF;
315 
316 #define HFILE_ERROR ((HFILE)-1)
317 
318 typedef struct tagRECT {
323 } RECT,*PRECT,*NPRECT,*LPRECT;
324 
325 typedef const RECT *LPCRECT;
326 
327 typedef struct _RECTL {
332 } RECTL,*PRECTL,*LPRECTL;
333 
334 typedef const RECTL *LPCRECTL;
335 
336 typedef struct tagPOINT {
340 
341 typedef struct _POINTL {
344 } POINTL,*PPOINTL;
345 
346 typedef struct tagSIZE {
349 } SIZE,*PSIZE,*LPSIZE;
350 
351 typedef SIZE SIZEL;
352 typedef SIZE *PSIZEL,*LPSIZEL;
353 
354 typedef struct tagPOINTS {
358 
359 typedef struct _FILETIME {
360  DWORD dwLowDateTime;
361  DWORD dwHighDateTime;
363 #define _FILETIME_
364 
365 #define DM_UPDATE 1
366 #define DM_COPY 2
367 #define DM_PROMPT 4
368 #define DM_MODIFY 8
369 
370 #define DM_IN_BUFFER DM_MODIFY
371 #define DM_IN_PROMPT DM_PROMPT
372 #define DM_OUT_BUFFER DM_COPY
373 #define DM_OUT_DEFAULT DM_UPDATE
374 
375 #define DC_FIELDS 1
376 #define DC_PAPERS 2
377 #define DC_PAPERSIZE 3
378 #define DC_MINEXTENT 4
379 #define DC_MAXEXTENT 5
380 #define DC_BINS 6
381 #define DC_DUPLEX 7
382 #define DC_SIZE 8
383 #define DC_EXTRA 9
384 #define DC_VERSION 10
385 #define DC_DRIVER 11
386 #define DC_BINNAMES 12
387 #define DC_ENUMRESOLUTIONS 13
388 #define DC_FILEDEPENDENCIES 14
389 #define DC_TRUETYPE 15
390 #define DC_PAPERNAMES 16
391 #define DC_ORIENTATION 17
392 #define DC_COPIES 18
393 
394 /* needed by header files generated by WIDL */
395 #ifdef __WINESRC__
396 #define WINE_NO_UNICODE_MACROS
397 #endif
398 
399 #ifdef WINE_NO_UNICODE_MACROS
400 # define WINELIB_NAME_AW(func) \
401  func##_must_be_suffixed_with_W_or_A_in_this_context \
402  func##_must_be_suffixed_with_W_or_A_in_this_context
403 #else /* WINE_NO_UNICODE_MACROS */
404 # ifdef UNICODE
405 # define WINELIB_NAME_AW(func) func##W
406 # else
407 # define WINELIB_NAME_AW(func) func##A
408 # endif
409 #endif /* WINE_NO_UNICODE_MACROS */
410 
411 #ifdef WINE_NO_UNICODE_MACROS
412 # define DECL_WINELIB_TYPE_AW(type) /* nothing */
413 #else
414 # define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
415 #endif
416 
417 #ifndef __WATCOMC__
418 #ifndef _export
419 #define _export
420 #endif
421 #ifndef __export
422 #define __export
423 #endif
424 #endif
425 
426 #if 0
427 #ifdef __GNUC__
428 #define PACKED __attribute__((packed))
429 //#ifndef _fastcall
430 //#define _fastcall __attribute__((fastcall))
431 //#endif
432 //#ifndef __fastcall
433 //#define __fastcall __attribute__((fastcall))
434 //#endif
435 //#ifndef _stdcall
436 //#define _stdcall __attribute__((stdcall))
437 //#endif
438 //#ifndef __stdcall
439 //#define __stdcall __attribute__((stdcall))
440 //#endif
441 //#ifndef _cdecl
442 //#define _cdecl __attribute__((cdecl))
443 //#endif
444 //#ifndef __cdecl
445 //#define __cdecl __attribute__((cdecl))
446 //#endif
447 #ifndef __declspec
448 #define __declspec(e) __attribute__((e))
449 #endif
450 #ifndef _declspec
451 #define _declspec(e) __attribute__((e))
452 #endif
453 #elif defined(__WATCOMC__)
454 #define PACKED
455 #else
456 #define PACKED
457 #define _cdecl
458 #define __cdecl
459 #endif
460 #endif
461 
462 #if 1 // needed by shlwapi.h
463 #ifndef __ms_va_list
464 # if defined(__x86_64__) && defined (__GNUC__)
465 # define __ms_va_list __builtin_ms_va_list
466 # define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
467 # define __ms_va_end(list) __builtin_ms_va_end(list)
468 # else
469 # define __ms_va_list va_list
470 # define __ms_va_start(list,arg) va_start(list,arg)
471 # define __ms_va_end(list) va_end(list)
472 # endif
473 #endif
474 #endif
475 
476 #ifdef _MSC_VER
477 #pragma warning(pop)
478 #endif
479 
480 #ifdef __cplusplus
481 }
482 #endif
483 
484 #endif /* _WINDEF_ */
485 
const RECTL * LPCRECTL
Definition: windef.h:334
int(WINAPI * PROC)()
Definition: windef.h:277
HANDLE HGLOBAL
Definition: windef.h:266
#define HDC
Definition: msvc.h:22
void * LPVOID
Definition: windef.h:211
struct _FILETIME FILETIME
struct _POINTL * PPOINTL
#define HBITMAP
Definition: msvc.h:28
#define WINAPI
Definition: windef.h:151
struct _RECTL * PRECTL
HANDLE HLOCAL
Definition: windef.h:267
struct _FILETIME * PFILETIME
int(WINAPI * FARPROC)()
Definition: windef.h:275
unsigned short USHORT
Definition: windef.h:53
HANDLE GLOBALHANDLE
Definition: windef.h:268
#define HRGN
Definition: msvc.h:39
struct tagPOINTS POINTS
LONG top
Definition: windef.h:320
HANDLE HWND
Definition: compat.h:13
struct tagRECT * LPRECT
unsigned int * PUINT
Definition: windef.h:218
FLOAT * PFLOAT
Definition: windef.h:197
SIZE * LPSIZEL
Definition: windef.h:352
LONG left
Definition: windef.h:319
HICON HCURSOR
Definition: windef.h:312
struct tagPOINTS * PPOINTS
int32_t INT_PTR
Definition: typedefs.h:62
int(WINAPI * NEARPROC)()
Definition: windef.h:276
static HWINEVENTHOOK(WINAPI *pSetWinEventHook)(DWORD
LONG right
Definition: windef.h:321
typedef HGLRC(WINAPI *PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC hDC
struct tagSIZE SIZE
DWORD * LPDWORD
Definition: windef.h:210
LONG top
Definition: windef.h:329
LONG y
Definition: windef.h:343
unsigned int * LPUINT
Definition: windef.h:219
UINT_PTR WPARAM
Definition: windef.h:230
struct tagRECT RECT
struct tagPOINT * NPPOINT
typedef HDESK
Definition: winlogon.h:74
USHORT * PUSHORT
Definition: windef.h:54
struct _RECTL RECTL
DWORD dwHighDateTime
Definition: mapidefs.h:66
SIZE * PSIZEL
Definition: windef.h:352
unsigned short WORD
Definition: windef.h:190
long LONG
Definition: pedump.c:60
LONG_PTR LPARAM
Definition: windef.h:231
short SHORT
Definition: pedump.c:59
LONG x
Definition: windef.h:337
BYTE * PBYTE
Definition: windef.h:198
unsigned char UCHAR
Definition: windef.h:55
LONG cx
Definition: windef.h:347
int INT
Definition: windef.h:58
SHORT x
Definition: windef.h:355
BOOL * PBOOL
Definition: windef.h:184
struct _RECTL * LPRECTL
LONG left
Definition: windef.h:328
int * PINT
Definition: windef.h:200
#define BOOL
Definition: windef.h:183
long * LPLONG
Definition: windef.h:205
LONG right
Definition: windef.h:330
#define CONST
Definition: windef.h:172
struct tagPOINTS * LPPOINTS
SIZE SIZEL
Definition: windef.h:351
HANDLE HKEY
Definition: registry.h:24
HANDLE HMONITOR
Definition: axextend.idl:426
struct tagPOINT POINT
LONG bottom
Definition: windef.h:331
LONG x
Definition: windef.h:342
char * PSZ
Definition: windef.h:57
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
BYTE * LPBYTE
Definition: windef.h:199
HANDLE HINSTANCE
Definition: typedefs.h:75
struct _POINTL POINTL
LONG HRESULT
Definition: windef.h:234
UINT_PTR HKL
Definition: msctf.idl:101
LONG y
Definition: windef.h:338
HINSTANCE HMODULE
Definition: windef.h:298
struct tagPOINT * LPPOINT
HANDLE * SPHANDLE
Definition: windef.h:264
unsigned int UINT
Definition: windef.h:217
void * HGDIOBJ
Definition: windef.h:280
SHORT y
Definition: windef.h:356
UCHAR * PUCHAR
Definition: windef.h:56
DWORD *typedef HANDLE
Definition: winlogon.h:52
BOOL * LPBOOL
Definition: windef.h:185
DECLARE_HANDLE(HWND)
unsigned long ULONG
Definition: windef.h:48
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
HKEY * PHKEY
Definition: windef.h:283
unsigned long DWORD
Definition: windef.h:192
WORD * LPWORD
Definition: windef.h:203
struct tagPOINT * PPOINT
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
float FLOAT
Definition: windef.h:196
CONST void * LPCVOID
Definition: windef.h:214
HANDLE * LPHANDLE
Definition: windef.h:265
struct tagRECT * NPRECT
ULONG * PULONG
Definition: windef.h:52
Definition: windef.h:327
LONG bottom
Definition: windef.h:322
struct _FILETIME * LPFILETIME
struct tagRECT * PRECT
LONG_PTR LRESULT
Definition: windef.h:232
DWORD COLORREF
Definition: windef.h:313
WORD * PWORD
Definition: windef.h:202
int WINBOOL
Definition: windef.h:177
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:68
int HFILE
Definition: windef.h:311
DWORD * LPCOLORREF
Definition: windef.h:314
LONG cy
Definition: windef.h:348
WORD ATOM
Definition: windef.h:262
struct tagSIZE * LPSIZE
DWORD dwLowDateTime
Definition: mapidefs.h:65
struct tagSIZE * PSIZE
const RECT * LPCRECT
Definition: windef.h:325
unsigned char BYTE
Definition: windef.h:189
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29
int * LPINT
Definition: windef.h:201
HANDLE LOCALHANDLE
Definition: windef.h:269
DWORD_PTR HEVENT
Definition: axcore.idl:61
DWORD * PDWORD
Definition: windef.h:209