ReactOS  0.4.10-dev-234-g15c29d0
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 #undef far
111 #undef near
112 #undef pascal
113 
114 #define far
115 #define near
116 #define pascal __stdcall
117 
118 #define cdecl
119 #ifndef CDECL
120 #define CDECL
121 #endif
122 
123 #if !defined(__x86_64__) //defined(_STDCALL_SUPPORTED)
124 #ifndef CALLBACK
125 #define CALLBACK __stdcall
126 #endif
127 #ifndef WINAPI
128 #define WINAPI __stdcall
129 #endif
130 #define WINAPIV __cdecl
131 #define APIENTRY WINAPI
132 #define APIPRIVATE WINAPI
133 #define PASCAL WINAPI
134 #else
135 #define CALLBACK
136 #define WINAPI
137 #define WINAPIV
138 #define APIENTRY WINAPI
139 #define APIPRIVATE
140 #define PASCAL pascal
141 #endif
142 
143 #undef FAR
144 #undef NEAR
145 #define FAR
146 #define NEAR
147 
148 #ifndef CONST
149 #define CONST const
150 #endif
151 
152 #ifndef _DEF_WINBOOL_
153 #define _DEF_WINBOOL_
154 typedef int WINBOOL;
155 #pragma push_macro("BOOL")
156 #undef BOOL
157 #if !defined(__OBJC__) && !defined(__OBJC_BOOL) && !defined(__objc_INCLUDE_GNU)
158 typedef int BOOL;
159 #endif
160 #define BOOL WINBOOL
161 typedef BOOL *PBOOL;
162 typedef BOOL *LPBOOL;
163 #pragma pop_macro("BOOL")
164 #endif /* _DEF_WINBOOL_ */
165 
166 typedef unsigned char BYTE;
167 typedef unsigned short WORD;
168 #ifndef __ROS_LONG64__
169  typedef unsigned long DWORD;
170 #else
171  typedef unsigned int DWORD;
172 #endif
173 typedef float FLOAT;
174 typedef FLOAT *PFLOAT;
175 typedef BYTE *PBYTE;
176 typedef BYTE *LPBYTE;
177 typedef int *PINT;
178 typedef int *LPINT;
179 typedef WORD *PWORD;
180 typedef WORD *LPWORD;
181 #ifndef __ROS_LONG64__
182 typedef long *LPLONG;
183 #else
184 typedef int *LPLONG;
185 #endif
186 typedef DWORD *PDWORD;
187 typedef DWORD *LPDWORD;
188 typedef void *LPVOID;
189 #ifndef _LPCVOID_DEFINED
190 #define _LPCVOID_DEFINED
191 typedef CONST void *LPCVOID;
192 #endif
193 //typedef int INT;
194 typedef unsigned int UINT;
195 typedef unsigned int *PUINT;
196 typedef unsigned int *LPUINT;
197 
198 
199 
200 
201 #ifndef NT_INCLUDED
202 #include <winnt.h>
203 #endif
204 
205 //#include <specstrings.h>
206 
207 typedef UINT_PTR WPARAM;
208 typedef LONG_PTR LPARAM;
210 #ifndef _HRESULT_DEFINED
211 typedef LONG HRESULT;
212 #define _HRESULT_DEFINED
213 #endif
214 
215 #ifndef NOMINMAX
216 #ifndef max
217 #define max(a, b) (((a) > (b)) ? (a) : (b))
218 #endif
219 #ifndef min
220 #define min(a, b) (((a) < (b)) ? (a) : (b))
221 #endif
222 #endif
223 
224 #define MAKEWORD(bLow, bHigh) ((WORD)(((BYTE)((DWORD_PTR)(bLow) & 0xff )) | (((WORD)((BYTE)((DWORD_PTR)(bHigh) & 0xff))) << 8 )))
225 #define MAKELONG(wLow, wHigh) ((LONG)(((WORD)((DWORD_PTR)(wLow) & 0xffff)) | (((DWORD)((WORD)((DWORD_PTR)(wHigh) & 0xffff))) << 16)))
226 #define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xffff))
227 #define HIWORD(l) ((WORD)(((DWORD_PTR)(l) >> 16) & 0xffff))
228 #define LOBYTE(w) ((BYTE)((DWORD_PTR)(w) & 0xff))
229 #define HIBYTE(w) ((BYTE)(((DWORD_PTR)(w) >> 8) & 0xff))
230 
231 #ifndef WIN_INTERNAL
233 //DECLARE_HANDLE (HHOOK);
234 #ifdef WINABLE
236 #endif
237 #endif
238 
239 typedef WORD ATOM;
240 
241 typedef HANDLE *SPHANDLE;
242 typedef HANDLE *LPHANDLE;
243 typedef HANDLE HGLOBAL;
244 typedef HANDLE HLOCAL;
247 #ifdef _WIN64
248 typedef INT_PTR (WINAPI *FARPROC)();
249 typedef INT_PTR (WINAPI *NEARPROC)();
250 typedef INT_PTR (WINAPI *PROC)();
251 #else
252 typedef int (WINAPI *FARPROC)();
253 typedef int (WINAPI *NEARPROC)();
254 typedef int (WINAPI *PROC)();
255 #endif
256 
257 typedef void *HGDIOBJ;
258 
260 typedef HKEY *PHKEY;
261 
262 DECLARE_HANDLE(HACCEL);
264 DECLARE_HANDLE(HBRUSH);
265 DECLARE_HANDLE(HCOLORSPACE);
269 DECLARE_HANDLE(HENHMETAFILE);
273 DECLARE_HANDLE(HMETAFILE);
276 DECLARE_HANDLE(HPALETTE);
277 DECLARE_HANDLE(HPEN);
279 DECLARE_HANDLE(HRSRC);
280 DECLARE_HANDLE(HSTR);
281 DECLARE_HANDLE(HTASK);
282 DECLARE_HANDLE(HWINSTA);
286 DECLARE_HANDLE(HUMPD);
287 
288 typedef int HFILE;
289 typedef HICON HCURSOR;
290 typedef DWORD COLORREF;
291 typedef DWORD *LPCOLORREF;
292 
293 #define HFILE_ERROR ((HFILE)-1)
294 
295 typedef struct tagRECT {
300 } RECT,*PRECT,*NPRECT,*LPRECT;
301 
302 typedef const RECT *LPCRECT;
303 
304 typedef struct _RECTL {
309 } RECTL,*PRECTL,*LPRECTL;
310 
311 typedef const RECTL *LPCRECTL;
312 
313 typedef struct tagPOINT {
317 
318 typedef struct _POINTL {
321 } POINTL,*PPOINTL;
322 
323 typedef struct tagSIZE {
326 } SIZE,*PSIZE,*LPSIZE;
327 
328 typedef SIZE SIZEL;
329 typedef SIZE *PSIZEL,*LPSIZEL;
330 
331 typedef struct tagPOINTS {
335 
336 typedef struct _FILETIME {
337  DWORD dwLowDateTime;
338  DWORD dwHighDateTime;
340 #define _FILETIME_
341 
342 #define DM_UPDATE 1
343 #define DM_COPY 2
344 #define DM_PROMPT 4
345 #define DM_MODIFY 8
346 
347 #define DM_IN_BUFFER DM_MODIFY
348 #define DM_IN_PROMPT DM_PROMPT
349 #define DM_OUT_BUFFER DM_COPY
350 #define DM_OUT_DEFAULT DM_UPDATE
351 
352 #define DC_FIELDS 1
353 #define DC_PAPERS 2
354 #define DC_PAPERSIZE 3
355 #define DC_MINEXTENT 4
356 #define DC_MAXEXTENT 5
357 #define DC_BINS 6
358 #define DC_DUPLEX 7
359 #define DC_SIZE 8
360 #define DC_EXTRA 9
361 #define DC_VERSION 10
362 #define DC_DRIVER 11
363 #define DC_BINNAMES 12
364 #define DC_ENUMRESOLUTIONS 13
365 #define DC_FILEDEPENDENCIES 14
366 #define DC_TRUETYPE 15
367 #define DC_PAPERNAMES 16
368 #define DC_ORIENTATION 17
369 #define DC_COPIES 18
370 
371 /* needed by header files generated by WIDL */
372 #ifdef __WINESRC__
373 #define WINE_NO_UNICODE_MACROS
374 #endif
375 
376 #ifdef WINE_NO_UNICODE_MACROS
377 # define WINELIB_NAME_AW(func) \
378  func##_must_be_suffixed_with_W_or_A_in_this_context \
379  func##_must_be_suffixed_with_W_or_A_in_this_context
380 #else /* WINE_NO_UNICODE_MACROS */
381 # ifdef UNICODE
382 # define WINELIB_NAME_AW(func) func##W
383 # else
384 # define WINELIB_NAME_AW(func) func##A
385 # endif
386 #endif /* WINE_NO_UNICODE_MACROS */
387 
388 #ifdef WINE_NO_UNICODE_MACROS
389 # define DECL_WINELIB_TYPE_AW(type) /* nothing */
390 #else
391 # define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
392 #endif
393 
394 #ifndef __WATCOMC__
395 #ifndef _export
396 #define _export
397 #endif
398 #ifndef __export
399 #define __export
400 #endif
401 #endif
402 
403 #if 0
404 #ifdef __GNUC__
405 #define PACKED __attribute__((packed))
406 //#ifndef _fastcall
407 //#define _fastcall __attribute__((fastcall))
408 //#endif
409 //#ifndef __fastcall
410 //#define __fastcall __attribute__((fastcall))
411 //#endif
412 //#ifndef _stdcall
413 //#define _stdcall __attribute__((stdcall))
414 //#endif
415 //#ifndef __stdcall
416 //#define __stdcall __attribute__((stdcall))
417 //#endif
418 //#ifndef _cdecl
419 //#define _cdecl __attribute__((cdecl))
420 //#endif
421 //#ifndef __cdecl
422 //#define __cdecl __attribute__((cdecl))
423 //#endif
424 #ifndef __declspec
425 #define __declspec(e) __attribute__((e))
426 #endif
427 #ifndef _declspec
428 #define _declspec(e) __attribute__((e))
429 #endif
430 #elif defined(__WATCOMC__)
431 #define PACKED
432 #else
433 #define PACKED
434 #define _cdecl
435 #define __cdecl
436 #endif
437 #endif
438 
439 #if 1 // needed by shlwapi.h
440 #ifndef __ms_va_list
441 # if defined(__x86_64__) && defined (__GNUC__)
442 # define __ms_va_list __builtin_ms_va_list
443 # define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
444 # define __ms_va_end(list) __builtin_ms_va_end(list)
445 # else
446 # define __ms_va_list va_list
447 # define __ms_va_start(list,arg) va_start(list,arg)
448 # define __ms_va_end(list) va_end(list)
449 # endif
450 #endif
451 #endif
452 
453 #ifdef _MSC_VER
454 #pragma warning(pop)
455 #endif
456 
457 #ifdef __cplusplus
458 }
459 #endif
460 
461 #endif /* _WINDEF_ */
462 
const RECTL * LPCRECTL
Definition: windef.h:311
int(WINAPI * PROC)()
Definition: windef.h:254
HANDLE HGLOBAL
Definition: windef.h:243
#define HDC
Definition: msvc.h:22
void * LPVOID
Definition: windef.h:188
struct _FILETIME FILETIME
static HICON
Definition: imagelist.c:84
struct _POINTL * PPOINTL
#define HBITMAP
Definition: msvc.h:28
#define WINAPI
Definition: windef.h:128
struct _RECTL * PRECTL
HANDLE HLOCAL
Definition: windef.h:244
struct _FILETIME * PFILETIME
int(WINAPI * FARPROC)()
Definition: windef.h:252
unsigned short USHORT
Definition: windef.h:53
HANDLE GLOBALHANDLE
Definition: windef.h:245
#define HRGN
Definition: msvc.h:39
struct tagPOINTS POINTS
LONG top
Definition: windef.h:297
HANDLE HWND
Definition: compat.h:13
struct tagRECT * LPRECT
unsigned int * PUINT
Definition: windef.h:195
FLOAT * PFLOAT
Definition: windef.h:174
SIZE * LPSIZEL
Definition: windef.h:329
LONG left
Definition: windef.h:296
HICON HCURSOR
Definition: windef.h:289
struct tagPOINTS * PPOINTS
int32_t INT_PTR
Definition: typedefs.h:62
int(WINAPI * NEARPROC)()
Definition: windef.h:253
static HWINEVENTHOOK(WINAPI *pSetWinEventHook)(DWORD
LONG right
Definition: windef.h:298
typedef HGLRC(WINAPI *PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC hDC
struct tagSIZE SIZE
DWORD * LPDWORD
Definition: windef.h:187
LONG top
Definition: windef.h:306
LONG y
Definition: windef.h:320
unsigned int * LPUINT
Definition: windef.h:196
UINT_PTR WPARAM
Definition: windef.h:207
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:329
unsigned short WORD
Definition: windef.h:167
long LONG
Definition: pedump.c:60
LONG_PTR LPARAM
Definition: windef.h:208
short SHORT
Definition: pedump.c:59
LONG x
Definition: windef.h:314
BYTE * PBYTE
Definition: windef.h:175
unsigned char UCHAR
Definition: windef.h:55
LONG cx
Definition: windef.h:324
int INT
Definition: windef.h:58
SHORT x
Definition: windef.h:332
BOOL * PBOOL
Definition: windef.h:161
struct _RECTL * LPRECTL
LONG left
Definition: windef.h:305
int * PINT
Definition: windef.h:177
#define BOOL
Definition: windef.h:160
long * LPLONG
Definition: windef.h:182
LONG right
Definition: windef.h:307
#define CONST
Definition: windef.h:149
struct tagPOINTS * LPPOINTS
SIZE SIZEL
Definition: windef.h:328
HANDLE HKEY
Definition: registry.h:24
HANDLE HMONITOR
Definition: axextend.idl:426
struct tagPOINT POINT
LONG bottom
Definition: windef.h:308
LONG x
Definition: windef.h:319
char * PSZ
Definition: windef.h:57
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
BYTE * LPBYTE
Definition: windef.h:176
HANDLE HINSTANCE
Definition: typedefs.h:75
struct _POINTL POINTL
LONG HRESULT
Definition: windef.h:211
UINT_PTR HKL
Definition: msctf.idl:101
LONG y
Definition: windef.h:315
HINSTANCE HMODULE
Definition: windef.h:275
struct tagPOINT * LPPOINT
HANDLE * SPHANDLE
Definition: windef.h:241
unsigned int UINT
Definition: windef.h:194
void * HGDIOBJ
Definition: windef.h:257
SHORT y
Definition: windef.h:333
UCHAR * PUCHAR
Definition: windef.h:56
DWORD *typedef HANDLE
Definition: winlogon.h:52
BOOL * LPBOOL
Definition: windef.h:162
DECLARE_HANDLE(HWND)
unsigned long ULONG
Definition: windef.h:48
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
HKEY * PHKEY
Definition: windef.h:260
unsigned long DWORD
Definition: windef.h:169
WORD * LPWORD
Definition: windef.h:180
struct tagPOINT * PPOINT
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
float FLOAT
Definition: windef.h:173
CONST void * LPCVOID
Definition: windef.h:191
HANDLE * LPHANDLE
Definition: windef.h:242
struct tagRECT * NPRECT
ULONG * PULONG
Definition: windef.h:52
Definition: windef.h:304
LONG bottom
Definition: windef.h:299
struct _FILETIME * LPFILETIME
struct tagRECT * PRECT
LONG_PTR LRESULT
Definition: windef.h:209
DWORD COLORREF
Definition: windef.h:290
WORD * PWORD
Definition: windef.h:179
int WINBOOL
Definition: windef.h:154
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
int HFILE
Definition: windef.h:288
DWORD * LPCOLORREF
Definition: windef.h:291
LONG cy
Definition: windef.h:325
WORD ATOM
Definition: windef.h:239
struct tagSIZE * LPSIZE
DWORD dwLowDateTime
Definition: mapidefs.h:65
struct tagSIZE * PSIZE
const RECT * LPCRECT
Definition: windef.h:302
unsigned char BYTE
Definition: windef.h:166
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29
int * LPINT
Definition: windef.h:178
HANDLE LOCALHANDLE
Definition: windef.h:246
DWORD_PTR HEVENT
Definition: axcore.idl:61
DWORD * PDWORD
Definition: windef.h:186