|
|
1.1 root 1: #ifndef _DRIVINIT_INCLUDED_
2: #define _DRIVINIT_INCLUDED_
3:
4: /*
5: * drivinit.h
6: *
7: * Header file for printer driver initialization using ExtDeviceModeEx()
8: * and DeviceCapabilitiesEx().
9: *
10: */
11:
12: /* size of a device name string */
13: #define CCHDEVICENAME 32
14:
15: /* size of a form name string */
16: #define CCHFORMNAME 32
17:
18: /* current version of specification */
19: #define DM_SPECVERSION 0x320
20:
21: /* field selection bits */
22: #define DM_ORIENTATION 0x0000001L
23: #define DM_PAPERSIZE 0x0000002L
24: #define DM_PAPERLENGTH 0x0000004L
25: #define DM_PAPERWIDTH 0x0000008L
26: #define DM_SCALE 0x0000010L
27: #define DM_COPIES 0x0000100L
28: #define DM_DEFAULTSOURCE 0x0000200L
29: #define DM_PRINTQUALITY 0x0000400L
30: #define DM_COLOR 0x0000800L
31: #define DM_DUPLEX 0x0001000L
32: #define DM_COLLATE 0x0002000L
33: #define DM_FORMNAME 0x0004000L
34:
35: /* orientation selections */
36: #define DMORIENT_PORTRAIT 1
37: #define DMORIENT_LANDSCAPE 2
38:
39: /* paper selections */
40: #define DMPAPER_FIRST DMPAPER_LETTER
41: #define DMPAPER_LETTER 1 /* Letter 8 1/2 x 11 in */
42: #define DMPAPER_LETTERSMALL 2 /* Letter Small 8 1/2 x 11 in */
43: #define DMPAPER_TABLOID 3 /* Tabloid 11 x 17 in */
44: #define DMPAPER_LEDGER 4 /* Ledger 17 x 11 in */
45: #define DMPAPER_LEGAL 5 /* Legal 8 1/2 x 14 in */
46: #define DMPAPER_STATEMENT 6 /* Statement 5 1/2 x 8 1/2 in */
47: #define DMPAPER_EXECUTIVE 7 /* Executive 7 1/4 x 10 1/2 in */
48: #define DMPAPER_A3 8 /* A3 297 x 420 mm */
49: #define DMPAPER_A4 9 /* A4 210 x 297 mm */
50: #define DMPAPER_A4SMALL 10 /* A4 Small 210 x 297 mm */
51: #define DMPAPER_A5 11 /* A5 148 x 210 mm */
52: #define DMPAPER_B4 12 /* B4 250 x 354 */
53: #define DMPAPER_B5 13 /* B5 182 x 257 mm */
54: #define DMPAPER_FOLIO 14 /* Folio 8 1/2 x 13 in */
55: #define DMPAPER_QUARTO 15 /* Quarto 215 x 275 mm */
56: #define DMPAPER_10X14 16 /* 10x14 in */
57: #define DMPAPER_11X17 17 /* 11x17 in */
58: #define DMPAPER_NOTE 18 /* Note 8 1/2 x 11 in */
59: #define DMPAPER_ENV_9 19 /* Envelope #9 3 7/8 x 8 7/8 */
60: #define DMPAPER_ENV_10 20 /* Envelope #10 4 1/8 x 9 1/2 */
61: #define DMPAPER_ENV_11 21 /* Envelope #11 4 1/2 x 10 3/8 */
62: #define DMPAPER_ENV_12 22 /* Envelope #12 4 \276 x 11 */
63: #define DMPAPER_ENV_14 23 /* Envelope #14 5 x 11 1/2 */
64: #define DMPAPER_CSHEET 24 /* C size sheet */
65: #define DMPAPER_DSHEET 25 /* D size sheet */
66: #define DMPAPER_ESHEET 26 /* E size sheet */
67: #define DMPAPER_ENV_DL 27 /* Envelope DL 110 x 220mm */
68: #define DMPAPER_ENV_C5 28 /* Envelope C5 162 x 229 mm */
69: #define DMPAPER_ENV_C3 29 /* Envelope C3 324 x 458 mm */
70: #define DMPAPER_ENV_C4 30 /* Envelope C4 229 x 324 mm */
71: #define DMPAPER_ENV_C6 31 /* Envelope C6 114 x 162 mm */
72: #define DMPAPER_ENV_C65 32 /* Envelope C65 114 x 229 mm */
73: #define DMPAPER_ENV_B4 33 /* Envelope B4 250 x 353 mm */
74: #define DMPAPER_ENV_B5 34 /* Envelope B5 176 x 250 mm */
75: #define DMPAPER_ENV_B6 35 /* Envelope B6 176 x 125 mm */
76: #define DMPAPER_ENV_ITALY 36 /* Envelope 110 x 230 mm */
77: #define DMPAPER_ENV_MONARCH 37 /* Envelope Monarch 3.875 x 7.5 in */
78: #define DMPAPER_ENV_PERSONAL 38 /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */
79: #define DMPAPER_FANFOLD_US 39 /* US Std Fanfold 14 7/8 x 11 in */
80: #define DMPAPER_FANFOLD_STD_GERMAN 40 /* German Std Fanfold 8 1/2 x 12 in */
81: #define DMPAPER_FANFOLD_LGL_GERMAN 41 /* German Legal Fanfold 8 1/2 x 13 in */
82:
83: #define DMPAPER_LAST DMPAPER_FANFOLD_LGL_GERMAN
84:
85: #define DMPAPER_USER 256
86:
87: /* bin selections */
88: #define DMBIN_FIRST DMBIN_UPPER
89: #define DMBIN_UPPER 1
90: #define DMBIN_ONLYONE 1
91: #define DMBIN_LOWER 2
92: #define DMBIN_MIDDLE 3
93: #define DMBIN_MANUAL 4
94: #define DMBIN_ENVELOPE 5
95: #define DMBIN_ENVMANUAL 6
96: #define DMBIN_AUTO 7
97: #define DMBIN_TRACTOR 8
98: #define DMBIN_SMALLFMT 9
99: #define DMBIN_LARGEFMT 10
100: #define DMBIN_LARGECAPACITY 11
101: #define DMBIN_CASSETTE 14
102: #define DMBIN_LAST DMBIN_CASSETTE
103:
104: #define DMBIN_USER 256 /* device specific bins start here */
105:
106: /* print qualities */
107: #define DMRES_DRAFT (-1)
108: #define DMRES_LOW (-2)
109: #define DMRES_MEDIUM (-3)
110: #define DMRES_HIGH (-4)
111:
112: /* color enable/disable for color printers */
113: #define DMCOLOR_MONOCHROME 1
114: #define DMCOLOR_COLOR 2
115:
116: /* duplex enable */
117: #define DMDUP_SIMPLEX 1
118: #define DMDUP_VERTICAL 2
119: #define DMDUP_HORIZONTAL 3
120:
121: /* Collation selections */
122: #define DMCOLLATE_FALSE 0
123: #define DMCOLLATE_TRUE 1
124:
125: #ifndef _WINGDI_
126: typedef struct _devicemode {
127: char dmDeviceName[CCHDEVICENAME];
128: WORD dmSpecVersion;
129: WORD dmDriverVersion;
130: WORD dmSize;
131: WORD dmDriverExtra;
132: DWORD dmFields;
133: short dmOrientation;
134: short dmPaperSize;
135: short dmPaperLength;
136: short dmPaperWidth;
137: short dmScale;
138: short dmCopies;
139: short dmDefaultSource;
140: short dmPrintQuality;
141: short dmColor;
142: short dmDuplex;
143: short dmCollate;
144: char dmFormName[CCHFORMNAME];
145: } DEVMODE;
146:
147: typedef DEVMODE * PDEVMODE, NEAR * NPDEVMODE, FAR * LPDEVMODE;
148:
149: #endif
150:
151: /* mode selections for the device mode function */
152: #define DM_UPDATE 1
153: #define DM_COPY 2
154: #define DM_PROMPT 4
155: #define DM_MODIFY 8
156:
157: #define DM_IN_BUFFER DM_MODIFY
158: #define DM_IN_PROMPT DM_PROMPT
159: #define DM_OUT_BUFFER DM_COPY
160: #define DM_OUT_DEFAULT DM_UPDATE
161:
162: /* device capabilities indices */
163: #define DC_FIELDS 1
164: #define DC_PAPERS 2
165: #define DC_PAPERSIZE 3
166: #define DC_MINEXTENT 4
167: #define DC_MAXEXTENT 5
168: #define DC_BINS 6
169: #define DC_DUPLEX 7
170: #define DC_SIZE 8
171: #define DC_EXTRA 9
172: #define DC_VERSION 10
173: #define DC_DRIVER 11
174: #define DC_BINNAMES 12
175: #define DC_ENUMRESOLUTIONS 13
176: #define DC_FILEDEPENDENCIES 14
177: #define DC_TRUETYPE 15
178: #define DC_PAPERNAMES 16
179: #define DC_ORIENTATION 17
180: #define DC_COPIES 18
181:
182: /* export ordinal definitions */
183: #define PROC_EXTDEVICEMODE MAKEINTRESOURCE(90)
184: #define PROC_DEVICECAPABILITIES MAKEINTRESOURCE(91)
185: #define PROC_OLDDEVICEMODE MAKEINTRESOURCE(13)
186:
187: /* define types of pointers to ExtDeviceModeEx() and DeviceCapabilitiesEx()
188: * functions
189: */
190: #ifndef _WINUSER_
191: typedef WORD HANDLE;
192: typedef WORD HWND;
193: #endif
194:
195: typedef WORD FAR PASCAL FNDEVMODE(HWND, HANDLE, LPDEVMODE, LPSTR, LPSTR,
196: LPDEVMODE, LPSTR, WORD);
197:
198: typedef FNDEVMODE FAR * LPFNDEVMODE;
199:
200: typedef DWORD FAR PASCAL FNDEVCAPS(LPSTR, LPSTR, WORD, LPSTR, LPDEVMODE);
201:
202: typedef FNDEVCAPS FAR * LPFNDEVCAPS;
203:
204: HDC FAR PASCAL ResetDC(HDC, LPDEVMODE);
205:
206: #endif // _DRIVINIT_INCLUDED_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.