1999-03-14 16:35:05 +00:00
|
|
|
/*
|
|
|
|
* Basic types definitions
|
|
|
|
*
|
|
|
|
* Copyright 1996 Alexandre Julliard
|
2002-03-09 23:29:33 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1999-03-14 16:35:05 +00:00
|
|
|
*/
|
1999-02-09 15:46:25 +00:00
|
|
|
|
2004-09-20 19:13:16 +00:00
|
|
|
#ifndef _WINDEF_
|
|
|
|
#define _WINDEF_
|
1999-02-09 15:46:25 +00:00
|
|
|
|
2002-10-23 20:19:48 +00:00
|
|
|
#ifndef WINVER
|
2000-10-13 17:10:34 +00:00
|
|
|
#define WINVER 0x0500
|
2002-10-23 20:19:48 +00:00
|
|
|
#endif
|
2000-10-13 17:10:34 +00:00
|
|
|
|
2002-12-10 20:02:17 +00:00
|
|
|
#ifndef NO_STRICT
|
|
|
|
# ifndef STRICT
|
|
|
|
# define STRICT
|
|
|
|
# endif /* STRICT */
|
|
|
|
#endif /* NO_STRICT */
|
|
|
|
|
2020-11-05 01:29:28 +00:00
|
|
|
#ifndef __has_attribute
|
|
|
|
#define __has_attribute(x) 0
|
|
|
|
#endif
|
|
|
|
|
2002-12-10 22:56:43 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Calling conventions definitions */
|
|
|
|
|
2017-05-04 06:16:17 +00:00
|
|
|
#if (defined(__x86_64__) || defined(__powerpc64__) || defined(__aarch64__)) && !defined(_WIN64)
|
2005-09-22 10:58:04 +00:00
|
|
|
#define _WIN64
|
|
|
|
#endif
|
|
|
|
|
2008-12-09 16:42:13 +00:00
|
|
|
#ifndef _WIN64
|
|
|
|
# if defined(__i386__) && !defined(_X86_)
|
|
|
|
# define _X86_
|
|
|
|
# endif
|
|
|
|
# if defined(_X86_) && !defined(__i386__)
|
|
|
|
# define __i386__
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2023-05-30 10:11:51 +00:00
|
|
|
#if !defined(_MSC_VER) && !defined(__MINGW32__)
|
2020-11-26 15:01:49 +00:00
|
|
|
# undef __stdcall
|
2003-01-15 03:31:49 +00:00
|
|
|
# ifdef __i386__
|
|
|
|
# ifdef __GNUC__
|
2012-12-15 15:49:47 +00:00
|
|
|
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__)
|
2006-06-09 02:57:42 +00:00
|
|
|
# define __stdcall __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__))
|
|
|
|
# else
|
|
|
|
# define __stdcall __attribute__((__stdcall__))
|
|
|
|
# endif
|
2003-01-15 03:31:49 +00:00
|
|
|
# else
|
|
|
|
# error You need to define __stdcall for your compiler
|
|
|
|
# endif
|
2008-11-25 08:09:47 +00:00
|
|
|
# elif defined(__x86_64__) && defined (__GNUC__)
|
2020-11-05 01:29:28 +00:00
|
|
|
# if __has_attribute(__force_align_arg_pointer__)
|
2016-01-27 15:35:29 +00:00
|
|
|
# define __stdcall __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__))
|
|
|
|
# else
|
|
|
|
# define __stdcall __attribute__((ms_abi))
|
|
|
|
# endif
|
2023-05-30 10:11:51 +00:00
|
|
|
# elif defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(__CYGWIN__)
|
2017-11-02 09:22:56 +00:00
|
|
|
# define __stdcall __attribute__((pcs("aapcs-vfp")))
|
2020-12-20 22:38:46 +00:00
|
|
|
# elif defined(__aarch64__) && defined (__GNUC__) && __has_attribute(ms_abi)
|
2018-05-09 20:34:57 +00:00
|
|
|
# define __stdcall __attribute__((ms_abi))
|
2003-01-15 03:31:49 +00:00
|
|
|
# else /* __i386__ */
|
|
|
|
# define __stdcall
|
|
|
|
# endif /* __i386__ */
|
2020-11-26 15:01:49 +00:00
|
|
|
# undef __cdecl
|
2003-01-15 03:31:49 +00:00
|
|
|
# if defined(__i386__) && defined(__GNUC__)
|
2020-11-26 15:01:49 +00:00
|
|
|
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__)
|
2006-06-09 02:57:42 +00:00
|
|
|
# define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))
|
|
|
|
# else
|
|
|
|
# define __cdecl __attribute__((__cdecl__))
|
|
|
|
# endif
|
2020-06-17 13:09:34 +00:00
|
|
|
# else
|
2020-11-26 15:01:49 +00:00
|
|
|
# define __cdecl __stdcall
|
2002-12-10 22:56:43 +00:00
|
|
|
# endif
|
2023-05-30 10:11:51 +00:00
|
|
|
# ifndef __fastcall
|
|
|
|
# define __fastcall __stdcall
|
|
|
|
# endif
|
|
|
|
# ifndef __thiscall
|
|
|
|
# define __thiscall __stdcall
|
|
|
|
# endif
|
|
|
|
#endif /* _MSC_VER || __MINGW32__ */
|
2019-05-16 11:53:33 +00:00
|
|
|
|
2008-12-31 19:46:08 +00:00
|
|
|
#ifndef __ms_va_list
|
2020-12-20 22:38:46 +00:00
|
|
|
# if (defined(__x86_64__) || (defined(__aarch64__) && __has_attribute(ms_abi))) && defined (__GNUC__)
|
2008-12-31 19:46:08 +00:00
|
|
|
# define __ms_va_list __builtin_ms_va_list
|
|
|
|
# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
|
|
|
|
# define __ms_va_end(list) __builtin_ms_va_end(list)
|
2014-12-04 22:40:51 +00:00
|
|
|
# define __ms_va_copy(dest,src) __builtin_ms_va_copy(dest,src)
|
2008-12-31 19:46:08 +00:00
|
|
|
# else
|
|
|
|
# define __ms_va_list va_list
|
|
|
|
# define __ms_va_start(list,arg) va_start(list,arg)
|
|
|
|
# define __ms_va_end(list) va_end(list)
|
2014-12-04 22:40:51 +00:00
|
|
|
# ifdef va_copy
|
|
|
|
# define __ms_va_copy(dest,src) va_copy(dest,src)
|
|
|
|
# else
|
|
|
|
# define __ms_va_copy(dest,src) ((dest) = (src))
|
|
|
|
# endif
|
2008-12-31 19:46:08 +00:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2021-10-14 09:07:56 +00:00
|
|
|
#if defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(__MINGW32__) && !defined(__CYGWIN__)
|
2017-11-02 09:22:56 +00:00
|
|
|
# define WINAPIV __attribute__((pcs("aapcs")))
|
|
|
|
#else
|
|
|
|
# define WINAPIV __cdecl
|
|
|
|
#endif
|
|
|
|
|
2003-08-27 02:07:02 +00:00
|
|
|
#ifdef __WINESRC__
|
|
|
|
#define __ONLY_IN_WINELIB(x) do_not_use_this_in_wine
|
|
|
|
#else
|
|
|
|
#define __ONLY_IN_WINELIB(x) x
|
|
|
|
#endif
|
2002-12-10 22:56:43 +00:00
|
|
|
|
2020-04-23 13:40:44 +00:00
|
|
|
#ifndef _MSC_VER
|
2002-12-10 22:56:43 +00:00
|
|
|
#ifndef _stdcall
|
2003-08-27 02:07:02 +00:00
|
|
|
#define _stdcall __ONLY_IN_WINELIB(__stdcall)
|
2002-12-10 22:56:43 +00:00
|
|
|
#endif
|
|
|
|
#ifndef _fastcall
|
2003-08-27 02:07:02 +00:00
|
|
|
#define _fastcall __ONLY_IN_WINELIB(__stdcall)
|
2002-12-10 22:56:43 +00:00
|
|
|
#endif
|
|
|
|
#ifndef __fastcall
|
2003-08-27 02:07:02 +00:00
|
|
|
#define __fastcall __ONLY_IN_WINELIB(__stdcall)
|
2002-12-10 22:56:43 +00:00
|
|
|
#endif
|
|
|
|
#ifndef cdecl
|
2003-08-27 02:07:02 +00:00
|
|
|
#define cdecl __ONLY_IN_WINELIB(__cdecl)
|
2002-12-10 22:56:43 +00:00
|
|
|
#endif
|
|
|
|
#ifndef _cdecl
|
2003-08-27 02:07:02 +00:00
|
|
|
#define _cdecl __ONLY_IN_WINELIB(__cdecl)
|
2002-12-10 22:56:43 +00:00
|
|
|
#endif
|
2020-04-23 13:40:44 +00:00
|
|
|
#endif /* _MSC_VER */
|
2002-12-10 22:56:43 +00:00
|
|
|
|
2020-04-23 13:40:44 +00:00
|
|
|
#ifndef pascal
|
|
|
|
#define pascal __ONLY_IN_WINELIB(__stdcall)
|
|
|
|
#endif
|
|
|
|
#ifndef _pascal
|
|
|
|
#define _pascal __ONLY_IN_WINELIB(__stdcall)
|
|
|
|
#endif
|
|
|
|
#ifndef __export
|
|
|
|
#define __export __ONLY_IN_WINELIB(__stdcall)
|
|
|
|
#endif
|
2002-12-10 22:56:43 +00:00
|
|
|
#ifndef near
|
2005-11-08 16:13:21 +00:00
|
|
|
#define near __ONLY_IN_WINELIB(/* nothing */)
|
2002-12-10 22:56:43 +00:00
|
|
|
#endif
|
|
|
|
#ifndef far
|
2005-11-08 16:13:21 +00:00
|
|
|
#define far __ONLY_IN_WINELIB(/* nothing */)
|
2002-12-10 22:56:43 +00:00
|
|
|
#endif
|
|
|
|
#ifndef _near
|
2005-11-08 16:13:21 +00:00
|
|
|
#define _near __ONLY_IN_WINELIB(/* nothing */)
|
2002-12-10 22:56:43 +00:00
|
|
|
#endif
|
|
|
|
#ifndef _far
|
2005-11-08 16:13:21 +00:00
|
|
|
#define _far __ONLY_IN_WINELIB(/* nothing */)
|
2002-12-10 22:56:43 +00:00
|
|
|
#endif
|
|
|
|
#ifndef NEAR
|
2005-11-08 16:13:21 +00:00
|
|
|
#define NEAR __ONLY_IN_WINELIB(/* nothing */)
|
2002-12-10 22:56:43 +00:00
|
|
|
#endif
|
|
|
|
#ifndef FAR
|
2005-11-08 16:13:21 +00:00
|
|
|
#define FAR __ONLY_IN_WINELIB(/* nothing */)
|
2002-12-10 22:56:43 +00:00
|
|
|
#endif
|
|
|
|
|
2003-09-22 19:22:14 +00:00
|
|
|
#ifndef _MSC_VER
|
|
|
|
# ifndef _declspec
|
2005-11-08 16:13:21 +00:00
|
|
|
# define _declspec(x) __ONLY_IN_WINELIB(/* nothing */)
|
2003-09-22 19:22:14 +00:00
|
|
|
# endif
|
|
|
|
# ifndef __declspec
|
2005-11-08 16:13:21 +00:00
|
|
|
# define __declspec(x) __ONLY_IN_WINELIB(/* nothing */)
|
2003-09-22 19:22:14 +00:00
|
|
|
# endif
|
2002-12-10 22:56:43 +00:00
|
|
|
#endif
|
|
|
|
|
2005-10-04 11:30:27 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
# define inline __inline
|
|
|
|
#endif
|
|
|
|
|
2002-12-10 22:56:43 +00:00
|
|
|
#define CALLBACK __stdcall
|
|
|
|
#define WINAPI __stdcall
|
|
|
|
#define APIPRIVATE __stdcall
|
|
|
|
#define PASCAL __stdcall
|
|
|
|
#define CDECL __cdecl
|
|
|
|
#define _CDECL __cdecl
|
|
|
|
#define APIENTRY WINAPI
|
2013-09-27 07:59:20 +00:00
|
|
|
#define CONST __ONLY_IN_WINELIB(const)
|
1999-03-14 16:35:05 +00:00
|
|
|
|
2002-12-10 22:56:43 +00:00
|
|
|
/* Misc. constants. */
|
1999-03-14 16:35:05 +00:00
|
|
|
|
2002-12-10 22:56:43 +00:00
|
|
|
#undef NULL
|
2000-12-19 04:51:10 +00:00
|
|
|
#ifdef __cplusplus
|
2002-12-10 22:56:43 +00:00
|
|
|
#define NULL 0
|
|
|
|
#else
|
|
|
|
#define NULL ((void*)0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef FALSE
|
|
|
|
#undef FALSE
|
2000-12-19 04:51:10 +00:00
|
|
|
#endif
|
2002-12-10 22:56:43 +00:00
|
|
|
#define FALSE 0
|
2000-12-19 04:51:10 +00:00
|
|
|
|
2002-12-10 22:56:43 +00:00
|
|
|
#ifdef TRUE
|
|
|
|
#undef TRUE
|
|
|
|
#endif
|
|
|
|
#define TRUE 1
|
|
|
|
|
|
|
|
#ifndef IN
|
|
|
|
#define IN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef OUT
|
|
|
|
#define OUT
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef OPTIONAL
|
|
|
|
#define OPTIONAL
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Standard data types */
|
|
|
|
|
2020-04-23 02:07:18 +00:00
|
|
|
#ifndef BASETYPES
|
|
|
|
#define BASETYPES
|
|
|
|
typedef unsigned char UCHAR, *PUCHAR;
|
|
|
|
typedef unsigned short USHORT, *PUSHORT;
|
2022-01-21 17:28:43 +00:00
|
|
|
#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES)
|
2020-04-23 02:07:18 +00:00
|
|
|
typedef unsigned long ULONG, *PULONG;
|
|
|
|
#else
|
|
|
|
typedef unsigned int ULONG, *PULONG;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2002-12-10 22:56:43 +00:00
|
|
|
typedef void *LPVOID;
|
|
|
|
typedef const void *LPCVOID;
|
|
|
|
typedef int BOOL, *PBOOL, *LPBOOL;
|
|
|
|
typedef unsigned char BYTE, *PBYTE, *LPBYTE;
|
|
|
|
typedef unsigned short WORD, *PWORD, *LPWORD;
|
|
|
|
typedef int INT, *PINT, *LPINT;
|
|
|
|
typedef unsigned int UINT, *PUINT;
|
2005-09-22 10:58:04 +00:00
|
|
|
typedef float FLOAT, *PFLOAT;
|
|
|
|
typedef char *PSZ;
|
2022-01-21 17:28:43 +00:00
|
|
|
#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES)
|
2002-12-10 22:56:43 +00:00
|
|
|
typedef long *LPLONG;
|
|
|
|
typedef unsigned long DWORD, *PDWORD, *LPDWORD;
|
2006-09-28 23:18:35 +00:00
|
|
|
#else
|
|
|
|
typedef int *LPLONG;
|
|
|
|
typedef unsigned int DWORD, *PDWORD, *LPDWORD;
|
2005-09-22 10:58:04 +00:00
|
|
|
#endif
|
2002-12-10 22:56:43 +00:00
|
|
|
|
1999-03-14 16:35:05 +00:00
|
|
|
/* Macros to map Winelib names to the correct implementation name */
|
|
|
|
/* Note that Winelib is purely Win32. */
|
|
|
|
|
2003-01-04 00:52:18 +00:00
|
|
|
#ifdef __WINESRC__
|
2009-10-06 10:30:49 +00:00
|
|
|
#define WINE_NO_UNICODE_MACROS 1
|
|
|
|
#define WINE_STRICT_PROTOTYPES 1
|
2005-08-15 20:53:40 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef WINE_NO_UNICODE_MACROS
|
1999-12-25 22:45:57 +00:00
|
|
|
# define WINELIB_NAME_AW(func) \
|
|
|
|
func##_must_be_suffixed_with_W_or_A_in_this_context \
|
|
|
|
func##_must_be_suffixed_with_W_or_A_in_this_context
|
2005-08-15 20:53:40 +00:00
|
|
|
#else /* WINE_NO_UNICODE_MACROS */
|
1999-03-14 16:35:05 +00:00
|
|
|
# ifdef UNICODE
|
|
|
|
# define WINELIB_NAME_AW(func) func##W
|
|
|
|
# else
|
|
|
|
# define WINELIB_NAME_AW(func) func##A
|
2005-08-15 20:53:40 +00:00
|
|
|
# endif
|
|
|
|
#endif /* WINE_NO_UNICODE_MACROS */
|
1999-03-14 16:35:05 +00:00
|
|
|
|
2005-08-15 20:53:40 +00:00
|
|
|
#ifdef WINE_NO_UNICODE_MACROS
|
1999-03-14 16:35:05 +00:00
|
|
|
# define DECL_WINELIB_TYPE_AW(type) /* nothing */
|
2005-08-15 20:53:40 +00:00
|
|
|
#else
|
1999-03-14 16:35:05 +00:00
|
|
|
# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
|
2005-08-15 20:53:40 +00:00
|
|
|
#endif
|
1999-03-14 16:35:05 +00:00
|
|
|
|
2003-09-24 05:26:00 +00:00
|
|
|
#include <winnt.h>
|
1999-04-25 11:05:30 +00:00
|
|
|
|
2003-01-10 01:45:13 +00:00
|
|
|
/* Polymorphic types */
|
|
|
|
|
|
|
|
typedef UINT_PTR WPARAM;
|
|
|
|
typedef LONG_PTR LPARAM;
|
|
|
|
typedef LONG_PTR LRESULT;
|
|
|
|
|
2001-07-30 18:57:18 +00:00
|
|
|
/* Integer types */
|
2003-01-10 01:45:13 +00:00
|
|
|
|
1999-03-14 16:35:05 +00:00
|
|
|
typedef WORD ATOM;
|
2001-10-08 20:31:59 +00:00
|
|
|
typedef DWORD COLORREF, *LPCOLORREF;
|
|
|
|
|
1999-02-12 13:44:38 +00:00
|
|
|
|
2002-12-10 22:56:43 +00:00
|
|
|
/* Handle types */
|
1999-03-14 16:35:05 +00:00
|
|
|
|
2001-07-30 18:57:18 +00:00
|
|
|
typedef int HFILE;
|
2018-03-26 17:27:08 +00:00
|
|
|
DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
|
2002-08-28 00:39:39 +00:00
|
|
|
DECLARE_HANDLE(HACCEL);
|
2002-10-19 17:20:02 +00:00
|
|
|
DECLARE_HANDLE(HBITMAP);
|
|
|
|
DECLARE_HANDLE(HBRUSH);
|
2000-12-29 03:40:55 +00:00
|
|
|
DECLARE_HANDLE(HCOLORSPACE);
|
2002-10-19 17:20:02 +00:00
|
|
|
DECLARE_HANDLE(HDC);
|
2001-07-30 18:57:18 +00:00
|
|
|
DECLARE_HANDLE(HDESK);
|
2002-07-29 00:14:59 +00:00
|
|
|
DECLARE_HANDLE(HENHMETAFILE);
|
2002-10-19 17:20:02 +00:00
|
|
|
DECLARE_HANDLE(HFONT);
|
2004-08-16 20:07:06 +00:00
|
|
|
DECLARE_HANDLE(HGLRC);
|
2002-07-28 17:42:05 +00:00
|
|
|
DECLARE_HANDLE(HHOOK);
|
2002-10-10 21:22:09 +00:00
|
|
|
DECLARE_HANDLE(HICON);
|
2002-10-19 17:20:02 +00:00
|
|
|
DECLARE_HANDLE(HINSTANCE);
|
2002-09-24 03:09:12 +00:00
|
|
|
DECLARE_HANDLE(HKEY);
|
2002-12-10 22:56:43 +00:00
|
|
|
typedef HKEY *PHKEY;
|
2002-08-16 01:34:19 +00:00
|
|
|
DECLARE_HANDLE(HKL);
|
2002-10-19 17:20:02 +00:00
|
|
|
DECLARE_HANDLE(HMENU);
|
2002-07-29 00:14:59 +00:00
|
|
|
DECLARE_HANDLE(HMETAFILE);
|
2002-07-19 00:28:13 +00:00
|
|
|
DECLARE_HANDLE(HMONITOR);
|
2002-08-29 01:55:55 +00:00
|
|
|
DECLARE_HANDLE(HPALETTE);
|
2002-10-19 17:20:02 +00:00
|
|
|
DECLARE_HANDLE(HPEN);
|
|
|
|
DECLARE_HANDLE(HRGN);
|
2002-09-16 22:47:05 +00:00
|
|
|
DECLARE_HANDLE(HRSRC);
|
2002-07-28 23:48:27 +00:00
|
|
|
DECLARE_HANDLE(HTASK);
|
2002-07-10 23:20:49 +00:00
|
|
|
DECLARE_HANDLE(HWINEVENTHOOK);
|
2001-01-09 20:56:06 +00:00
|
|
|
DECLARE_HANDLE(HWINSTA);
|
2002-09-06 20:40:42 +00:00
|
|
|
DECLARE_HANDLE(HWND);
|
1999-03-14 16:35:05 +00:00
|
|
|
|
1999-04-25 11:05:30 +00:00
|
|
|
/* Handle types that must remain interchangeable even with strict on */
|
|
|
|
|
|
|
|
typedef HINSTANCE HMODULE;
|
|
|
|
typedef HANDLE HGDIOBJ;
|
|
|
|
typedef HANDLE HGLOBAL;
|
|
|
|
typedef HANDLE HLOCAL;
|
2000-03-19 14:21:38 +00:00
|
|
|
typedef HANDLE GLOBALHANDLE;
|
|
|
|
typedef HANDLE LOCALHANDLE;
|
2000-11-10 22:32:45 +00:00
|
|
|
typedef HICON HCURSOR;
|
1999-04-25 11:05:30 +00:00
|
|
|
|
1999-03-14 16:35:05 +00:00
|
|
|
/* Callback function pointers types */
|
|
|
|
|
2009-10-06 10:30:49 +00:00
|
|
|
#ifdef WINE_STRICT_PROTOTYPES
|
|
|
|
typedef INT_PTR (CALLBACK *FARPROC)(void);
|
|
|
|
typedef INT_PTR (CALLBACK *NEARPROC)(void);
|
|
|
|
typedef INT_PTR (CALLBACK *PROC)(void);
|
|
|
|
#else
|
2006-06-03 15:27:33 +00:00
|
|
|
typedef INT_PTR (CALLBACK *FARPROC)();
|
|
|
|
typedef INT_PTR (CALLBACK *NEARPROC)();
|
|
|
|
typedef INT_PTR (CALLBACK *PROC)();
|
2009-10-06 10:30:49 +00:00
|
|
|
#endif
|
1999-02-12 13:44:38 +00:00
|
|
|
|
1999-03-14 16:35:05 +00:00
|
|
|
/* Macros to split words and longs. */
|
|
|
|
|
2005-08-23 09:36:34 +00:00
|
|
|
#define LOBYTE(w) ((BYTE)((DWORD_PTR)(w) & 0xFF))
|
|
|
|
#define HIBYTE(w) ((BYTE)((DWORD_PTR)(w) >> 8))
|
1999-03-14 16:35:05 +00:00
|
|
|
|
2005-08-23 09:36:34 +00:00
|
|
|
#define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xFFFF))
|
|
|
|
#define HIWORD(l) ((WORD)((DWORD_PTR)(l) >> 16))
|
1999-03-14 16:35:05 +00:00
|
|
|
|
2005-08-23 09:36:34 +00:00
|
|
|
#define MAKEWORD(low,high) ((WORD)(((BYTE)((DWORD_PTR)(low) & 0xFF)) | ((WORD)((BYTE)((DWORD_PTR)(high) & 0xFF))) << 8))
|
|
|
|
#define MAKELONG(low,high) ((LONG)(((WORD)((DWORD_PTR)(low) & 0xFFFF)) | ((DWORD)((WORD)((DWORD_PTR)(high) & 0xFFFF))) << 16))
|
1999-03-14 16:35:05 +00:00
|
|
|
|
2000-03-25 21:44:35 +00:00
|
|
|
/* min and max macros */
|
2001-05-07 20:14:00 +00:00
|
|
|
#ifndef NOMINMAX
|
1999-07-10 13:16:29 +00:00
|
|
|
#ifndef max
|
2000-03-25 21:44:35 +00:00
|
|
|
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
1999-07-10 13:16:29 +00:00
|
|
|
#endif
|
|
|
|
#ifndef min
|
2000-03-25 21:44:35 +00:00
|
|
|
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
1999-07-10 13:16:29 +00:00
|
|
|
#endif
|
2001-05-07 20:14:00 +00:00
|
|
|
#endif /* NOMINMAX */
|
1999-03-14 16:35:05 +00:00
|
|
|
|
2002-09-12 20:43:24 +00:00
|
|
|
#ifdef MAX_PATH /* Work-around for Mingw */
|
|
|
|
#undef MAX_PATH
|
|
|
|
#endif /* MAX_PATH */
|
|
|
|
|
2002-05-01 18:13:18 +00:00
|
|
|
#define MAX_PATH 260
|
1999-03-14 16:35:05 +00:00
|
|
|
#define HFILE_ERROR ((HFILE)-1)
|
1999-02-09 15:46:25 +00:00
|
|
|
|
1999-03-14 16:35:05 +00:00
|
|
|
/* The SIZE structure */
|
|
|
|
typedef struct tagSIZE
|
|
|
|
{
|
2000-09-19 02:43:00 +00:00
|
|
|
LONG cx;
|
|
|
|
LONG cy;
|
1999-03-14 16:35:05 +00:00
|
|
|
} SIZE, *PSIZE, *LPSIZE;
|
|
|
|
|
|
|
|
typedef SIZE SIZEL, *PSIZEL, *LPSIZEL;
|
|
|
|
|
|
|
|
/* The POINT structure */
|
|
|
|
typedef struct tagPOINT
|
|
|
|
{
|
|
|
|
LONG x;
|
|
|
|
LONG y;
|
|
|
|
} POINT, *PPOINT, *LPPOINT;
|
1999-02-13 09:13:49 +00:00
|
|
|
|
|
|
|
typedef struct _POINTL
|
|
|
|
{
|
1999-03-14 16:35:05 +00:00
|
|
|
LONG x;
|
|
|
|
LONG y;
|
2004-06-01 19:45:59 +00:00
|
|
|
} POINTL, *PPOINTL;
|
1999-02-13 09:13:49 +00:00
|
|
|
|
1999-03-14 16:35:05 +00:00
|
|
|
/* The POINTS structure */
|
|
|
|
|
|
|
|
typedef struct tagPOINTS
|
|
|
|
{
|
2005-06-17 09:50:48 +00:00
|
|
|
#ifdef WORDS_BIGENDIAN
|
|
|
|
SHORT y;
|
|
|
|
SHORT x;
|
|
|
|
#else
|
2000-09-26 22:20:14 +00:00
|
|
|
SHORT x;
|
|
|
|
SHORT y;
|
2005-06-17 09:50:48 +00:00
|
|
|
#endif
|
1999-03-14 16:35:05 +00:00
|
|
|
} POINTS, *PPOINTS, *LPPOINTS;
|
|
|
|
|
2006-08-23 07:12:47 +00:00
|
|
|
typedef struct _FILETIME {
|
|
|
|
#ifdef WORDS_BIGENDIAN
|
|
|
|
DWORD dwHighDateTime;
|
|
|
|
DWORD dwLowDateTime;
|
|
|
|
#else
|
|
|
|
DWORD dwLowDateTime;
|
|
|
|
DWORD dwHighDateTime;
|
|
|
|
#endif
|
|
|
|
} FILETIME, *PFILETIME, *LPFILETIME;
|
|
|
|
#define _FILETIME_
|
|
|
|
|
1999-03-14 16:35:05 +00:00
|
|
|
/* The RECT structure */
|
|
|
|
typedef struct tagRECT
|
|
|
|
{
|
2003-01-08 21:09:25 +00:00
|
|
|
LONG left;
|
|
|
|
LONG top;
|
|
|
|
LONG right;
|
|
|
|
LONG bottom;
|
1999-03-14 16:35:05 +00:00
|
|
|
} RECT, *PRECT, *LPRECT;
|
|
|
|
typedef const RECT *LPCRECT;
|
|
|
|
|
2004-06-25 01:18:10 +00:00
|
|
|
typedef struct _RECTL
|
1999-03-14 16:35:05 +00:00
|
|
|
{
|
|
|
|
LONG left;
|
2001-10-08 20:31:59 +00:00
|
|
|
LONG top;
|
1999-03-14 16:35:05 +00:00
|
|
|
LONG right;
|
|
|
|
LONG bottom;
|
|
|
|
} RECTL, *PRECTL, *LPRECTL;
|
|
|
|
|
|
|
|
typedef const RECTL *LPCRECTL;
|
|
|
|
|
2018-03-30 10:33:14 +00:00
|
|
|
/* DPI awareness */
|
|
|
|
typedef enum DPI_AWARENESS
|
|
|
|
{
|
|
|
|
DPI_AWARENESS_INVALID = -1,
|
|
|
|
DPI_AWARENESS_UNAWARE = 0,
|
|
|
|
DPI_AWARENESS_SYSTEM_AWARE,
|
|
|
|
DPI_AWARENESS_PER_MONITOR_AWARE
|
|
|
|
} DPI_AWARENESS;
|
|
|
|
|
|
|
|
#define DPI_AWARENESS_CONTEXT_UNAWARE ((DPI_AWARENESS_CONTEXT)-1)
|
|
|
|
#define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ((DPI_AWARENESS_CONTEXT)-2)
|
|
|
|
#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ((DPI_AWARENESS_CONTEXT)-3)
|
|
|
|
#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((DPI_AWARENESS_CONTEXT)-4)
|
2018-12-11 14:36:27 +00:00
|
|
|
#define DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ((DPI_AWARENESS_CONTEXT)-5)
|
2018-03-30 10:33:14 +00:00
|
|
|
|
1999-03-14 16:35:05 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
1999-02-13 09:13:49 +00:00
|
|
|
|
2004-09-20 19:13:16 +00:00
|
|
|
#endif /* _WINDEF_ */
|