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