VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/windef.h@ 53201

Last change on this file since 53201 was 53201, checked in by vboxsync, 11 years ago

Devices/Main: vmsvga updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.8 KB
Line 
1/*
2 * Basic types definitions
3 *
4 * Copyright 1996 Alexandre Julliard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#ifndef _WINDEF_
22#define _WINDEF_
23
24#ifndef WINVER
25#define WINVER 0x0500
26#endif
27
28#ifndef NO_STRICT
29# ifndef STRICT
30# define STRICT
31# endif /* STRICT */
32#endif /* NO_STRICT */
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38/* Calling conventions definitions */
39
40#if (defined(__x86_64__) || defined(__powerpc64__) || defined(__sparc64__) || defined(__aarch64__)) && !defined(_WIN64)
41#define _WIN64
42#endif
43
44#ifndef _WIN64
45# if defined(__i386__) && !defined(_X86_)
46# define _X86_
47# endif
48# if defined(_X86_) && !defined(__i386__)
49# define __i386__
50# endif
51#endif
52
53#ifndef __stdcall
54# ifdef __i386__
55# ifdef __GNUC__
56# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__)
57# define __stdcall __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__))
58# else
59# define __stdcall __attribute__((__stdcall__))
60# endif
61# elif defined(_MSC_VER)
62 /* Nothing needs to be done. __stdcall already exists */
63# else
64# error You need to define __stdcall for your compiler
65# endif
66# elif defined(__x86_64__) && defined (__GNUC__)
67# define __stdcall __attribute__((ms_abi))
68# else /* __i386__ */
69# define __stdcall
70# endif /* __i386__ */
71#endif /* __stdcall */
72
73#ifndef __cdecl
74# if defined(__i386__) && defined(__GNUC__)
75# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__)
76# define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))
77# else
78# define __cdecl __attribute__((__cdecl__))
79# endif
80# elif defined(__x86_64__) && defined (__GNUC__)
81# define __cdecl __attribute__((ms_abi))
82# elif !defined(_MSC_VER)
83# define __cdecl
84# endif
85#endif /* __cdecl */
86
87#ifndef __ms_va_list
88# if defined(__x86_64__) && defined (__GNUC__)
89# define __ms_va_list __builtin_ms_va_list
90# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
91# define __ms_va_end(list) __builtin_ms_va_end(list)
92# else
93# define __ms_va_list va_list
94# define __ms_va_start(list,arg) va_start(list,arg)
95# define __ms_va_end(list) va_end(list)
96# endif
97#endif
98
99#ifdef __WINESRC__
100#define __ONLY_IN_WINELIB(x) do_not_use_this_in_wine
101#else
102#define __ONLY_IN_WINELIB(x) x
103#endif
104
105#ifndef pascal
106#define pascal __ONLY_IN_WINELIB(__stdcall)
107#endif
108#ifndef _pascal
109#define _pascal __ONLY_IN_WINELIB(__stdcall)
110#endif
111#ifndef _stdcall
112#define _stdcall __ONLY_IN_WINELIB(__stdcall)
113#endif
114#ifndef _fastcall
115#define _fastcall __ONLY_IN_WINELIB(__stdcall)
116#endif
117#ifndef __fastcall
118#define __fastcall __ONLY_IN_WINELIB(__stdcall)
119#endif
120#ifndef __export
121#define __export __ONLY_IN_WINELIB(__stdcall)
122#endif
123#ifndef cdecl
124#define cdecl __ONLY_IN_WINELIB(__cdecl)
125#endif
126#ifndef _cdecl
127#define _cdecl __ONLY_IN_WINELIB(__cdecl)
128#endif
129
130#ifndef near
131#define near __ONLY_IN_WINELIB(/* nothing */)
132#endif
133#ifndef far
134#define far __ONLY_IN_WINELIB(/* nothing */)
135#endif
136#ifndef _near
137#define _near __ONLY_IN_WINELIB(/* nothing */)
138#endif
139#ifndef _far
140#define _far __ONLY_IN_WINELIB(/* nothing */)
141#endif
142#ifndef NEAR
143#define NEAR __ONLY_IN_WINELIB(/* nothing */)
144#endif
145#ifndef FAR
146#define FAR __ONLY_IN_WINELIB(/* nothing */)
147#endif
148
149#ifndef _MSC_VER
150# ifndef _declspec
151# define _declspec(x) __ONLY_IN_WINELIB(/* nothing */)
152# endif
153# ifndef __declspec
154# define __declspec(x) __ONLY_IN_WINELIB(/* nothing */)
155# endif
156#endif
157
158#ifdef _MSC_VER
159# define inline __inline
160#endif
161
162#define CALLBACK __stdcall
163#define WINAPI __stdcall
164#define APIPRIVATE __stdcall
165#define PASCAL __stdcall
166#define CDECL __cdecl
167#define _CDECL __cdecl
168#define WINAPIV __cdecl
169#define APIENTRY WINAPI
170#define CONST __ONLY_IN_WINELIB(const)
171
172/* Misc. constants. */
173
174#undef NULL
175#ifdef __cplusplus
176#define NULL 0
177#else
178#define NULL ((void*)0)
179#endif
180
181#ifdef FALSE
182#undef FALSE
183#endif
184#define FALSE 0
185
186#ifdef TRUE
187#undef TRUE
188#endif
189#define TRUE 1
190
191#ifndef IN
192#define IN
193#endif
194
195#ifndef OUT
196#define OUT
197#endif
198
199#ifndef OPTIONAL
200#define OPTIONAL
201#endif
202
203/* Standard data types */
204
205typedef void *LPVOID;
206typedef const void *LPCVOID;
207typedef int BOOL, *PBOOL, *LPBOOL;
208typedef unsigned char BYTE, *PBYTE, *LPBYTE;
209typedef unsigned char UCHAR, *PUCHAR;
210typedef unsigned short WORD, *PWORD, *LPWORD;
211typedef unsigned short USHORT, *PUSHORT;
212typedef int INT, *PINT, *LPINT;
213typedef unsigned int UINT, *PUINT;
214typedef float FLOAT, *PFLOAT;
215typedef char *PSZ;
216#ifdef _MSC_VER
217typedef long *LPLONG;
218typedef unsigned long DWORD, *PDWORD, *LPDWORD;
219typedef unsigned long ULONG, *PULONG;
220#else
221typedef int *LPLONG;
222typedef unsigned int DWORD, *PDWORD, *LPDWORD;
223typedef unsigned int ULONG, *PULONG;
224#endif
225
226/* Macros to map Winelib names to the correct implementation name */
227/* Note that Winelib is purely Win32. */
228
229#ifdef __WINESRC__
230#define WINE_NO_UNICODE_MACROS 1
231#define WINE_STRICT_PROTOTYPES 1
232#endif
233
234#ifdef WINE_NO_UNICODE_MACROS
235# define WINELIB_NAME_AW(func) \
236 func##_must_be_suffixed_with_W_or_A_in_this_context \
237 func##_must_be_suffixed_with_W_or_A_in_this_context
238#else /* WINE_NO_UNICODE_MACROS */
239# ifdef UNICODE
240# define WINELIB_NAME_AW(func) func##W
241# else
242# define WINELIB_NAME_AW(func) func##A
243# endif
244#endif /* WINE_NO_UNICODE_MACROS */
245
246#ifdef WINE_NO_UNICODE_MACROS
247# define DECL_WINELIB_TYPE_AW(type) /* nothing */
248#else
249# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
250#endif
251
252#include <winnt.h>
253
254/* Polymorphic types */
255
256typedef UINT_PTR WPARAM;
257typedef LONG_PTR LPARAM;
258typedef LONG_PTR LRESULT;
259
260/* Integer types */
261
262typedef WORD ATOM;
263typedef DWORD COLORREF, *LPCOLORREF;
264
265
266/* Handle types */
267
268typedef int HFILE;
269DECLARE_HANDLE(HACCEL);
270DECLARE_HANDLE(HBITMAP);
271DECLARE_HANDLE(HBRUSH);
272DECLARE_HANDLE(HCOLORSPACE);
273DECLARE_HANDLE(HDC);
274DECLARE_HANDLE(HDESK);
275DECLARE_HANDLE(HENHMETAFILE);
276DECLARE_HANDLE(HFONT);
277DECLARE_HANDLE(HGLRC);
278DECLARE_HANDLE(HHOOK);
279DECLARE_HANDLE(HICON);
280DECLARE_HANDLE(HINSTANCE);
281DECLARE_HANDLE(HKEY);
282typedef HKEY *PHKEY;
283DECLARE_HANDLE(HKL);
284DECLARE_HANDLE(HMENU);
285DECLARE_HANDLE(HMETAFILE);
286DECLARE_HANDLE(HMONITOR);
287DECLARE_HANDLE(HPALETTE);
288DECLARE_HANDLE(HPEN);
289DECLARE_HANDLE(HRGN);
290DECLARE_HANDLE(HRSRC);
291DECLARE_HANDLE(HTASK);
292DECLARE_HANDLE(HWINEVENTHOOK);
293DECLARE_HANDLE(HWINSTA);
294DECLARE_HANDLE(HWND);
295
296/* Handle types that must remain interchangeable even with strict on */
297
298typedef HINSTANCE HMODULE;
299typedef HANDLE HGDIOBJ;
300typedef HANDLE HGLOBAL;
301typedef HANDLE HLOCAL;
302typedef HANDLE GLOBALHANDLE;
303typedef HANDLE LOCALHANDLE;
304typedef HICON HCURSOR;
305
306/* Callback function pointers types */
307
308#ifdef WINE_STRICT_PROTOTYPES
309typedef INT_PTR (CALLBACK *FARPROC)(void);
310typedef INT_PTR (CALLBACK *NEARPROC)(void);
311typedef INT_PTR (CALLBACK *PROC)(void);
312#else
313typedef INT_PTR (CALLBACK *FARPROC)();
314typedef INT_PTR (CALLBACK *NEARPROC)();
315typedef INT_PTR (CALLBACK *PROC)();
316#endif
317
318/* Macros to split words and longs. */
319
320#define LOBYTE(w) ((BYTE)((DWORD_PTR)(w) & 0xFF))
321#define HIBYTE(w) ((BYTE)((DWORD_PTR)(w) >> 8))
322
323#define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xFFFF))
324#define HIWORD(l) ((WORD)((DWORD_PTR)(l) >> 16))
325
326#define MAKEWORD(low,high) ((WORD)(((BYTE)((DWORD_PTR)(low) & 0xFF)) | ((WORD)((BYTE)((DWORD_PTR)(high) & 0xFF))) << 8))
327#define MAKELONG(low,high) ((LONG)(((WORD)((DWORD_PTR)(low) & 0xFFFF)) | ((DWORD)((WORD)((DWORD_PTR)(high) & 0xFFFF))) << 16))
328
329/* min and max macros */
330#ifndef NOMINMAX
331#ifndef max
332#define max(a,b) (((a) > (b)) ? (a) : (b))
333#endif
334#ifndef min
335#define min(a,b) (((a) < (b)) ? (a) : (b))
336#endif
337#endif /* NOMINMAX */
338
339#ifdef MAX_PATH /* Work-around for Mingw */
340#undef MAX_PATH
341#endif /* MAX_PATH */
342
343#define MAX_PATH 260
344#define HFILE_ERROR ((HFILE)-1)
345
346/* The SIZE structure */
347typedef struct tagSIZE
348{
349 LONG cx;
350 LONG cy;
351} SIZE, *PSIZE, *LPSIZE;
352
353typedef SIZE SIZEL, *PSIZEL, *LPSIZEL;
354
355/* The POINT structure */
356typedef struct tagPOINT
357{
358 LONG x;
359 LONG y;
360} POINT, *PPOINT, *LPPOINT;
361
362typedef struct _POINTL
363{
364 LONG x;
365 LONG y;
366} POINTL, *PPOINTL;
367
368/* The POINTS structure */
369
370typedef struct tagPOINTS
371{
372#ifdef WORDS_BIGENDIAN
373 SHORT y;
374 SHORT x;
375#else
376 SHORT x;
377 SHORT y;
378#endif
379} POINTS, *PPOINTS, *LPPOINTS;
380
381typedef struct _FILETIME {
382#ifdef WORDS_BIGENDIAN
383 DWORD dwHighDateTime;
384 DWORD dwLowDateTime;
385#else
386 DWORD dwLowDateTime;
387 DWORD dwHighDateTime;
388#endif
389} FILETIME, *PFILETIME, *LPFILETIME;
390#define _FILETIME_
391
392/* The RECT structure */
393typedef struct tagRECT
394{
395 LONG left;
396 LONG top;
397 LONG right;
398 LONG bottom;
399} RECT, *PRECT, *LPRECT;
400typedef const RECT *LPCRECT;
401
402typedef struct _RECTL
403{
404 LONG left;
405 LONG top;
406 LONG right;
407 LONG bottom;
408} RECTL, *PRECTL, *LPRECTL;
409
410typedef const RECTL *LPCRECTL;
411
412#ifdef __cplusplus
413}
414#endif
415
416#endif /* _WINDEF_ */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette