newlib/winsup/w32api/include/windef.h

237 lines
4.9 KiB
C
Raw Normal View History

2000-02-17 20:38:33 +01:00
#ifndef _WINDEF_H
#define _WINDEF_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef WINVER
#define WINVER 0x0400
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT WINVER
#endif
#ifndef WIN32
#define WIN32
#endif
#ifndef _WIN32
#define _WIN32
#endif
#define FAR
#define far
#define NEAR
#define near
#ifndef CONST
#define CONST const
#endif
#undef MAX_PATH
#define MAX_PATH 260
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void*)0)
#endif
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define IN
#define OUT
#ifndef OPTIONAL
2000-02-17 20:38:33 +01:00
#define OPTIONAL
#endif
2000-02-17 20:38:33 +01:00
#ifdef __GNUC__
#define PACKED __attribute__((packed))
#ifndef _stdcall
#define _stdcall __attribute__((stdcall))
#endif
#ifndef __stdcall
#define __stdcall __attribute__((stdcall))
#endif
#ifndef _cdecl
#define _cdecl __attribute__((cdecl))
#endif
#ifndef __cdecl
#define __cdecl __attribute__((cdecl))
#endif
#ifndef __declspec
#define __declspec(e) __attribute__((e))
#endif
#ifndef _declspec
#define _declspec(e) __attribute__((e))
#endif
#else
#define PACKED
#define _cdecl
#define __cdecl
#endif
#undef pascal
#undef _pascal
#undef __pascal
#define pascal __stdcall
#define _pascal __stdcall
#define __pascal __stdcall
#define PASCAL _pascal
#define CDECL _cdecl
#define STDCALL __stdcall
#define WINAPI __stdcall
#define WINAPIV __cdecl
#define APIENTRY __stdcall
#define CALLBACK __stdcall
#define APIPRIVATE __stdcall
#define DECLSPEC_IMPORT __declspec(dllimport)
#define DECLSPEC_EXPORT __declspec(dllexport)
2001-12-03 Earnie Boyd <earnie@users.sf.net> * include/accctrl.h: Change \r\n to \n. 2001-11-30 Danny Smith <dannysmith@users.sourceforge.net> * include/ipexport.h (IP_UNIDIRECTIONAL_ADAPTER_ADDRESS): Add structure definition. * include/iptypes.h (IP_PER_ADAPTER_INFO): Ditto. * include/iphlpapi.h (AddIPAddress,CreateProxyArpEntry, DeleteIPAddress,DeleteProxyArpEntry,EnableRouter, FlushIpNetTable,GetAdapterIndex,GetPerAdapterInfo, GetUniDirectionalAdapterInfo,SendARP,SetAdapterIpAddress, UnenableRouter) Declare functions. * lib/iphlpapi.def: Add function names to import lib. 2001-11-24 Danny Smith <dannysmith@users.sourceforge.net> * include/winnt.h (PACCESS_MASK): Add typedef. * include/aclapi.h: New file. * include/acctrl.h: New file. * lib/advapi32.def: Add missing symbols. * lib/test.c: Add #include <aclapi.h>. 2001-11-23 Danny Smith <dannysmith@users.sourceforge.net> * include/winbase.h (OSVERSIONINFO[AW],VER_PLATFORM_WIN32s, VER_PLATFORM_WIN32_WINDOWS,VER_PLATFORM_WIN32_NT): Move from here ... * include/winnt.h: ... to here. * include/winbase.h (VerifyVersionInfo[AW]): Add declaration. * include/winnt.h (OSVERSIONINFOEX[AW]): Add structure definitions and typedefs. (VER_NT_WORKSTATION,VER_NT_DOMAIN_CONTROLLER,VER_NT_SERVER): Add defines. 2001-11-19 Pierre Muller <muller@ics.u-strasbg.fr> * w32api/include/winnt.h: prepare SSE register support. (CONTEXT_EXTENDED_REGISTERS): Add new define. (MAXIMUM_SUPPORTED_EXTENSION): New define. (struct CONTEXT): ExtendedRegisters field added. 2001-11-16 Danny Smith <dannysmith@users.sourceforge.net> * include/winuser.h (tagALTTABINFO, tagCOMBOBOXINFO, tagCURSORINFO, tagMENUBARINFO, tagMENUINFO, tagMONITORINFO tagSCROLLBARINFO, tagTITLEBARINFO. tagWINDOWINFO, tagLASTINPUTINFO ): Define new structures. (EndMenu, GetAltTabInfo[AW],GetComboBoxInfo,GetCursorInfo, GetLastInputInfo, GetListBoxInfo, GetMenuBarInfo, GetMonitorInfo[AW], GetScrollBarInfo, GetTitleBarInfo, GetWindowInfo, GetWindowModuleFileName[AW],GetMenuInfo SetMenuInfo): Add new prototypes. * lib/user32.def: Add import stubs for above functions. * include/winuser.h (IDC_STATIC): Protect against prior definition. 2001-11-12 Corinna Vinschen <corinna@vinschen.de> * include/winbase.h (OSVERSIONINFOEX): Add definition. * include/winnt.h: Add VER_NT_* and VER_SUITE_* defines. 2001-11-10 Robert Collins <rbtcollins@hotmail.com> * include/winnt.h: Add Danny Smith's text comment about gcc compiler warnings with _AUTHORITY #defines. 2001-11-09 Robert Collins <rbtcollins@hotmail.com> * include/winnt.h (GetCurrentFiber): Create a prototype before the implementation; (GetFiberData): Ditto. 2001-11-09 Robert Collins <rbtcollins@hotmail.com> * include/winnt.h: Backout last change.
2001-12-03 20:59:34 +01:00
#ifdef __GNUC__
2000-02-17 20:38:33 +01:00
#define DECLSPEC_NORETURN __declspec(noreturn)
2001-12-03 Earnie Boyd <earnie@users.sf.net> * include/accctrl.h: Change \r\n to \n. 2001-11-30 Danny Smith <dannysmith@users.sourceforge.net> * include/ipexport.h (IP_UNIDIRECTIONAL_ADAPTER_ADDRESS): Add structure definition. * include/iptypes.h (IP_PER_ADAPTER_INFO): Ditto. * include/iphlpapi.h (AddIPAddress,CreateProxyArpEntry, DeleteIPAddress,DeleteProxyArpEntry,EnableRouter, FlushIpNetTable,GetAdapterIndex,GetPerAdapterInfo, GetUniDirectionalAdapterInfo,SendARP,SetAdapterIpAddress, UnenableRouter) Declare functions. * lib/iphlpapi.def: Add function names to import lib. 2001-11-24 Danny Smith <dannysmith@users.sourceforge.net> * include/winnt.h (PACCESS_MASK): Add typedef. * include/aclapi.h: New file. * include/acctrl.h: New file. * lib/advapi32.def: Add missing symbols. * lib/test.c: Add #include <aclapi.h>. 2001-11-23 Danny Smith <dannysmith@users.sourceforge.net> * include/winbase.h (OSVERSIONINFO[AW],VER_PLATFORM_WIN32s, VER_PLATFORM_WIN32_WINDOWS,VER_PLATFORM_WIN32_NT): Move from here ... * include/winnt.h: ... to here. * include/winbase.h (VerifyVersionInfo[AW]): Add declaration. * include/winnt.h (OSVERSIONINFOEX[AW]): Add structure definitions and typedefs. (VER_NT_WORKSTATION,VER_NT_DOMAIN_CONTROLLER,VER_NT_SERVER): Add defines. 2001-11-19 Pierre Muller <muller@ics.u-strasbg.fr> * w32api/include/winnt.h: prepare SSE register support. (CONTEXT_EXTENDED_REGISTERS): Add new define. (MAXIMUM_SUPPORTED_EXTENSION): New define. (struct CONTEXT): ExtendedRegisters field added. 2001-11-16 Danny Smith <dannysmith@users.sourceforge.net> * include/winuser.h (tagALTTABINFO, tagCOMBOBOXINFO, tagCURSORINFO, tagMENUBARINFO, tagMENUINFO, tagMONITORINFO tagSCROLLBARINFO, tagTITLEBARINFO. tagWINDOWINFO, tagLASTINPUTINFO ): Define new structures. (EndMenu, GetAltTabInfo[AW],GetComboBoxInfo,GetCursorInfo, GetLastInputInfo, GetListBoxInfo, GetMenuBarInfo, GetMonitorInfo[AW], GetScrollBarInfo, GetTitleBarInfo, GetWindowInfo, GetWindowModuleFileName[AW],GetMenuInfo SetMenuInfo): Add new prototypes. * lib/user32.def: Add import stubs for above functions. * include/winuser.h (IDC_STATIC): Protect against prior definition. 2001-11-12 Corinna Vinschen <corinna@vinschen.de> * include/winbase.h (OSVERSIONINFOEX): Add definition. * include/winnt.h: Add VER_NT_* and VER_SUITE_* defines. 2001-11-10 Robert Collins <rbtcollins@hotmail.com> * include/winnt.h: Add Danny Smith's text comment about gcc compiler warnings with _AUTHORITY #defines. 2001-11-09 Robert Collins <rbtcollins@hotmail.com> * include/winnt.h (GetCurrentFiber): Create a prototype before the implementation; (GetFiberData): Ditto. 2001-11-09 Robert Collins <rbtcollins@hotmail.com> * include/winnt.h: Backout last change.
2001-12-03 20:59:34 +01:00
#define DECLARE_STDCALL_P( type ) __stdcall type
#elif defined(__WATCOMC__)
#define DECLSPEC_NORETURN
#define DECLARE_STDCALL_P( type ) type __stdcall
#endif /* __GNUC__/__WATCOMC__ */
2000-02-17 20:38:33 +01:00
#define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
#define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
#define LOWORD(l) ((WORD)((DWORD)(l)))
#define HIWORD(l) ((WORD)(((DWORD)(l)>>16)&0xFFFF))
#define LOBYTE(w) ((BYTE)(w))
#define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))
#ifndef _export
#define _export
#endif
#ifndef __export
#define __export
#endif
#ifndef NOMINMAX
#ifndef max
#define max(a,b) ((a)>(b)?(a):(b))
#endif
#ifndef min
#define min(a,b) ((a)<(b)?(a):(b))
#endif
#endif
#define UNREFERENCED_PARAMETER(P) {(P)=(P);}
#define UNREFERENCED_LOCAL_VARIABLE(L) {(L)=(L);}
#define DBG_UNREFERENCED_PARAMETER(P)
#define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
typedef unsigned long DWORD;
typedef int WINBOOL,*PWINBOOL,*LPWINBOOL;
/* FIXME: Is there a good solution to this? */
#ifndef XFree86Server
2000-02-17 20:38:33 +01:00
#ifndef __OBJC__
typedef WINBOOL BOOL;
#else
#define BOOL WINBOOL
#endif
typedef unsigned char BYTE;
#endif /* ndef XFree86Server */
typedef BOOL *PBOOL,*LPBOOL;
2000-02-17 20:38:33 +01:00
typedef unsigned short WORD;
typedef float FLOAT;
typedef FLOAT *PFLOAT;
typedef BYTE *PBYTE,*LPBYTE;
typedef int *PINT,*LPINT;
typedef WORD *PWORD,*LPWORD;
typedef long *LPLONG;
typedef DWORD *PDWORD,*LPDWORD;
typedef void *PVOID,*LPVOID;
typedef CONST void *PCVOID,*LPCVOID;
typedef int INT;
typedef unsigned int UINT,*PUINT,*LPUINT;
#include <winnt.h>
typedef UINT WPARAM;
typedef LONG LPARAM;
typedef LONG LRESULT;
#ifndef _HRESULT_DEFINED
typedef LONG HRESULT;
#define _HRESULT_DEFINED
#endif
#ifndef XFree86Server
2000-02-17 20:38:33 +01:00
typedef WORD ATOM;
#endif /* XFree86Server */
2000-02-17 20:38:33 +01:00
typedef HANDLE HGLOBAL;
typedef HANDLE HLOCAL;
typedef HANDLE GLOBALHANDLE;
typedef HANDLE LOCALHANDLE;
typedef void *HGDIOBJ;
DECLARE_HANDLE(HACCEL);
DECLARE_HANDLE(HBITMAP);
DECLARE_HANDLE(HBRUSH);
DECLARE_HANDLE(HCOLORSPACE);
DECLARE_HANDLE(HDC);
DECLARE_HANDLE(HGLRC);
DECLARE_HANDLE(HDESK);
DECLARE_HANDLE(HENHMETAFILE);
DECLARE_HANDLE(HFONT);
DECLARE_HANDLE(HICON);
DECLARE_HANDLE(HKEY);
/* FIXME: How to handle these. SM_CMONITORS etc in winuser.h also. */
/* #if (WINVER >= 0x0500) */
DECLARE_HANDLE(HMONITOR);
#define HMONITOR_DECLARED 1
2000-02-17 20:38:33 +01:00
DECLARE_HANDLE(HTERMINAL);
DECLARE_HANDLE(HWINEVENTHOOK);
/* #endif */
typedef HKEY *PHKEY;
DECLARE_HANDLE(HMENU);
DECLARE_HANDLE(HMETAFILE);
DECLARE_HANDLE(HINSTANCE);
typedef HINSTANCE HMODULE;
DECLARE_HANDLE(HPALETTE);
DECLARE_HANDLE(HPEN);
DECLARE_HANDLE(HRGN);
DECLARE_HANDLE(HRSRC);
DECLARE_HANDLE(HSTR);
DECLARE_HANDLE(HTASK);
DECLARE_HANDLE(HWND);
DECLARE_HANDLE(HWINSTA);
DECLARE_HANDLE(HKL);
typedef int HFILE;
typedef HICON HCURSOR;
typedef DWORD COLORREF;
typedef int (WINAPI *FARPROC)(void);
typedef int (WINAPI *NEARPROC)(void);
typedef int (WINAPI *PROC)(void);
2000-02-17 20:38:33 +01:00
typedef struct tagRECT {
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT,*PRECT,*LPRECT;
typedef const RECT *LPCRECT;
typedef struct tagRECTL {
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECTL,*PRECTL,*LPRECTL;
typedef const RECTL *LPCRECTL;
typedef struct tagPOINT {
LONG x;
LONG y;
} POINT,POINTL,*PPOINT,*LPPOINT,*PPOINTL,*LPPOINTL;
typedef struct tagSIZE {
LONG cx;
LONG cy;
} SIZE,SIZEL,*PSIZE,*LPSIZE,*PSIZEL,*LPSIZEL;
typedef struct tagPOINTS {
SHORT x;
SHORT y;
} POINTS,*PPOINTS,*LPPOINTS;
#ifdef __cplusplus
}
#endif
#endif