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