/* windef.h*/
|
/* windef.h*/
|
/*
|
/*
|
* Copyright (c) 1999 Greg Haerr <greg@censoft.com>
|
* Copyright (c) 1999 Greg Haerr <greg@censoft.com>
|
*
|
*
|
* Win32 API base type definitions
|
* Win32 API base type definitions
|
*/
|
*/
|
|
|
#define _WINDEF_H
|
#define _WINDEF_H
|
|
|
|
|
#ifdef VXWORKS
|
#ifdef VXWORKS
|
/* Don't include the internal Tornado header file <ntcontext.h>, **
|
/* Don't include the internal Tornado header file <ntcontext.h>, **
|
** as the definitions in it conflict with these definitions. */
|
** as the definitions in it conflict with these definitions. */
|
#define __INCntcontexth
|
#define __INCntcontexth
|
/* Bring in the core VxWorks definitions as they could conflict **
|
/* Bring in the core VxWorks definitions as they could conflict **
|
** with the ones below if they are brought in later. */
|
** with the ones below if they are brought in later. */
|
#include <vxWorks.h>
|
#include <vxWorks.h>
|
#endif
|
#endif
|
|
|
|
|
#ifndef NULL
|
#ifndef NULL
|
#define NULL ((void *)0)
|
#define NULL ((void *)0)
|
#endif
|
#endif
|
|
|
#ifndef FALSE
|
#ifndef FALSE
|
#define FALSE 0
|
#define FALSE 0
|
#endif
|
#endif
|
|
|
#ifndef TRUE
|
#ifndef TRUE
|
#define TRUE 1
|
#define TRUE 1
|
#endif
|
#endif
|
|
|
#ifndef NOMINMAX
|
#ifndef NOMINMAX
|
#ifndef max
|
#ifndef max
|
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
#endif
|
#endif
|
|
|
#ifndef min
|
#ifndef min
|
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
#endif
|
#endif
|
#endif /* NOMINMAX */
|
#endif /* NOMINMAX */
|
|
|
#define CALLBACK
|
#define CALLBACK
|
#define WINAPI
|
#define WINAPI
|
#define WINAPIV
|
#define WINAPIV
|
#define APIENTRY WINAPI
|
#define APIENTRY WINAPI
|
#define APIPRIVATE
|
#define APIPRIVATE
|
#define PASCAL
|
#define PASCAL
|
|
|
#define FAR
|
#define FAR
|
#define NEAR
|
#define NEAR
|
#define CONST const
|
#define CONST const
|
#define CDECL
|
#define CDECL
|
|
|
#define VOID void
|
#define VOID void
|
typedef void *PVOID;
|
typedef void *PVOID;
|
typedef char CHAR;
|
typedef char CHAR;
|
typedef short SHORT;
|
typedef short SHORT;
|
typedef long LONG;
|
typedef long LONG;
|
typedef SHORT *PSHORT;
|
typedef SHORT *PSHORT;
|
typedef LONG *PLONG;
|
typedef LONG *PLONG;
|
|
|
#ifndef VXWORKS
|
#ifndef VXWORKS
|
typedef unsigned char UCHAR;
|
typedef unsigned char UCHAR;
|
typedef unsigned short USHORT;
|
typedef unsigned short USHORT;
|
typedef unsigned long ULONG;
|
typedef unsigned long ULONG;
|
typedef unsigned int UINT;
|
typedef unsigned int UINT;
|
|
|
#ifndef __ITRON_TYPES_h_ /* FIXME RTEMS hack*/
|
#ifndef __ITRON_TYPES_h_ /* FIXME RTEMS hack*/
|
#ifndef COMMON_H /* MiniGUI hack*/
|
#ifndef COMMON_H /* MiniGUI hack*/
|
typedef int BOOL;
|
typedef int BOOL;
|
#endif
|
#endif
|
#endif
|
#endif
|
|
|
#endif /* !VXWORKS*/
|
#endif /* !VXWORKS*/
|
|
|
typedef ULONG * PULONG;
|
typedef ULONG * PULONG;
|
typedef USHORT * PUSHORT;
|
typedef USHORT * PUSHORT;
|
typedef UCHAR * PUCHAR;
|
typedef UCHAR * PUCHAR;
|
typedef char * PSZ;
|
typedef char * PSZ;
|
typedef int INT;
|
typedef int INT;
|
typedef unsigned int *PUINT;
|
typedef unsigned int *PUINT;
|
|
|
typedef unsigned long DWORD;
|
typedef unsigned long DWORD;
|
typedef unsigned char BYTE;
|
typedef unsigned char BYTE;
|
typedef unsigned short WORD;
|
typedef unsigned short WORD;
|
|
|
typedef float FLOAT;
|
typedef float FLOAT;
|
typedef FLOAT *PFLOAT;
|
typedef FLOAT *PFLOAT;
|
typedef BOOL NEAR *PBOOL;
|
typedef BOOL NEAR *PBOOL;
|
typedef BOOL FAR *LPBOOL;
|
typedef BOOL FAR *LPBOOL;
|
typedef BYTE NEAR *PBYTE;
|
typedef BYTE NEAR *PBYTE;
|
typedef BYTE FAR *LPBYTE;
|
typedef BYTE FAR *LPBYTE;
|
typedef int NEAR *PINT;
|
typedef int NEAR *PINT;
|
typedef int FAR *LPINT;
|
typedef int FAR *LPINT;
|
typedef WORD NEAR *PWORD;
|
typedef WORD NEAR *PWORD;
|
typedef WORD FAR *LPWORD;
|
typedef WORD FAR *LPWORD;
|
typedef long FAR *LPLONG;
|
typedef long FAR *LPLONG;
|
typedef DWORD NEAR *PDWORD;
|
typedef DWORD NEAR *PDWORD;
|
typedef DWORD FAR *LPDWORD;
|
typedef DWORD FAR *LPDWORD;
|
typedef void FAR *LPVOID;
|
typedef void FAR *LPVOID;
|
typedef CONST void FAR *LPCVOID;
|
typedef CONST void FAR *LPCVOID;
|
|
|
typedef unsigned short WCHAR;
|
typedef unsigned short WCHAR;
|
typedef WCHAR *PWCHAR;
|
typedef WCHAR *PWCHAR;
|
typedef WCHAR *LPWCH, *PWCH;
|
typedef WCHAR *LPWCH, *PWCH;
|
typedef CONST WCHAR *LPCWCH, *PCWCH;
|
typedef CONST WCHAR *LPCWCH, *PCWCH;
|
typedef WCHAR *NWPSTR;
|
typedef WCHAR *NWPSTR;
|
typedef WCHAR *LPWSTR, *PWSTR;
|
typedef WCHAR *LPWSTR, *PWSTR;
|
typedef CONST WCHAR *LPCWSTR, *PCWSTR;
|
typedef CONST WCHAR *LPCWSTR, *PCWSTR;
|
|
|
typedef CHAR *PCHAR;
|
typedef CHAR *PCHAR;
|
typedef CHAR *LPCH, *PCH;
|
typedef CHAR *LPCH, *PCH;
|
typedef CONST CHAR *LPCCH, *PCCH;
|
typedef CONST CHAR *LPCCH, *PCCH;
|
typedef CHAR *NPSTR;
|
typedef CHAR *NPSTR;
|
typedef CHAR *LPSTR, *PSTR;
|
typedef CHAR *LPSTR, *PSTR;
|
typedef CONST CHAR *LPCSTR, *PCSTR;
|
typedef CONST CHAR *LPCSTR, *PCSTR;
|
typedef char TCHAR, *PTCHAR;
|
typedef char TCHAR, *PTCHAR;
|
typedef unsigned char TBYTE , *PTBYTE ;
|
typedef unsigned char TBYTE , *PTBYTE ;
|
typedef LPSTR LPTCH, PTCH;
|
typedef LPSTR LPTCH, PTCH;
|
typedef LPSTR PTSTR, LPTSTR;
|
typedef LPSTR PTSTR, LPTSTR;
|
typedef LPCSTR LPCTSTR;
|
typedef LPCSTR LPCTSTR;
|
|
|
#define __TEXT(quote) quote
|
#define __TEXT(quote) quote
|
#define TEXT(quote) __TEXT(quote)
|
#define TEXT(quote) __TEXT(quote)
|
|
|
typedef int (FAR WINAPI *FARPROC)();
|
typedef int (FAR WINAPI *FARPROC)();
|
typedef int (NEAR WINAPI *NEARPROC)();
|
typedef int (NEAR WINAPI *NEARPROC)();
|
typedef int (WINAPI *PROC)();
|
typedef int (WINAPI *PROC)();
|
|
|
typedef UINT WPARAM;
|
typedef UINT WPARAM;
|
typedef LONG LPARAM;
|
typedef LONG LPARAM;
|
typedef LONG LRESULT;
|
typedef LONG LRESULT;
|
typedef LONG HRESULT;
|
typedef LONG HRESULT;
|
|
|
#define MAKEWORD(a, b) ((WORD)(((BYTE)(a)) | ((WORD)((BYTE)(b))) << 8))
|
#define MAKEWORD(a, b) ((WORD)(((BYTE)(a)) | ((WORD)((BYTE)(b))) << 8))
|
#define MAKELONG(a, b) ((LONG)(((WORD)(a)) | ((DWORD)((WORD)(b))) << 16))
|
#define MAKELONG(a, b) ((LONG)(((WORD)(a)) | ((DWORD)((WORD)(b))) << 16))
|
#define LOWORD(l) ((WORD)(l))
|
#define LOWORD(l) ((WORD)(l))
|
#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
|
#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
|
#define LOBYTE(w) ((BYTE)(w))
|
#define LOBYTE(w) ((BYTE)(w))
|
#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
|
#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
|
|
|
#define PALETTEINDEX(i) ((COLORREF)(0x01000000 | (DWORD)(WORD)(i)))
|
#define PALETTEINDEX(i) ((COLORREF)(0x01000000 | (DWORD)(WORD)(i)))
|
|
|
typedef DWORD COLORREF;
|
typedef DWORD COLORREF;
|
typedef DWORD *LPCOLORREF;
|
typedef DWORD *LPCOLORREF;
|
|
|
/* handle typedef*/
|
/* handle typedef*/
|
typedef PVOID HANDLE;
|
typedef PVOID HANDLE;
|
|
|
typedef HANDLE *PHANDLE;
|
typedef HANDLE *PHANDLE;
|
typedef HANDLE NEAR *SPHANDLE;
|
typedef HANDLE NEAR *SPHANDLE;
|
typedef HANDLE FAR *LPHANDLE;
|
typedef HANDLE FAR *LPHANDLE;
|
typedef HANDLE HGLOBAL;
|
typedef HANDLE HGLOBAL;
|
typedef HANDLE HLOCAL;
|
typedef HANDLE HLOCAL;
|
typedef HANDLE GLOBALHANDLE;
|
typedef HANDLE GLOBALHANDLE;
|
typedef HANDLE LOCALHANDLE;
|
typedef HANDLE LOCALHANDLE;
|
|
|
typedef WORD ATOM;
|
typedef WORD ATOM;
|
|
|
typedef struct hwnd * HWND;
|
typedef struct hwnd * HWND;
|
typedef struct hdc * HDC;
|
typedef struct hdc * HDC;
|
typedef struct hcursor *HCURSOR;
|
typedef struct hcursor *HCURSOR;
|
typedef struct hgdiobj *HGDIOBJ;
|
typedef struct hgdiobj *HGDIOBJ;
|
typedef struct hgdiobj *HBRUSH;
|
typedef struct hgdiobj *HBRUSH;
|
typedef struct hgdiobj *HPEN;
|
typedef struct hgdiobj *HPEN;
|
typedef struct hgdiobj *HFONT;
|
typedef struct hgdiobj *HFONT;
|
typedef struct hgdiobj *HBITMAP;
|
typedef struct hgdiobj *HBITMAP;
|
typedef struct hgdiobj *HRGN;
|
typedef struct hgdiobj *HRGN;
|
typedef struct hgdiobj *HPALETTE;
|
typedef struct hgdiobj *HPALETTE;
|
typedef HANDLE HICON;
|
typedef HANDLE HICON;
|
typedef HANDLE HINSTANCE;
|
typedef HANDLE HINSTANCE;
|
typedef HANDLE HMENU;
|
typedef HANDLE HMENU;
|
|
|
/* moved to winuser.h for resource compiler*/
|
/* moved to winuser.h for resource compiler*/
|
/*typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);*/
|
/*typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);*/
|
|
|
|
|