|
|
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:
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
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:
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:
67: #define far
68: #define near
69: #define pascal
70: #ifdef DOSWIN32
71: #define cdecl _cdecl
72: #ifndef CDECL
73: #define CDECL _cdecl
74: #endif
75: #else
76: #define cdecl
77: #ifndef CDECL
78: #define CDECL
79: #endif
80: #endif
81: #define CALLBACK
82: #define WINAPI
83: #define APIENTRY WINAPI
84: #define APIPRIVATE
85:
86: #define FAR far
87: #define NEAR near
88: #define PASCAL pascal
89: #ifndef CONST
90: #define CONST const
91: #endif
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:
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:
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
151: DECLARE_HANDLE (HWND);
152: DECLARE_HANDLE (HHOOK);
153: #endif
154:
155: typedef WORD ATOM;
156:
157: typedef HANDLE NEAR *SPHANDLE;
158: typedef HANDLE FAR *LPHANDLE;
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(HINSTANCE);
193: DECLARE_HANDLE(HPALETTE);
194: DECLARE_HANDLE(HPEN);
195: DECLARE_HANDLE(HRGN);
196: DECLARE_HANDLE(HRSRC);
197: DECLARE_HANDLE(HSTR);
198: DECLARE_HANDLE(HWINSTA);
199: DECLARE_HANDLE(HKL);
200:
201: typedef int HFILE; /* Polymorphic with C runtime file handle type */
202: typedef HICON HCURSOR; /* HICONs & HCURSORs are polymorphic */
203:
204: typedef DWORD COLORREF;
205: typedef DWORD *LPCOLORREF;
206:
207: #define HFILE_ERROR ((HFILE)-1)
208:
209: typedef struct tagRECT
210: {
211: LONG left;
212: LONG top;
213: LONG right;
214: LONG bottom;
215: } RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;
216:
217: typedef struct _RECTL /* rcl */
218: {
219: LONG left;
220: LONG top;
221: LONG right;
222: LONG bottom;
223: } RECTL, *PRECTL;
224:
225: typedef struct tagPOINT
226: {
227: LONG x;
228: LONG y;
229: } POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
230:
231: typedef struct _POINTL /* ptl */
232: {
233: LONG x;
234: LONG y;
235: } POINTL, *PPOINTL;
236:
237: typedef struct tagSIZE
238: {
239: LONG cx;
240: LONG cy;
241: } SIZE, *PSIZE, *LPSIZE;
242:
243: typedef SIZE SIZEL;
244: typedef SIZE *PSIZEL;
245:
246: typedef struct tagPOINTS
247: {
248: SHORT x;
249: SHORT y;
250: } POINTS, *PPOINTS, *LPPOINTS;
251:
252: /* mode selections for the device mode function */
253: #define DM_UPDATE 1
254: #define DM_COPY 2
255: #define DM_PROMPT 4
256: #define DM_MODIFY 8
257:
258: #define DM_IN_BUFFER DM_MODIFY
259: #define DM_IN_PROMPT DM_PROMPT
260: #define DM_OUT_BUFFER DM_COPY
261: #define DM_OUT_DEFAULT DM_UPDATE
262:
263: /* device capabilities indices */
264: #define DC_FIELDS 1
265: #define DC_PAPERS 2
266: #define DC_PAPERSIZE 3
267: #define DC_MINEXTENT 4
268: #define DC_MAXEXTENT 5
269: #define DC_BINS 6
270: #define DC_DUPLEX 7
271: #define DC_SIZE 8
272: #define DC_EXTRA 9
273: #define DC_VERSION 10
274: #define DC_DRIVER 11
275: #define DC_BINNAMES 12
276: #define DC_ENUMRESOLUTIONS 13
277: #define DC_FILEDEPENDENCIES 14
278: #define DC_TRUETYPE 15
279: #define DC_PAPERNAMES 16
280: #define DC_ORIENTATION 17
281: #define DC_COPIES 18
282:
283:
284: #endif // _WINDEF_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.