Merge pull request #297 from t-b/upgrade_msys_openssl_101m
[msysgit.git] / include / windef.h
blob55551041dbe166d9b929dd4053a6776acabb128a
1 #ifndef _WINDEF_H
2 #define _WINDEF_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
7 #ifndef WINVER
8 #define WINVER 0x0400
9 #endif
10 #ifndef _WIN32_WINNT
11 #define _WIN32_WINNT WINVER
12 #endif
13 #ifndef WIN32
14 #define WIN32
15 #endif
16 #ifndef _WIN32
17 #define _WIN32
18 #endif
19 #define FAR
20 #define far
21 #define NEAR
22 #define near
23 #ifndef CONST
24 #define CONST const
25 #endif
26 #undef MAX_PATH
27 #define MAX_PATH 260
29 #ifndef NULL
30 #ifdef __cplusplus
31 #define NULL 0
32 #else
33 #define NULL ((void*)0)
34 #endif
35 #endif
36 #ifndef FALSE
37 #define FALSE 0
38 #endif
39 #ifndef TRUE
40 #define TRUE 1
41 #endif
42 #define IN
43 #define OUT
44 #ifndef OPTIONAL
45 #define OPTIONAL
46 #endif
48 #ifdef __GNUC__
49 #define PACKED __attribute__((packed))
50 #ifndef _stdcall
51 #define _stdcall __attribute__((stdcall))
52 #endif
53 #ifndef __stdcall
54 #define __stdcall __attribute__((stdcall))
55 #endif
56 #ifndef _cdecl
57 #define _cdecl __attribute__((cdecl))
58 #endif
59 #ifndef __cdecl
60 #define __cdecl __attribute__((cdecl))
61 #endif
62 #ifndef __declspec
63 #define __declspec(e) __attribute__((e))
64 #endif
65 #ifndef _declspec
66 #define _declspec(e) __attribute__((e))
67 #endif
68 #else
69 #define PACKED
70 #define _cdecl
71 #define __cdecl
72 #endif
74 #undef pascal
75 #undef _pascal
76 #undef __pascal
77 #define pascal __stdcall
78 #define _pascal __stdcall
79 #define __pascal __stdcall
80 #define PASCAL _pascal
81 #define CDECL _cdecl
82 #define STDCALL __stdcall
83 #define WINAPI __stdcall
84 #define WINAPIV __cdecl
85 #define APIENTRY __stdcall
86 #define CALLBACK __stdcall
87 #define APIPRIVATE __stdcall
89 #define DECLSPEC_IMPORT __declspec(dllimport)
90 #define DECLSPEC_EXPORT __declspec(dllexport)
91 #ifdef __GNUC__
92 #define DECLSPEC_NORETURN __declspec(noreturn)
93 #define DECLARE_STDCALL_P( type ) __stdcall type
94 #elif defined(__WATCOMC__)
95 #define DECLSPEC_NORETURN
96 #define DECLARE_STDCALL_P( type ) type __stdcall
97 #endif /* __GNUC__/__WATCOMC__ */
98 #define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
99 #define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
100 #define LOWORD(l) ((WORD)((DWORD)(l)))
101 #define HIWORD(l) ((WORD)(((DWORD)(l)>>16)&0xFFFF))
102 #define LOBYTE(w) ((BYTE)(w))
103 #define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))
105 #ifndef _export
106 #define _export
107 #endif
108 #ifndef __export
109 #define __export
110 #endif
112 #ifndef NOMINMAX
113 #ifndef max
114 #define max(a,b) ((a)>(b)?(a):(b))
115 #endif
116 #ifndef min
117 #define min(a,b) ((a)<(b)?(a):(b))
118 #endif
119 #endif
121 #define UNREFERENCED_PARAMETER(P) {(P)=(P);}
122 #define UNREFERENCED_LOCAL_VARIABLE(L) {(L)=(L);}
123 #define DBG_UNREFERENCED_PARAMETER(P)
124 #define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
126 typedef unsigned long DWORD;
127 typedef int WINBOOL,*PWINBOOL,*LPWINBOOL;
128 /* FIXME: Is there a good solution to this? */
129 #ifndef XFree86Server
130 #ifndef __OBJC__
131 typedef WINBOOL BOOL;
132 #else
133 #define BOOL WINBOOL
134 #endif
135 typedef unsigned char BYTE;
136 #endif /* ndef XFree86Server */
137 typedef BOOL *PBOOL,*LPBOOL;
138 typedef unsigned short WORD;
139 typedef float FLOAT;
140 typedef FLOAT *PFLOAT;
141 typedef BYTE *PBYTE,*LPBYTE;
142 typedef int *PINT,*LPINT;
143 typedef WORD *PWORD,*LPWORD;
144 typedef long *LPLONG;
145 typedef DWORD *PDWORD,*LPDWORD;
146 typedef void *PVOID,*LPVOID;
147 typedef CONST void *PCVOID,*LPCVOID;
148 typedef int INT;
149 typedef unsigned int UINT,*PUINT,*LPUINT;
151 #include <winnt.h>
153 typedef UINT WPARAM;
154 typedef LONG LPARAM;
155 typedef LONG LRESULT;
156 #ifndef _HRESULT_DEFINED
157 typedef LONG HRESULT;
158 #define _HRESULT_DEFINED
159 #endif
160 #ifndef XFree86Server
161 typedef WORD ATOM;
162 #endif /* XFree86Server */
163 typedef HANDLE HGLOBAL;
164 typedef HANDLE HLOCAL;
165 typedef HANDLE GLOBALHANDLE;
166 typedef HANDLE LOCALHANDLE;
167 typedef void *HGDIOBJ;
168 DECLARE_HANDLE(HACCEL);
169 DECLARE_HANDLE(HBITMAP);
170 DECLARE_HANDLE(HBRUSH);
171 DECLARE_HANDLE(HCOLORSPACE);
172 DECLARE_HANDLE(HDC);
173 DECLARE_HANDLE(HGLRC);
174 DECLARE_HANDLE(HDESK);
175 DECLARE_HANDLE(HENHMETAFILE);
176 DECLARE_HANDLE(HFONT);
177 DECLARE_HANDLE(HICON);
178 DECLARE_HANDLE(HKEY);
179 /* FIXME: How to handle these. SM_CMONITORS etc in winuser.h also. */
180 /* #if (WINVER >= 0x0500) */
181 DECLARE_HANDLE(HMONITOR);
182 #define HMONITOR_DECLARED 1
183 DECLARE_HANDLE(HTERMINAL);
184 DECLARE_HANDLE(HWINEVENTHOOK);
185 /* #endif */
186 typedef HKEY *PHKEY;
187 DECLARE_HANDLE(HMENU);
188 DECLARE_HANDLE(HMETAFILE);
189 DECLARE_HANDLE(HINSTANCE);
190 typedef HINSTANCE HMODULE;
191 DECLARE_HANDLE(HPALETTE);
192 DECLARE_HANDLE(HPEN);
193 DECLARE_HANDLE(HRGN);
194 DECLARE_HANDLE(HRSRC);
195 DECLARE_HANDLE(HSTR);
196 DECLARE_HANDLE(HTASK);
197 DECLARE_HANDLE(HWND);
198 DECLARE_HANDLE(HWINSTA);
199 DECLARE_HANDLE(HKL);
200 typedef int HFILE;
201 typedef HICON HCURSOR;
202 typedef DWORD COLORREF;
203 typedef int (WINAPI *FARPROC)(void);
204 typedef int (WINAPI *NEARPROC)(void);
205 typedef int (WINAPI *PROC)(void);
206 typedef struct tagRECT {
207 LONG left;
208 LONG top;
209 LONG right;
210 LONG bottom;
211 } RECT,*PRECT,*LPRECT;
212 typedef const RECT *LPCRECT;
213 typedef struct tagRECTL {
214 LONG left;
215 LONG top;
216 LONG right;
217 LONG bottom;
218 } RECTL,*PRECTL,*LPRECTL;
219 typedef const RECTL *LPCRECTL;
220 typedef struct tagPOINT {
221 LONG x;
222 LONG y;
223 } POINT,POINTL,*PPOINT,*LPPOINT,*PPOINTL,*LPPOINTL;
224 typedef struct tagSIZE {
225 LONG cx;
226 LONG cy;
227 } SIZE,SIZEL,*PSIZE,*LPSIZE,*PSIZEL,*LPSIZEL;
228 typedef struct tagPOINTS {
229 SHORT x;
230 SHORT y;
231 } POINTS,*PPOINTS,*LPPOINTS;
233 #ifdef __cplusplus
235 #endif
236 #endif