Reactos
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
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#include <minwindef.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#ifndef WINVER
24#define WINVER 0x0502
25#endif
26
27#ifdef __GNUC__
28#define PACKED __attribute__((packed))
29#ifndef __declspec
30#define __declspec(e) __attribute__((e))
31#endif
32#ifndef _declspec
33#define _declspec(e) __attribute__((e))
34#endif
35#elif defined(__WATCOMC__)
36#define PACKED
37#else
38#define PACKED
39#endif
40
41typedef unsigned int *LPUINT; // FIXME: not in native headers
42
43
44// HACK for MinGW headers
45typedef int WINBOOL;
46
47#ifndef _HRESULT_DEFINED
48typedef LONG HRESULT;
49#define _HRESULT_DEFINED
50#endif
51#ifndef WIN_INTERNAL
52DECLARE_HANDLE (HWND);
53//DECLARE_HANDLE (HHOOK);
54#ifdef WINABLE
55DECLARE_HANDLE (HEVENT);
56#endif
57#endif
58
59typedef void *HGDIOBJ;
60
61DECLARE_HANDLE(HACCEL);
62DECLARE_HANDLE(HBITMAP);
63DECLARE_HANDLE(HBRUSH);
64DECLARE_HANDLE(HCOLORSPACE);
65DECLARE_HANDLE(HDC);
66DECLARE_HANDLE(HGLRC);
67DECLARE_HANDLE(HDESK);
68DECLARE_HANDLE(HENHMETAFILE);
69DECLARE_HANDLE(HFONT);
70DECLARE_HANDLE(HICON);
71DECLARE_HANDLE(HMENU);
72DECLARE_HANDLE(HPALETTE);
73DECLARE_HANDLE(HPEN);
74DECLARE_HANDLE(HMONITOR);
75DECLARE_HANDLE(HWINEVENTHOOK);
76DECLARE_HANDLE(HUMPD);
77
78DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
79
80typedef enum DPI_AWARENESS {
81 DPI_AWARENESS_INVALID = -1,
82 DPI_AWARENESS_UNAWARE = 0,
83 DPI_AWARENESS_SYSTEM_AWARE,
84 DPI_AWARENESS_PER_MONITOR_AWARE
85} DPI_AWARENESS;
86
87#define DPI_AWARENESS_CONTEXT_UNAWARE ((DPI_AWARENESS_CONTEXT)-1)
88#define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ((DPI_AWARENESS_CONTEXT)-2)
89#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ((DPI_AWARENESS_CONTEXT)-3)
90#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((DPI_AWARENESS_CONTEXT)-4)
91#define DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ((DPI_AWARENESS_CONTEXT)-5)
92
93typedef enum DPI_HOSTING_BEHAVIOR {
94 DPI_HOSTING_BEHAVIOR_INVALID = -1,
95 DPI_HOSTING_BEHAVIOR_DEFAULT = 0,
96 DPI_HOSTING_BEHAVIOR_MIXED = 1
97} DPI_HOSTING_BEHAVIOR;
98
99typedef HICON HCURSOR;
100typedef DWORD COLORREF;
101typedef DWORD *LPCOLORREF;
102
103#define HFILE_ERROR ((HFILE)-1)
104
105typedef struct tagRECT {
106 LONG left;
107 LONG top;
108 LONG right;
109 LONG bottom;
110} RECT,*PRECT,*NPRECT,*LPRECT;
111
112typedef const RECT *LPCRECT;
113
114typedef struct _RECTL {
115 LONG left;
116 LONG top;
117 LONG right;
118 LONG bottom;
119} RECTL,*PRECTL,*LPRECTL;
120
121typedef const RECTL *LPCRECTL;
122
123typedef struct tagPOINT {
124 LONG x;
125 LONG y;
126} POINT,*PPOINT,*NPPOINT,*LPPOINT;
127
128typedef struct _POINTL {
129 LONG x;
130 LONG y;
131} POINTL,*PPOINTL;
132
133typedef struct tagSIZE {
134 LONG cx;
135 LONG cy;
136} SIZE,*PSIZE,*LPSIZE;
137
138typedef SIZE SIZEL;
139typedef SIZE *PSIZEL,*LPSIZEL;
140
141typedef struct tagPOINTS {
142 SHORT x;
143 SHORT y;
144} POINTS,*PPOINTS,*LPPOINTS;
145
146#define DM_UPDATE 1
147#define DM_COPY 2
148#define DM_PROMPT 4
149#define DM_MODIFY 8
150
151#define DM_IN_BUFFER DM_MODIFY
152#define DM_IN_PROMPT DM_PROMPT
153#define DM_OUT_BUFFER DM_COPY
154#define DM_OUT_DEFAULT DM_UPDATE
155
156#define DC_FIELDS 1
157#define DC_PAPERS 2
158#define DC_PAPERSIZE 3
159#define DC_MINEXTENT 4
160#define DC_MAXEXTENT 5
161#define DC_BINS 6
162#define DC_DUPLEX 7
163#define DC_SIZE 8
164#define DC_EXTRA 9
165#define DC_VERSION 10
166#define DC_DRIVER 11
167#define DC_BINNAMES 12
168#define DC_ENUMRESOLUTIONS 13
169#define DC_FILEDEPENDENCIES 14
170#define DC_TRUETYPE 15
171#define DC_PAPERNAMES 16
172#define DC_ORIENTATION 17
173#define DC_COPIES 18
174
175/* needed by header files generated by WIDL */
176#ifdef __WINESRC__
177#define WINE_NO_UNICODE_MACROS
178#endif
179
180#ifdef WINE_NO_UNICODE_MACROS
181# define WINELIB_NAME_AW(func) \
182 func##_must_be_suffixed_with_W_or_A_in_this_context \
183 func##_must_be_suffixed_with_W_or_A_in_this_context
184#else /* WINE_NO_UNICODE_MACROS */
185# ifdef UNICODE
186# define WINELIB_NAME_AW(func) func##W
187# else
188# define WINELIB_NAME_AW(func) func##A
189# endif
190#endif /* WINE_NO_UNICODE_MACROS */
191
192#ifdef WINE_NO_UNICODE_MACROS
193# define DECL_WINELIB_TYPE_AW(type) /* nothing */
194#else
195# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
196#endif
197
198#ifndef __WATCOMC__
199#ifndef _export
200#define _export
201#endif
202#ifndef __export
203#define __export
204#endif
205#endif
206
207#if 0
208#ifdef __GNUC__
209#define PACKED __attribute__((packed))
210//#ifndef _fastcall
211//#define _fastcall __attribute__((fastcall))
212//#endif
213//#ifndef __fastcall
214//#define __fastcall __attribute__((fastcall))
215//#endif
216//#ifndef _stdcall
217//#define _stdcall __attribute__((stdcall))
218//#endif
219//#ifndef __stdcall
220//#define __stdcall __attribute__((stdcall))
221//#endif
222//#ifndef _cdecl
223//#define _cdecl __attribute__((cdecl))
224//#endif
225//#ifndef __cdecl
226//#define __cdecl __attribute__((cdecl))
227//#endif
228#ifndef __declspec
229#define __declspec(e) __attribute__((e))
230#endif
231#ifndef _declspec
232#define _declspec(e) __attribute__((e))
233#endif
234#elif defined(__WATCOMC__)
235#define PACKED
236#else
237#define PACKED
238#define _cdecl
239#define __cdecl
240#endif
241#endif
242
243#if 1 // needed by shlwapi.h
244#ifndef __ms_va_list
245# if defined(__x86_64__) && defined (__GNUC__)
246# define __ms_va_list __builtin_ms_va_list
247# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
248# define __ms_va_end(list) __builtin_ms_va_end(list)
249# else
250# define __ms_va_list va_list
251# define __ms_va_start(list,arg) va_start(list,arg)
252# define __ms_va_end(list) va_end(list)
253# endif
254#endif
255#endif
256
257#ifdef _MSC_VER
258#pragma warning(pop)
259#endif
260
261#ifdef __cplusplus
262}
263#endif
264
265#endif /* _WINDEF_ */
266