home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Emulation_Include_Files / windef.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-13  |  7.0 KB  |  307 lines

  1. /****************************************************************************
  2. *                                                                           *
  3. * windef.h -- Basic Windows Type Definitions                                *
  4. *                                                                           *
  5. * Copyright (c) 1985-1995, Microsoft Corp. All rights reserved.             *
  6. *                                                                           *
  7. ****************************************************************************/
  8.  
  9. #ifndef _WINDEF_        
  10. #define _WINDEF_
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. #ifndef WINVER
  17. #define WINVER 0x0400
  18. #endif /* WINVER */
  19.  
  20. /*
  21.  * BASETYPES is defined in ntdef.h if these types are already defined
  22.  */
  23.  
  24. #ifndef BASETYPES
  25. #define BASETYPES
  26. typedef unsigned long ULONG;
  27. typedef ULONG *PULONG;
  28. typedef unsigned short USHORT;
  29. typedef USHORT *PUSHORT;
  30. typedef unsigned char UCHAR;
  31. typedef UCHAR *PUCHAR;
  32. typedef char *PSZ;
  33. #endif  /* !BASETYPES */
  34.  
  35. #define MAX_PATH          260
  36.  
  37. #ifndef NULL
  38. #ifdef __cplusplus
  39. #define NULL    0
  40. #else
  41. #define NULL    ((void *)0)
  42. #endif
  43. #endif
  44.  
  45. #ifndef FALSE
  46. #define FALSE               0
  47. #endif
  48.  
  49. #ifndef TRUE
  50. #define TRUE                1
  51. #endif
  52.  
  53. #ifndef IN
  54. #define IN
  55. #endif
  56.  
  57. #ifndef OUT
  58. #define OUT
  59. #endif
  60.  
  61. #ifndef OPTIONAL
  62. #define OPTIONAL
  63. #endif
  64.  
  65. #undef far
  66. #undef near
  67. #undef pascal
  68.  
  69. #define far
  70. #define near
  71. #if (_MSC_VER >= 800)
  72. #define pascal __stdcall
  73. #else
  74. #define pascal
  75. #endif
  76.  
  77. #ifdef DOSWIN32
  78. #define cdecl _cdecl
  79. #ifndef CDECL
  80. #define CDECL _cdecl
  81. #endif
  82. #else
  83. #define cdecl
  84. #ifndef CDECL
  85. #define CDECL
  86. #endif
  87. #endif
  88.  
  89. #if UNDER_CE
  90. #define __stdcall __cdecl
  91. #endif
  92.  
  93. #if (_MSC_VER >= 800)
  94. #define CALLBACK    __stdcall
  95. #define WINAPI      __stdcall
  96. #define WINAPIV     __cdecl
  97. #define APIENTRY    WINAPI
  98. #define APIPRIVATE  __stdcall
  99. #define PASCAL      __stdcall
  100. #else
  101. #define CALLBACK
  102. #define WINAPI
  103. #define WINAPIV
  104. #define APIENTRY    WINAPI
  105. #define APIPRIVATE
  106. #define PASCAL      pascal
  107. #endif
  108.  
  109. #define FAR                 far
  110. #define NEAR                near
  111. #ifndef CONST
  112. #define CONST               const
  113. #endif
  114.  
  115. typedef unsigned long       DWORD;
  116. typedef int                 BOOL;
  117. typedef unsigned char       BYTE;
  118. typedef unsigned short      WORD;
  119. typedef float               FLOAT;
  120. typedef FLOAT               *PFLOAT;
  121. typedef BOOL near           *PBOOL;
  122. typedef BOOL far            *LPBOOL;
  123. typedef BYTE near           *PBYTE;
  124. typedef BYTE far            *LPBYTE;
  125. typedef int near            *PINT;
  126. typedef int far             *LPINT;
  127. typedef WORD near           *PWORD;
  128. typedef WORD far            *LPWORD;
  129. typedef long far            *LPLONG;
  130. typedef DWORD near          *PDWORD;
  131. typedef DWORD far           *LPDWORD;
  132. typedef short far           *LPSHORT;
  133. typedef void far            *LPVOID;
  134. typedef CONST void far      *LPCVOID;
  135.  
  136. typedef int                 INT;
  137. typedef unsigned int        UINT;
  138. typedef unsigned int        *PUINT;
  139.  
  140. #ifndef NT_INCLUDED
  141. #include <winnt.h>
  142. #endif /* NT_INCLUDED */
  143.  
  144. /* Types use for passing & returning polymorphic values */
  145. typedef UINT WPARAM;
  146. typedef LONG LPARAM;
  147. typedef LONG LRESULT;
  148.  
  149. #ifndef NOMINMAX
  150.  
  151. #ifndef max
  152. #define max(a,b)            (((a) > (b)) ? (a) : (b))
  153. #endif
  154.  
  155. #ifndef min
  156. #define min(a,b)            (((a) < (b)) ? (a) : (b))
  157. #endif
  158.  
  159. #endif  /* NOMINMAX */
  160.  
  161. #define MAKEWORD(a, b)      ((WORD)(((BYTE)(a)) | ((WORD)((BYTE)(b))) << 8))
  162. #define MAKELONG(a, b)      ((LONG)(((WORD)(a)) | ((DWORD)((WORD)(b))) << 16))
  163. #define LOWORD(l)           ((WORD)(l))
  164. #define HIWORD(l)           ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
  165. #define LOBYTE(w)           ((BYTE)(w))
  166. #define HIBYTE(w)           ((BYTE)(((WORD)(w) >> 8) & 0xFF))
  167.  
  168. #ifndef WIN_INTERNAL
  169. DECLARE_HANDLE            (HWND);
  170. DECLARE_HANDLE            (HHOOK);
  171. #endif
  172.  
  173. typedef WORD                ATOM;
  174.  
  175. typedef HANDLE NEAR         *SPHANDLE;
  176. typedef HANDLE FAR          *LPHANDLE;
  177. typedef HANDLE              HGLOBAL;
  178. typedef HANDLE              HLOCAL;
  179. typedef HANDLE              GLOBALHANDLE;
  180. typedef HANDLE              LOCALHANDLE;
  181. typedef int (FAR WINAPI *FARPROC)();
  182. typedef int (NEAR WINAPI *NEARPROC)();
  183. typedef int (WINAPI *PROC)();
  184.  
  185. #ifdef STRICT
  186. typedef void NEAR* HGDIOBJ;
  187. #else
  188. DECLARE_HANDLE(HGDIOBJ);
  189. #endif
  190.  
  191. DECLARE_HANDLE(HACCEL);
  192. DECLARE_HANDLE(HBITMAP);
  193. DECLARE_HANDLE(HBRUSH);
  194. #if(WINVER >= 0x0400)
  195. DECLARE_HANDLE(HCOLORSPACE);
  196. #endif /* WINVER >= 0x0400 */
  197. DECLARE_HANDLE(HDC);
  198. DECLARE_HANDLE(HGLRC);          // OpenGL
  199. DECLARE_HANDLE(HDESK);
  200. DECLARE_HANDLE(HENHMETAFILE);
  201. DECLARE_HANDLE(HFONT);
  202. DECLARE_HANDLE(HICON);
  203. DECLARE_HANDLE(HMENU);
  204. DECLARE_HANDLE(HMETAFILE);
  205. DECLARE_HANDLE(HINSTANCE);
  206. typedef HINSTANCE HMODULE;      /* HMODULEs can be used in place of HINSTANCEs */
  207. DECLARE_HANDLE(HPALETTE);
  208. DECLARE_HANDLE(HPEN);
  209. DECLARE_HANDLE(HRGN);
  210. DECLARE_HANDLE(HRSRC);
  211. DECLARE_HANDLE(HSTR);
  212. DECLARE_HANDLE(HTASK);
  213. DECLARE_HANDLE(HWINSTA);
  214. DECLARE_HANDLE(HKL);
  215.  
  216. typedef int HFILE;      
  217. typedef HICON HCURSOR;      /* HICONs & HCURSORs are polymorphic */
  218.  
  219. typedef DWORD   COLORREF;
  220. typedef DWORD   *LPCOLORREF;
  221.  
  222. #define HFILE_ERROR ((HFILE)-1)
  223.  
  224. typedef struct tagRECT
  225. {
  226.     LONG    left;
  227.     LONG    top;
  228.     LONG    right;
  229.     LONG    bottom;
  230. } RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;
  231.  
  232. typedef const RECT FAR* LPCRECT;
  233.  
  234. typedef struct _RECTL       /* rcl */
  235. {
  236.     LONG    left;
  237.     LONG    top;
  238.     LONG    right;
  239.     LONG    bottom;
  240. } RECTL, *PRECTL, *LPRECTL;
  241.  
  242. typedef const RECTL FAR* LPCRECTL;
  243.  
  244. typedef struct tagPOINT
  245. {
  246.     LONG  x;
  247.     LONG  y;
  248. } POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
  249.  
  250. typedef struct _POINTL      /* ptl  */
  251. {
  252.     LONG  x;
  253.     LONG  y;
  254. } POINTL, *PPOINTL;
  255.  
  256. typedef struct tagSIZE
  257. {
  258.     LONG        cx;
  259.     LONG        cy;
  260. } SIZE, *PSIZE, *LPSIZE;
  261.  
  262. typedef SIZE               SIZEL;
  263. typedef SIZE               *PSIZEL, *LPSIZEL;
  264.  
  265. typedef struct tagPOINTS
  266. {
  267.     SHORT   x;
  268.     SHORT   y;
  269. } POINTS, *PPOINTS, *LPPOINTS;
  270.  
  271. /* mode selections for the device mode function */
  272. #define DM_UPDATE           1
  273. #define DM_COPY             2
  274. #define DM_PROMPT           4
  275. #define DM_MODIFY           8
  276.  
  277. #define DM_IN_BUFFER        DM_MODIFY
  278. #define DM_IN_PROMPT        DM_PROMPT
  279. #define DM_OUT_BUFFER       DM_COPY
  280. #define DM_OUT_DEFAULT      DM_UPDATE
  281.  
  282. /* device capabilities indices */
  283. #define DC_FIELDS           1
  284. #define DC_PAPERS           2
  285. #define DC_PAPERSIZE        3
  286. #define DC_MINEXTENT        4
  287. #define DC_MAXEXTENT        5
  288. #define DC_BINS             6
  289. #define DC_DUPLEX           7
  290. #define DC_SIZE             8
  291. #define DC_EXTRA            9
  292. #define DC_VERSION          10
  293. #define DC_DRIVER           11
  294. #define DC_BINNAMES         12
  295. #define DC_ENUMRESOLUTIONS  13
  296. #define DC_FILEDEPENDENCIES 14
  297. #define DC_TRUETYPE         15
  298. #define DC_PAPERNAMES       16
  299. #define DC_ORIENTATION      17
  300. #define DC_COPIES           18
  301.  
  302. #ifdef __cplusplus
  303. }
  304. #endif
  305.  
  306. #endif /* _WINDEF_ */   
  307.