ReactOS 0.4.16-dev-329-g9223134
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
38extern "C" {
39#endif
40
41#ifndef WINVER
42#define WINVER 0x0502
43#endif
44
45#ifndef BASETYPES
46#define BASETYPES
47#ifndef __ROS_LONG64__
48typedef unsigned long ULONG;
49#else
50typedef unsigned int ULONG;
51#endif
52typedef ULONG *PULONG;
53typedef unsigned short USHORT;
54typedef USHORT *PUSHORT;
55typedef unsigned char UCHAR;
56typedef UCHAR *PUCHAR;
57typedef char *PSZ;
58typedef 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_
154typedef int WINBOOL;
155#pragma push_macro("BOOL")
156#undef BOOL
157#if !defined(__OBJC__) && !defined(__OBJC_BOOL) && !defined(__objc_INCLUDE_GNU)
158typedef int BOOL;
159#endif
160#define BOOL WINBOOL
161typedef BOOL *PBOOL;
162typedef BOOL *LPBOOL;
163#pragma pop_macro("BOOL")
164#endif /* _DEF_WINBOOL_ */
165
166typedef unsigned char BYTE;
167typedef unsigned short WORD;
168#ifndef __ROS_LONG64__
169 typedef unsigned long DWORD;
170#else
171 typedef unsigned int DWORD;
172#endif
173typedef float FLOAT;
174typedef FLOAT *PFLOAT;
175typedef BYTE *PBYTE;
176typedef BYTE *LPBYTE;
177typedef int *PINT;
178typedef int *LPINT;
179typedef WORD *PWORD;
180typedef WORD *LPWORD;
181#ifndef __ROS_LONG64__
182typedef long *LPLONG;
183#else
184typedef int *LPLONG;
185#endif
186typedef DWORD *PDWORD;
187typedef DWORD *LPDWORD;
188typedef void *LPVOID;
189#ifndef _LPCVOID_DEFINED
190#define _LPCVOID_DEFINED
191typedef CONST void *LPCVOID;
192#endif
193//typedef int INT;
194typedef unsigned int UINT;
195typedef unsigned int *PUINT;
196typedef unsigned int *LPUINT;
197
198
199
200
201#ifndef NT_INCLUDED
202#include <winnt.h>
203#endif
204
205//#include <specstrings.h>
206
210#ifndef _HRESULT_DEFINED
211typedef 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
239typedef WORD ATOM;
240
247
248typedef INT_PTR (WINAPI *FARPROC)();
250typedef INT_PTR (WINAPI *PROC)();
251
252typedef void *HGDIOBJ;
253
255typedef HKEY *PHKEY;
256
260DECLARE_HANDLE(HCOLORSPACE);
264DECLARE_HANDLE(HENHMETAFILE);
268DECLARE_HANDLE(HMETAFILE);
282
284
285typedef enum DPI_AWARENESS {
291
292#define DPI_AWARENESS_CONTEXT_UNAWARE ((DPI_AWARENESS_CONTEXT)-1)
293#define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ((DPI_AWARENESS_CONTEXT)-2)
294#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ((DPI_AWARENESS_CONTEXT)-3)
295#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((DPI_AWARENESS_CONTEXT)-4)
296#define DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ((DPI_AWARENESS_CONTEXT)-5)
297
298typedef int HFILE;
302
303#define HFILE_ERROR ((HFILE)-1)
304
305typedef struct tagRECT {
311
312typedef const RECT *LPCRECT;
313
314typedef struct _RECTL {
320
321typedef const RECTL *LPCRECTL;
322
323typedef struct tagPOINT {
327
328typedef struct _POINTL {
332
333typedef struct tagSIZE {
337
338typedef SIZE SIZEL;
340
341typedef struct tagPOINTS {
345
346typedef struct _FILETIME {
350#define _FILETIME_
351
352#define DM_UPDATE 1
353#define DM_COPY 2
354#define DM_PROMPT 4
355#define DM_MODIFY 8
356
357#define DM_IN_BUFFER DM_MODIFY
358#define DM_IN_PROMPT DM_PROMPT
359#define DM_OUT_BUFFER DM_COPY
360#define DM_OUT_DEFAULT DM_UPDATE
361
362#define DC_FIELDS 1
363#define DC_PAPERS 2
364#define DC_PAPERSIZE 3
365#define DC_MINEXTENT 4
366#define DC_MAXEXTENT 5
367#define DC_BINS 6
368#define DC_DUPLEX 7
369#define DC_SIZE 8
370#define DC_EXTRA 9
371#define DC_VERSION 10
372#define DC_DRIVER 11
373#define DC_BINNAMES 12
374#define DC_ENUMRESOLUTIONS 13
375#define DC_FILEDEPENDENCIES 14
376#define DC_TRUETYPE 15
377#define DC_PAPERNAMES 16
378#define DC_ORIENTATION 17
379#define DC_COPIES 18
380
381/* needed by header files generated by WIDL */
382#ifdef __WINESRC__
383#define WINE_NO_UNICODE_MACROS
384#endif
385
386#ifdef WINE_NO_UNICODE_MACROS
387# define WINELIB_NAME_AW(func) \
388 func##_must_be_suffixed_with_W_or_A_in_this_context \
389 func##_must_be_suffixed_with_W_or_A_in_this_context
390#else /* WINE_NO_UNICODE_MACROS */
391# ifdef UNICODE
392# define WINELIB_NAME_AW(func) func##W
393# else
394# define WINELIB_NAME_AW(func) func##A
395# endif
396#endif /* WINE_NO_UNICODE_MACROS */
397
398#ifdef WINE_NO_UNICODE_MACROS
399# define DECL_WINELIB_TYPE_AW(type) /* nothing */
400#else
401# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
402#endif
403
404#ifndef __WATCOMC__
405#ifndef _export
406#define _export
407#endif
408#ifndef __export
409#define __export
410#endif
411#endif
412
413#if 0
414#ifdef __GNUC__
415#define PACKED __attribute__((packed))
416//#ifndef _fastcall
417//#define _fastcall __attribute__((fastcall))
418//#endif
419//#ifndef __fastcall
420//#define __fastcall __attribute__((fastcall))
421//#endif
422//#ifndef _stdcall
423//#define _stdcall __attribute__((stdcall))
424//#endif
425//#ifndef __stdcall
426//#define __stdcall __attribute__((stdcall))
427//#endif
428//#ifndef _cdecl
429//#define _cdecl __attribute__((cdecl))
430//#endif
431//#ifndef __cdecl
432//#define __cdecl __attribute__((cdecl))
433//#endif
434#ifndef __declspec
435#define __declspec(e) __attribute__((e))
436#endif
437#ifndef _declspec
438#define _declspec(e) __attribute__((e))
439#endif
440#elif defined(__WATCOMC__)
441#define PACKED
442#else
443#define PACKED
444#define _cdecl
445#define __cdecl
446#endif
447#endif
448
449#if 1 // needed by shlwapi.h
450#ifndef __ms_va_list
451# if defined(__x86_64__) && defined (__GNUC__)
452# define __ms_va_list __builtin_ms_va_list
453# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
454# define __ms_va_end(list) __builtin_ms_va_end(list)
455# else
456# define __ms_va_list va_list
457# define __ms_va_start(list,arg) va_start(list,arg)
458# define __ms_va_end(list) va_end(list)
459# endif
460#endif
461#endif
462
463#ifdef _MSC_VER
464#pragma warning(pop)
465#endif
466
467#ifdef __cplusplus
468}
469#endif
470
471#endif /* _WINDEF_ */
472
DWORD_PTR HEVENT
Definition: axcore.idl:61
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
#define DECLARE_HANDLE(name)
Definition: mimeole.idl:23
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:88
static HICON
Definition: imagelist.c:80
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static HWINEVENTHOOK(WINAPI *pSetWinEventHook)(DWORD
static UINT UINT *static DPI_AWARENESS_CONTEXT(WINAPI *pGetThreadDpiAwarenessContext)(void)
UINT_PTR HKL
Definition: msctf.idl:143
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
static HGLRC(WINAPI *pwglCreateContextAttribsARB)(HDC hDC
short SHORT
Definition: pedump.c:59
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
Definition: windef.h:314
LONG top
Definition: windef.h:316
LONG left
Definition: windef.h:315
LONG right
Definition: windef.h:317
LONG bottom
Definition: windef.h:318
SHORT y
Definition: windef.h:343
SHORT x
Definition: windef.h:342
LONG y
Definition: windef.h:325
LONG x
Definition: windef.h:324
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG cx
Definition: windef.h:334
LONG cy
Definition: windef.h:335
int32_t INT_PTR
Definition: typedefs.h:64
float FLOAT
Definition: typedefs.h:69
uint32_t ULONG
Definition: typedefs.h:59
HANDLE GLOBALHANDLE
Definition: windef.h:245
#define CONST
Definition: windef.h:149
struct _POINTL * PPOINTL
DWORD * LPDWORD
Definition: windef.h:187
BYTE * PBYTE
Definition: windef.h:175
DWORD * PDWORD
Definition: windef.h:186
WORD ATOM
Definition: windef.h:239
unsigned short WORD
Definition: windef.h:167
WORD * PWORD
Definition: windef.h:179
struct tagPOINT POINT
LONG_PTR LPARAM
Definition: windef.h:208
ULONG * PULONG
Definition: windef.h:52
BOOL * LPBOOL
Definition: windef.h:162
LONG_PTR LRESULT
Definition: windef.h:209
unsigned int UINT
Definition: windef.h:194
int INT
Definition: windef.h:58
DPI_AWARENESS
Definition: windef.h:285
@ DPI_AWARENESS_PER_MONITOR_AWARE
Definition: windef.h:289
@ DPI_AWARENESS_SYSTEM_AWARE
Definition: windef.h:288
@ DPI_AWARENESS_INVALID
Definition: windef.h:286
@ DPI_AWARENESS_UNAWARE
Definition: windef.h:287
HKEY * PHKEY
Definition: windef.h:255
struct _POINTL POINTL
struct tagPOINTS POINTS
UINT_PTR WPARAM
Definition: windef.h:207
INT_PTR(WINAPI * NEARPROC)()
Definition: windef.h:249
int * LPINT
Definition: windef.h:178
unsigned char BYTE
Definition: windef.h:166
struct tagPOINTS * PPOINTS
HANDLE LOCALHANDLE
Definition: windef.h:246
long * LPLONG
Definition: windef.h:182
unsigned char UCHAR
Definition: windef.h:55
struct tagPOINT * NPPOINT
unsigned short USHORT
Definition: windef.h:53
struct tagRECT RECT
struct tagPOINT * PPOINT
DWORD * LPCOLORREF
Definition: windef.h:301
unsigned int * LPUINT
Definition: windef.h:196
FLOAT * PFLOAT
Definition: windef.h:174
struct tagRECT * LPRECT
HANDLE HGLOBAL
Definition: windef.h:243
struct tagRECT * PRECT
struct tagPOINT * LPPOINT
struct _RECTL * LPRECTL
const RECTL * LPCRECTL
Definition: windef.h:321
SIZE SIZEL
Definition: windef.h:338
struct tagPOINTS * LPPOINTS
SIZE * PSIZEL
Definition: windef.h:339
float FLOAT
Definition: windef.h:173
struct _FILETIME FILETIME
struct tagSIZE SIZE
struct _FILETIME * PFILETIME
unsigned int * PUINT
Definition: windef.h:195
#define WINAPI
Definition: windef.h:128
HANDLE HLOCAL
Definition: windef.h:244
UCHAR * PUCHAR
Definition: windef.h:56
const RECT * LPCRECT
Definition: windef.h:312
HANDLE * SPHANDLE
Definition: windef.h:241
LONG HRESULT
Definition: windef.h:211
void * LPVOID
Definition: windef.h:188
int * PINT
Definition: windef.h:177
void * HGDIOBJ
Definition: windef.h:252
struct tagSIZE * LPSIZE
INT_PTR(WINAPI * FARPROC)()
Definition: windef.h:248
struct _RECTL RECTL
BYTE * LPBYTE
Definition: windef.h:176
DWORD COLORREF
Definition: windef.h:300
int HFILE
Definition: windef.h:298
struct _FILETIME * LPFILETIME
unsigned long DWORD
Definition: windef.h:169
CONST void * LPCVOID
Definition: windef.h:191
HANDLE * LPHANDLE
Definition: windef.h:242
#define BOOL
Definition: windef.h:160
HINSTANCE HMODULE
Definition: windef.h:270
struct _RECTL * PRECTL
char * PSZ
Definition: windef.h:57
HICON HCURSOR
Definition: windef.h:299
WORD * LPWORD
Definition: windef.h:180
BOOL * PBOOL
Definition: windef.h:161
struct tagRECT * NPRECT
USHORT * PUSHORT
Definition: windef.h:54
SIZE * LPSIZEL
Definition: windef.h:339
int WINBOOL
Definition: windef.h:154
unsigned long ULONG
Definition: windef.h:48
INT_PTR(WINAPI * PROC)()
Definition: windef.h:250
struct tagSIZE * PSIZE
unsigned char UCHAR
Definition: xmlstorage.h:181
unsigned char BYTE
Definition: xxhash.c:193