windef.h
*
*
*
/****************************************************************************
*
*
* windef.h -- Basic Windows Type Definitions
*
* Copyright (c) 1985-1997, Microsoft Corp. All rights reserved.
*
*
****************************************************************************/
#ifndef _WINDEF_
#define _WINDEF_
#ifndef NO_STRICT
#ifndef STRICT
#define STRICT 1
#endif
#endif /* NO_STRICT */
// Win32 defines _WIN32 automatically, but Macintosh doesn't, so if we are using Win32 Functions,
we must do it here
#ifdef _MAC
#ifndef _WIN32
#define _WIN32
#endif
#endif //_MAC
#ifdef __cplusplus
extern "C" {
#endif
#ifndef WINVER
#define WINVER 0x0500
#endif /* WINVER */
/* !BASETYPES */
/* BASETYPES is defined in ntdef.h if these types are already defined */
#ifndef BASETYPES
#define BASETYPES
typedef unsigned long ULONG;
typedef ULONG *PULONG;
typedef unsigned short USHORT;
typedef USHORT *PUSHORT;
typedef unsigned char UCHAR;
typedef UCHAR *PUCHAR;
typedef char *PSZ;
#endif
#define MAX_PATH
#ifndef NULL
#ifdef __cplusplus
#define NULL
#else
#define NULL
#endif
#endif
#ifndef FALSE
#define FALSE
#endif
#ifndef TRUE
#define TRUE
((void *)0)
260
0
0
1
1
#endif
#ifndef IN
#define IN
#endif
#ifndef OUT
#define OUT
#endif
#ifndef OPTIONAL
#define OPTIONAL
#endif
#undef far
#undef near
#undef pascal
#define far
#define near
#if (!defined(_MAC)) && ((_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED))
#define pascal __stdcall
#else
#define pascal
#endif
#if defined(DOSWIN32) || defined(_MAC)
#define cdecl _cdecl
#ifndef CDECL
#define CDECL _cdecl
#endif
#else
#define cdecl
#ifndef CDECL
#define CDECL
#endif
#endif
#ifdef _MAC
#define CALLBACK
#define WINAPI
CDECL
#define WINAPIV
CDECL
#define APIENTRY
WINAPI
#define APIPRIVATE CDECL
#ifdef _68K_
#define PASCAL
#else
#define PASCAL
#endif
#elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
#define CALLBACK
__stdcall
#define WINAPI
__cdecl
#define WINAPIV
WINAPI
#define APIENTRY
#define APIPRIVATE __stdcall
#define PASCAL
__stdcall
#else
#define CALLBACK
#define WINAPI
#define WINAPIV
PASCAL
__pascal
__stdcall
2
WINAPI
pascal
far
near
const
*PWORD;
*LPWORD;
*LPLONG;
DWORD;
BOOL;
BYTE;
WORD;
FLOAT;
*PFLOAT;
*PBOOL;
*LPBOOL;
*PBYTE;
*LPBYTE;
#define APIENTRY
#define APIPRIVATE
#define PASCAL
#endif
#undef FAR
#undef NEAR
#define FAR
#define NEAR
#ifndef CONST
#define CONST
#endif
typedef unsigned long
typedef int
typedef unsigned char
typedef unsigned short
typedef float
typedef FLOAT
typedef BOOL near
typedef BOOL far
typedef BYTE near
typedef BYTE far
typedef int near
typedef int far
typedef WORD near
typedef WORD far
typedef long far
typedef DWORD near
typedef DWORD far
typedef void far
typedef CONST void far
typedef int
typedef unsigned int
typedef unsigned int
#ifndef NT_INCLUDED
#include
#endif /* NT_INCLUDED */
/* Types use for passing & returning polymorphic values */
typedef UINT WPARAM;
typedef LONG LPARAM;
typedef LONG LRESULT;
#ifndef NOMINMAX
#ifndef max
#define max(a,b)
#endif
#ifndef min
#define min(a,b)
#endif
#endif
/* NOMINMAX */
#define MAKEWORD(a, b)
#define MAKELONG(a, b)
#define LOWORD(l)
#define HIWORD(l)
#define LOBYTE(w)
*LPVOID;
*LPCVOID;
INT;
UINT;
*PUINT;
*PDWORD;
*LPDWORD;
(((a) > (b)) ? (a) : (b))
(((a) < (b)) ? (a) : (b))
*PINT;
*LPINT;
((WORD)(((BYTE)(a)) | ((WORD)((BYTE)(b))) << 8))
((LONG)(((WORD)(a)) | ((DWORD)((WORD)(b))) << 16))
((WORD)(l))
((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
((BYTE)(w))
3
(HEVENT);
ATOM;
*SPHANDLE;
*LPHANDLE;
HGLOBAL;
HLOCAL;
GLOBALHANDLE;
LOCALHANDLE;
(HWND);
(HHOOK);
#define HIBYTE(w)
#ifndef WIN_INTERNAL
DECLARE_HANDLE
DECLARE_HANDLE
#ifdef WINABLE
DECLARE_HANDLE
#endif
#endif
typedef WORD
typedef HANDLE NEAR
typedef HANDLE FAR
typedef HANDLE
typedef HANDLE
typedef HANDLE
typedef HANDLE
#ifndef _MAC
typedef int (FAR WINAPI *FARPROC)();
typedef int (NEAR WINAPI *NEARPROC)();
typedef int (WINAPI *PROC)();
#else
typedef int (CALLBACK *FARPROC)();
typedef int (CALLBACK *NEARPROC)();
typedef int (CALLBACK *PROC)();
#endif
#if !defined(_MAC) || !defined(GDI_INTERNAL)
#ifdef STRICT
typedef void NEAR* HGDIOBJ;
#else
DECLARE_HANDLE(HGDIOBJ);
#endif
#endif
#if !defined(_MAC) || !defined(WIN_INTERNAL)
DECLARE_HANDLE(HACCEL);
#endif
#if !defined(_MAC) || !defined(GDI_INTERNAL)
DECLARE_HANDLE(HBITMAP);
DECLARE_HANDLE(HBRUSH);
#endif
#if(WINVER >= 0x0400)
DECLARE_HANDLE(HCOLORSPACE);
#endif /* WINVER >= 0x0400 */
#if !defined(_MAC) || !defined(GDI_INTERNAL)
DECLARE_HANDLE(HDC);
#endif
DECLARE_HANDLE(HGLRC);
DECLARE_HANDLE(HDESK);
DECLARE_HANDLE(HENHMETAFILE);
#if !defined(_MAC) || !defined(GDI_INTERNAL)
DECLARE_HANDLE(HFONT);
#endif
DECLARE_HANDLE(HICON);
#if !defined(_MAC) || !defined(WIN_INTERNAL)
DECLARE_HANDLE(HMENU);
((BYTE)(((WORD)(w) >> 8) & 0xFF))
// OpenGL
4
/* HMODULEs can be used in place of HINSTANCEs */
/* HICONs & HCURSORs are polymorphic */
/* HICONs & HCURSORs are not polymorphic */
#endif
DECLARE_HANDLE(HMETAFILE);
DECLARE_HANDLE(HINSTANCE);
typedef HINSTANCE HMODULE;
#if !defined(_MAC) || !defined(GDI_INTERNAL)
DECLARE_HANDLE(HPALETTE);
DECLARE_HANDLE(HPEN);
#endif
DECLARE_HANDLE(HRGN);
DECLARE_HANDLE(HRSRC);
DECLARE_HANDLE(HSTR);
DECLARE_HANDLE(HTASK);
DECLARE_HANDLE(HWINSTA);
DECLARE_HANDLE(HKL);
#if(WINVER >= 0x0500)
#ifndef _MAC
DECLARE_HANDLE(HMONITOR);
DECLARE_HANDLE(HTERMINAL);
DECLARE_HANDLE(HWINEVENTHOOK);
#endif
#endif /* WINVER >= 0x0500 */
#ifndef _MAC
typedef int HFILE;
typedef HICON HCURSOR;
#else
typedef short HFILE;
DECLARE_HANDLE(HCURSOR);
#endif
COLORREF;
typedef DWORD
typedef DWORD
*LPCOLORREF;
#define HFILE_ERROR ((HFILE)-1)
typedef struct tagRECT
{
LONG
LONG
LONG
LONG
left;
top;
right;
bottom;
} RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;
typedef const RECT FAR* LPCRECT;
typedef struct _RECTL
/* rcl */
{
LONG
LONG
LONG
LONG
left;
top;
right;
bottom;
} RECTL, *PRECTL, *LPRECTL;
typedef const RECTL FAR* LPCRECTL;
typedef struct tagPOINT
{
LONG x;
LONG y;
} POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
typedef struct _POINTL
/* ptl */
5
{
LONG x;
LONG y;
} POINTL, *PPOINTL;
typedef struct tagSIZE
{
LONG
LONG
cx;
cy;
} SIZE, *PSIZE, *LPSIZE;
typedef SIZE
typedef SIZE
typedef struct tagPOINTS
{
#ifndef _MAC
SHORT
SHORT
x;
y;
#else
SHORT
SHORT
y;
x;
SIZEL;
*PSIZEL, *LPSIZEL;
1
2
3
1
2
4
8
DM_MODIFY
DM_PROMPT
DM_COPY
DM_UPDATE
#endif
} POINTS, *PPOINTS, *LPPOINTS;
/* mode selections for the device mode function */
#define DM_UPDATE
#define DM_COPY
#define DM_PROMPT
#define DM_MODIFY
#define DM_IN_BUFFER
#define DM_IN_PROMPT
#define DM_OUT_BUFFER
#define DM_OUT_DEFAULT
/* device capabilities indices */
#define DC_FIELDS
#define DC_PAPERS
#define DC_PAPERSIZE
#define DC_MINEXTENT
#define DC_MAXEXTENT
#define DC_BINS
#define DC_DUPLEX
#define DC_SIZE
#define DC_EXTRA
#define DC_VERSION
#define DC_DRIVER
#define DC_BINNAMES
#define DC_ENUMRESOLUTIONS 13
#define DC_FILEDEPENDENCIES 14
15
#define DC_TRUETYPE
#define DC_PAPERNAMES
16
17
#define DC_ORIENTATION
#define DC_COPIES
18
#ifdef __cplusplus
}
#endif
#endif /* _WINDEF_ */
9
10
11
12
4
5
6
8
7
6