Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

565 lines
24 KiB

  1. /****************************************************************************
  2. * *
  3. * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY *
  4. * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE *
  5. * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR *
  6. * PURPOSE. *
  7. * *
  8. * Copyright (C) 1993-95 Microsoft Corporation. All Rights Reserved. *
  9. * *
  10. ****************************************************************************/
  11. /*****************************************************************************\
  12. * *
  13. * print.h - Printing helper functions, types, and definitions *
  14. * *
  15. *******************************************************************************
  16. *
  17. * PRINTDRIVER - For inclusion with a printer driver
  18. * NOPQ - Prevent inclusion of priority queue APIs
  19. * NOEXTDEVMODEPROPSHEET - Prevent inclusion of shlobj.h and defs for printer
  20. * property sheet pages
  21. *
  22. \*****************************************************************************/
  23. #ifndef _INC_PRINT
  24. #define _INC_PRINT
  25. #ifndef RC_INVOKED
  26. //#pragma pack(1) /* Assume byte packing throughout */ DANNY
  27. #endif /* !RC_INVOKED */
  28. #ifdef __cplusplus
  29. extern "C" { /* Assume C declarations for C++ */
  30. #endif /* __cplusplus */
  31. #ifdef PRINTDRIVER
  32. #define NOTEXTMETRICS
  33. #define NOGDICAPMASKS
  34. #define NOGDIOBJ
  35. #define NOBITMAP
  36. #define NOSOUND
  37. #define NOTEXTMETRIC
  38. #define NOCOMM
  39. #define NOKANJI
  40. #define NOENHMETAFILE
  41. #include <windows.h>
  42. #undef NOENHMETAFILE
  43. #undef NOTEXTMETRICS
  44. #undef NOGDICAPMASKS
  45. #undef NOGDICAPMASKS
  46. #undef NOGDIOBJ
  47. #undef NOBITMAP
  48. #undef NOSOUND
  49. #undef NOTEXTMETRIC
  50. #undef NOCOMM
  51. #undef NOKANJI
  52. #define NOPTRC /* don't allow gdidefs.inc to redef these */
  53. #define PTTYPE POINT
  54. #define PQERROR (-1)
  55. #ifndef NOPQ
  56. DECLARE_HANDLE(HPQ);
  57. HPQ WINAPI CreatePQ(int);
  58. int WINAPI MinPQ(HPQ);
  59. int WINAPI ExtractPQ(HPQ);
  60. int WINAPI InsertPQ(HPQ, int, int);
  61. int WINAPI SizePQ(HPQ, int);
  62. void WINAPI DeletePQ(HPQ);
  63. #endif /* !NOPQ */
  64. #endif /* !PRINTDRIVER */
  65. /* spooler error code */
  66. #define SP_ERROR (-1) /* general error - mostly used when spooler isn't loaded */
  67. #define SP_APPABORT (-2) /* app aborted the job through the driver */
  68. #define SP_USERABORT (-3) /* user aborted the job through spooler's front end */
  69. #define SP_OUTOFDISK (-4) /* simply no disk to spool */
  70. #define SP_OUTOFMEMORY (-5)
  71. #define SP_RETRY (-6) /* retry sending to the port again */
  72. /* Spool routines for use by printer drivers */
  73. typedef HANDLE HPJOB;
  74. HPJOB WINAPI OpenJobEx(HDC, LPDOCINFO);
  75. HPJOB WINAPI OpenJob(LPSTR, LPSTR, HDC);
  76. int WINAPI StartSpoolPage(HPJOB);
  77. int WINAPI EndSpoolPage(HPJOB);
  78. int WINAPI WriteSpool(HPJOB, LPSTR, int);
  79. int WINAPI CloseJob(HPJOB);
  80. int WINAPI DeleteJob(HPJOB, int);
  81. int WINAPI WriteDialog(HPJOB, LPSTR, int);
  82. int WINAPI DeleteSpoolPage(HPJOB);
  83. DWORD WINAPI DrvSetPrinterData(LPSTR, LPSTR, DWORD, LPBYTE, DWORD);
  84. DWORD WINAPI DrvGetPrinterData(LPSTR, LPSTR, LPDWORD, LPBYTE, DWORD, LPDWORD);
  85. #define PD_DEFAULT_DEVMODE "Default DevMode"
  86. #define PD_PRINTER_MODEL "Printer Model"
  87. #define PD_INSTALLED_MEMORY "Installed Memory"
  88. #define PD_AVAILABLE_MEMORY "Available Memory"
  89. #define INT_PD_DEFAULT_DEVMODE MAKEINTRESOURCE(1)
  90. #define INT_PD_PRINTER_MODEL MAKEINTRESOURCE(2)
  91. #define DATATYPE_RAW "RAW"
  92. #define DATATYPE_EMF "EMF"
  93. #define DATATYPE_EPS "EPS"
  94. typedef struct tagBANDINFOSTRUCT
  95. {
  96. BOOL fGraphics;
  97. BOOL fText;
  98. RECT rcGraphics;
  99. } BANDINFOSTRUCT, FAR* LPBI;
  100. #define USA_COUNTRYCODE 1
  101. /*
  102. * Printer driver initialization using ExtDeviceMode()
  103. * and DeviceCapabilities().
  104. * This replaces Drivinit.h
  105. */
  106. /* size of a device name string */
  107. #define CCHDEVICENAME 32
  108. #define CCHPAPERNAME 64
  109. #define CCHFORMNAME 32
  110. /* current version of specification */
  111. #define DM_SPECVERSION 0x0400
  112. /* field selection bits */
  113. #define DM_ORIENTATION 0x00000001L
  114. #define DM_PAPERSIZE 0x00000002L
  115. #define DM_PAPERLENGTH 0x00000004L
  116. #define DM_PAPERWIDTH 0x00000008L
  117. #define DM_SCALE 0x00000010L
  118. #define DM_COPIES 0x00000100L
  119. #define DM_DEFAULTSOURCE 0x00000200L
  120. #define DM_PRINTQUALITY 0x00000400L
  121. #define DM_COLOR 0x00000800L
  122. #define DM_DUPLEX 0x00001000L
  123. #define DM_YRESOLUTION 0x00002000L
  124. #define DM_TTOPTION 0x00004000L
  125. #define DM_COLLATE 0x00008000L
  126. #define DM_FORMNAME 0x00010000L
  127. #define DM_LOGPIXELS 0x00020000L
  128. #define DM_BITSPERPEL 0x00040000L
  129. #define DM_PELSWIDTH 0x00080000L
  130. #define DM_PELSHEIGHT 0x00100000L
  131. #define DM_DISPLAYFLAGS 0x00200000L
  132. #define DM_DISPLAYFREQUENCY 0x00400000L
  133. #define DM_ICMMETHOD 0x00800000L
  134. #define DM_ICMINTENT 0x01000000L
  135. #define DM_MEDIATYPE 0x02000000L
  136. #define DM_DITHERTYPE 0x04000000L
  137. /* orientation selections */
  138. #define DMORIENT_PORTRAIT 1
  139. #define DMORIENT_LANDSCAPE 2
  140. /* paper selections */
  141. #define DMPAPER_FIRST DMPAPER_LETTER
  142. #define DMPAPER_LETTER 1 /* Letter 8 1/2 x 11 in */
  143. #define DMPAPER_LETTERSMALL 2 /* Letter Small 8 1/2 x 11 in */
  144. #define DMPAPER_TABLOID 3 /* Tabloid 11 x 17 in */
  145. #define DMPAPER_LEDGER 4 /* Ledger 17 x 11 in */
  146. #define DMPAPER_LEGAL 5 /* Legal 8 1/2 x 14 in */
  147. #define DMPAPER_STATEMENT 6 /* Statement 5 1/2 x 8 1/2 in */
  148. #define DMPAPER_EXECUTIVE 7 /* Executive 7 1/4 x 10 1/2 in */
  149. #define DMPAPER_A3 8 /* A3 297 x 420 mm */
  150. #define DMPAPER_A4 9 /* A4 210 x 297 mm */
  151. #define DMPAPER_A4SMALL 10 /* A4 Small 210 x 297 mm */
  152. #define DMPAPER_A5 11 /* A5 148 x 210 mm */
  153. #define DMPAPER_B4 12 /* B4 (JIS) 257 x 364 mm */
  154. #define DMPAPER_B5 13 /* B5 (JIS) 182 x 257 mm */
  155. #define DMPAPER_FOLIO 14 /* Folio 8 1/2 x 13 in */
  156. #define DMPAPER_QUARTO 15 /* Quarto 215 x 275 mm */
  157. #define DMPAPER_10X14 16 /* 10 x 14 in */
  158. #define DMPAPER_11X17 17 /* 11 x 17 in */
  159. #define DMPAPER_NOTE 18 /* Note 8 1/2 x 11 in */
  160. #define DMPAPER_ENV_9 19 /* Envelope #9 3 7/8 x 8 7/8 in */
  161. #define DMPAPER_ENV_10 20 /* Envelope #10 4 1/8 x 9 1/2 in */
  162. #define DMPAPER_ENV_11 21 /* Envelope #11 4 1/2 x 10 3/8 in */
  163. #define DMPAPER_ENV_12 22 /* Envelope #12 4 3/4 x 11 in */
  164. #define DMPAPER_ENV_14 23 /* Envelope #14 5 x 11 1/2 in */
  165. #define DMPAPER_CSHEET 24 /* C size sheet */
  166. #define DMPAPER_DSHEET 25 /* D size sheet */
  167. #define DMPAPER_ESHEET 26 /* E size sheet */
  168. #define DMPAPER_ENV_DL 27 /* Envelope DL 110 x 220 mm */
  169. #define DMPAPER_ENV_C5 28 /* Envelope C5 162 x 229 mm */
  170. #define DMPAPER_ENV_C3 29 /* Envelope C3 324 x 458 mm */
  171. #define DMPAPER_ENV_C4 30 /* Envelope C4 229 x 324 mm */
  172. #define DMPAPER_ENV_C6 31 /* Envelope C6 114 x 162 mm */
  173. #define DMPAPER_ENV_C65 32 /* Envelope C65 114 x 229 mm */
  174. #define DMPAPER_ENV_B4 33 /* Envelope B4 250 x 353 mm */
  175. #define DMPAPER_ENV_B5 34 /* Envelope B5 176 x 250 mm */
  176. #define DMPAPER_ENV_B6 35 /* Envelope B6 176 x 125 mm */
  177. #define DMPAPER_ENV_ITALY 36 /* Envelope 110 x 230 mm */
  178. #define DMPAPER_ENV_MONARCH 37 /* Envelope Monarch 3 7/8 x 7 1/2 in */
  179. #define DMPAPER_ENV_PERSONAL 38 /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */
  180. #define DMPAPER_FANFOLD_US 39 /* US Standard Fanfold 14 7/8 x 11 in */
  181. #define DMPAPER_FANFOLD_STD_GERMAN 40 /* German Standard Fanfold 8 1/2 x 12 in */
  182. #define DMPAPER_FANFOLD_LGL_GERMAN 41 /* German Legal Fanfold 8 1/2 x 13 in */
  183. /*
  184. ** the following sizes are new in Windows 95
  185. */
  186. #define DMPAPER_ISO_B4 42 /* B4 (ISO) 250 x 353 mm */
  187. #define DMPAPER_JAPANESE_POSTCARD 43 /* Japanese Postcard 100 x 148 mm */
  188. #define DMPAPER_9X11 44 /* 9 x 11 in */
  189. #define DMPAPER_10X11 45 /* 10 x 11 in */
  190. #define DMPAPER_15X11 46 /* 15 x 11 in */
  191. #define DMPAPER_ENV_INVITE 47 /* Envelope Invite 220 x 220 mm */
  192. #define DMPAPER_RESERVED_48 48 /* RESERVED--DO NOT USE */
  193. #define DMPAPER_RESERVED_49 49 /* RESERVED--DO NOT USE */
  194. /*
  195. ** the following sizes were used in Windows 3.1 WDL PostScript driver
  196. ** and are retained here for compatibility with the old driver.
  197. ** Tranverse is used as in the PostScript language, and indicates that
  198. ** the physical page is rotated, but that the logical page is not.
  199. */
  200. #define DMPAPER_LETTER_EXTRA 50 /* Letter Extra 9 1/2 x 12 in */
  201. #define DMPAPER_LEGAL_EXTRA 51 /* Legal Extra 9 1/2 x 15 in */
  202. #define DMPAPER_TABLOID_EXTRA 52 /* Tabloid Extra 11.69 x 18 in */
  203. #define DMPAPER_A4_EXTRA 53 /* A4 Extra 9.27 x 12.69 in */
  204. #define DMPAPER_LETTER_TRANSVERSE 54 /* Letter Transverse 8 1/2 x 11 in */
  205. #define DMPAPER_A4_TRANSVERSE 55 /* A4 Transverse 210 x 297 mm */
  206. #define DMPAPER_LETTER_EXTRA_TRANSVERSE 56 /* Letter Extra Transverse 9 1/2 x 12 in */
  207. #define DMPAPER_A_PLUS 57 /* SuperA/SuperA/A4 227 x 356 mm */
  208. #define DMPAPER_B_PLUS 58 /* SuperB/SuperB/A3 305 x 487 mm */
  209. #define DMPAPER_LETTER_PLUS 59 /* Letter Plus 8.5 x 12.69 in */
  210. #define DMPAPER_A4_PLUS 60 /* A4 Plus 210 x 330 mm */
  211. #define DMPAPER_A5_TRANSVERSE 61 /* A5 Transverse 148 x 210 mm */
  212. #define DMPAPER_B5_TRANSVERSE 62 /* B5 (JIS) Transverse 182 x 257 mm */
  213. #define DMPAPER_A3_EXTRA 63 /* A3 Extra 322 x 445 mm */
  214. #define DMPAPER_A5_EXTRA 64 /* A5 Extra 174 x 235 mm */
  215. #define DMPAPER_B5_EXTRA 65 /* B5 (ISO) Extra 201 x 276 mm */
  216. #define DMPAPER_A2 66 /* A2 420 x 594 mm */
  217. #define DMPAPER_A3_TRANSVERSE 67 /* A3 Transverse 297 x 420 mm */
  218. #define DMPAPER_A3_EXTRA_TRANSVERSE 68 /* A3 Extra Transverse 322 x 445 mm */
  219. #ifdef DBCS
  220. /*
  221. ** the following sizes are reserved for the Far East version of Win95.
  222. ** Rotated papers rotate the physical page but not the logical page.
  223. */
  224. #define DMPAPER_DBL_JAPANESE_POSTCARD 69 /* Japanese Double Postcard 200 x 148 mm */
  225. #define DMPAPER_A6 70 /* A6 105 x 148 mm */
  226. #define DMPAPER_JENV_KAKU2 71 /* Japanese Envelope Kaku #2 */
  227. #define DMPAPER_JENV_KAKU3 72 /* Japanese Envelope Kaku #3 */
  228. #define DMPAPER_JENV_CHOU3 73 /* Japanese Envelope Chou #3 */
  229. #define DMPAPER_JENV_CHOU4 74 /* Japanese Envelope Chou #4 */
  230. #define DMPAPER_LETTER_ROTATED 75 /* Letter Rotated 11 x 8 1/2 11 in */
  231. #define DMPAPER_A3_ROTATED 76 /* A3 Rotated 420 x 297 mm */
  232. #define DMPAPER_A4_ROTATED 77 /* A4 Rotated 297 x 210 mm */
  233. #define DMPAPER_A5_ROTATED 78 /* A5 Rotated 210 x 148 mm */
  234. #define DMPAPER_B4_JIS_ROTATED 79 /* B4 (JIS) Rotated 364 x 257 mm */
  235. #define DMPAPER_B5_JIS_ROTATED 80 /* B5 (JIS) Rotated 257 x 182 mm */
  236. #define DMPAPER_JAPANESE_POSTCARD_ROTATED 81 /* Japanese Postcard Rotated 148 x 100 mm */
  237. #define DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED 82 /* Double Japanese Postcard Rotated 148 x 200 mm */
  238. #define DMPAPER_A6_ROTATED 83 /* A6 Rotated 148 x 105 mm */
  239. #define DMPAPER_JENV_KAKU2_ROTATED 84 /* Japanese Envelope Kaku #2 Rotated*/
  240. #define DMPAPER_JENV_KAKU3_ROTATED 85 /* Japanese Envelope Kaku #3 Rotated*/
  241. #define DMPAPER_JENV_CHOU3_ROTATED 86 /* Japanese Envelope Chou #3 Rotated*/
  242. #define DMPAPER_JENV_CHOU4_ROTATED 87 /* Japanese Envelope Chou #4 Rotated*/
  243. #define DMPAPER_B6_JIS 88 /* B6 (JIS) 128 x 182 mm */
  244. #define DMPAPER_B6_JIS_ROTATED 89 /* B6 (JIS) Rotated 182 x 128 mm */
  245. #define DMPAPER_12X11 90 /* 12 x 11 in */
  246. #define DMPAPER_JENV_YOU4 91 /* Japanese Envelope You #4 */
  247. #define DMPAPER_JENV_YOU4_ROTATED 92 /* Japanese Envelope You #4 Rotated*/
  248. #define DMPAPER_P16K 93 /* PRC 16K 146 x 215 mm */
  249. #define DMPAPER_P32K 94 /* PRC 32K 97 x 151 mm */
  250. #define DMPAPER_P32KBIG 95 /* PRC 32K(Big) 97 x 151 mm */
  251. #define DMPAPER_PENV_1 96 /* PRC Envelope #1 102 x 165 mm */
  252. #define DMPAPER_PENV_2 97 /* PRC Envelope #2 102 x 176 mm */
  253. #define DMPAPER_PENV_3 98 /* PRC Envelope #3 125 x 176 mm */
  254. #define DMPAPER_PENV_4 99 /* PRC Envelope #4 110 x 208 mm */
  255. #define DMPAPER_PENV_5 100 /* PRC Envelope #5 110 x 220 mm */
  256. #define DMPAPER_PENV_6 101 /* PRC Envelope #6 120 x 230 mm */
  257. #define DMPAPER_PENV_7 102 /* PRC Envelope #7 160 x 230 mm */
  258. #define DMPAPER_PENV_8 103 /* PRC Envelope #8 120 x 309 mm */
  259. #define DMPAPER_PENV_9 104 /* PRC Envelope #9 229 x 324 mm */
  260. #define DMPAPER_PENV_10 105 /* PRC Envelope #10 324 x 458 mm */
  261. #define DMPAPER_P16K_ROTATED 106 /* PRC 16K Rotated */
  262. #define DMPAPER_P32K_ROTATED 107 /* PRC 32K Rotated */
  263. #define DMPAPER_P32KBIG_ROTATED 108 /* PRC 32K(Big) Rotated */
  264. #define DMPAPER_PENV_1_ROTATED 109 /* PRC Envelope #1 Rotated 165 x 102 mm*/
  265. #define DMPAPER_PENV_2_ROTATED 110 /* PRC Envelope #2 Rotated 176 x 102 mm*/
  266. #define DMPAPER_PENV_3_ROTATED 111 /* PRC Envelope #3 Rotated 176 x 125 mm*/
  267. #define DMPAPER_PENV_4_ROTATED 112 /* PRC Envelope #4 Rotated 208 x 110 mm*/
  268. #define DMPAPER_PENV_5_ROTATED 113 /* PRC Envelope #5 Rotated 220 x 110 mm*/
  269. #define DMPAPER_PENV_6_ROTATED 114 /* PRC Envelope #6 Rotated 230 x 120 mm*/
  270. #define DMPAPER_PENV_7_ROTATED 115 /* PRC Envelope #7 Rotated 230 x 160 mm*/
  271. #define DMPAPER_PENV_8_ROTATED 116 /* PRC Envelope #8 Rotated 309 x 120 mm*/
  272. #define DMPAPER_PENV_9_ROTATED 117 /* PRC Envelope #9 Rotated 324 x 229 mm*/
  273. #define DMPAPER_PENV_10_ROTATED 118 /* PRC Envelope #10 Rotated 458 x 324 mm */
  274. #define DMPAPER_LAST DMPAPER_PENV_10_ROTATED
  275. #else
  276. #define DMPAPER_LAST DMPAPER_A3_EXTRA_TRANSVERSE
  277. #endif
  278. #define DMPAPER_USER 256
  279. /* bin selections */
  280. #define DMBIN_FIRST DMBIN_UPPER
  281. #define DMBIN_UPPER 1
  282. #define DMBIN_ONLYONE 1
  283. #define DMBIN_LOWER 2
  284. #define DMBIN_MIDDLE 3
  285. #define DMBIN_MANUAL 4
  286. #define DMBIN_ENVELOPE 5
  287. #define DMBIN_ENVMANUAL 6
  288. #define DMBIN_AUTO 7
  289. #define DMBIN_TRACTOR 8
  290. #define DMBIN_SMALLFMT 9
  291. #define DMBIN_LARGEFMT 10
  292. #define DMBIN_LARGECAPACITY 11
  293. #define DMBIN_CASSETTE 14
  294. #define DMBIN_FORMSOURCE 15 /* not supported under windows 95 */
  295. #define DMBIN_LAST DMBIN_FORMSOURCE
  296. #define DMBIN_USER 256 /* device specific bins start here */
  297. /* print qualities */
  298. #define DMRES_DRAFT (-1)
  299. #define DMRES_LOW (-2)
  300. #define DMRES_MEDIUM (-3)
  301. #define DMRES_HIGH (-4)
  302. /* color enable/disable for color printers */
  303. #define DMCOLOR_MONOCHROME 1
  304. #define DMCOLOR_COLOR 2
  305. /* duplex enable */
  306. #define DMDUP_SIMPLEX 1
  307. #define DMDUP_VERTICAL 2
  308. #define DMDUP_HORIZONTAL 3
  309. #define DMDUP_LAST DMDUP_HORIZONTAL
  310. /* TrueType options */
  311. #define DMTT_BITMAP 1 /* print TT fonts as graphics */
  312. #define DMTT_DOWNLOAD 2 /* download TT fonts as soft fonts */
  313. #define DMTT_SUBDEV 3 /* substitute device fonts for TT fonts */
  314. #define DMTT_DOWNLOAD_OUTLINE 4 /* download TT fonts as outline soft fonts */
  315. #define DMTT_LAST DMTT_DOWNLOAD_OUTLINE
  316. /* Collation selections */
  317. #define DMCOLLATE_TRUE 1 /* Collate multiple output pages */
  318. #define DMCOLLATE_FALSE 0 /* Do not collate multiple output pages */
  319. /* DEVMODE dmDisplayFlags flags */
  320. #define DM_GRAYSCALE 0x00000001L /* Device is non-color */
  321. #define DM_INTERLACED 0x00000002L /* device is interlaced */
  322. /* ICM methods */
  323. #define DMICMMETHOD_NONE 1 /* ICM disabled */
  324. #define DMICMMETHOD_SYSTEM 2 /* ICM handled by system */
  325. #define DMICMMETHOD_DRIVER 3 /* ICM handled by driver */
  326. #define DMICMMETHOD_DEVICE 4 /* ICM handled by device */
  327. #define DMICMMETHOD_LAST DMICMMETHOD_DEVICE
  328. #define DMICMMETHOD_USER 256 /* Device-specific methods start here */
  329. /* ICM Intents */
  330. #define DMICM_SATURATE 1 /* Maximize color saturation */
  331. #define DMICM_CONTRAST 2 /* Maximize color contrast */
  332. #define DMICM_COLORMETRIC 3 /* Use specific color metric */
  333. #define DMICM_LAST DMICM_COLORMETRIC
  334. #define DMICM_USER 256 /* Device-specific intents start here */
  335. /* Media types */
  336. #define DMMEDIA_STANDARD 1 /* Standard paper */
  337. #define DMMEDIA_TRANSPARENCY 2 /* Transparency */
  338. #define DMMEDIA_GLOSSY 3 /* Glossy paper */
  339. #define DMMEDIA_LAST DMMEDIA_GLOSSY
  340. #define DMMEDIA_USER 256 /* Device-specific media start here */
  341. /* Dither types */
  342. #define DMDITHER_NONE 1 /* No dithering */
  343. #define DMDITHER_COARSE 2 /* Dither with a coarse brush */
  344. #define DMDITHER_FINE 3 /* Dither with a fine brush */
  345. #define DMDITHER_LINEART 4 /* LineArt dithering */
  346. #define DMDITHER_ERRORDIFFUSION 5 /* Error Diffusion */
  347. /* id 6-9 are reserved for future use */
  348. #define DMDITHER_GRAYSCALE 10 /* Device does grayscaling */
  349. #define DMDITHER_LAST DMDITHER_GRAYSCALE
  350. #define DMDITHER_USER 256 /* Device-specific dithers start here */
  351. typedef struct tagDEVMODE
  352. {
  353. char dmDeviceName[CCHDEVICENAME];
  354. UINT dmSpecVersion;
  355. UINT dmDriverVersion;
  356. UINT dmSize;
  357. UINT dmDriverExtra;
  358. DWORD dmFields;
  359. int dmOrientation;
  360. int dmPaperSize;
  361. int dmPaperLength;
  362. int dmPaperWidth;
  363. int dmScale;
  364. int dmCopies;
  365. int dmDefaultSource;
  366. int dmPrintQuality;
  367. int dmColor;
  368. int dmDuplex;
  369. int dmYResolution;
  370. int dmTTOption;
  371. int dmCollate;
  372. char dmFormName[CCHFORMNAME];
  373. WORD dmLogPixels;
  374. DWORD dmBitsPerPel;
  375. DWORD dmPelsWidth;
  376. DWORD dmPelsHeight;
  377. DWORD dmDisplayFlags;
  378. DWORD dmDisplayFrequency;
  379. DWORD dmICMMethod;
  380. DWORD dmICMIntent;
  381. DWORD dmMediaType;
  382. DWORD dmDitherType;
  383. DWORD dmReserved1;
  384. DWORD dmReserved2;
  385. } DEVMODE;
  386. typedef DEVMODE* PDEVMODE, NEAR* NPDEVMODE, FAR* LPDEVMODE;
  387. /* mode selections for the device mode function */
  388. #define DM_UPDATE 1
  389. #define DM_COPY 2
  390. #define DM_PROMPT 4
  391. #define DM_MODIFY 8
  392. #define DM_IN_BUFFER DM_MODIFY
  393. #define DM_IN_PROMPT DM_PROMPT
  394. #define DM_OUT_BUFFER DM_COPY
  395. #define DM_OUT_DEFAULT DM_UPDATE
  396. /* device capabilities indices */
  397. #define DC_FIELDS 1
  398. #define DC_PAPERS 2
  399. #define DC_PAPERSIZE 3
  400. #define DC_MINEXTENT 4
  401. #define DC_MAXEXTENT 5
  402. #define DC_BINS 6
  403. #define DC_DUPLEX 7
  404. #define DC_SIZE 8
  405. #define DC_EXTRA 9
  406. #define DC_VERSION 10
  407. #define DC_DRIVER 11
  408. #define DC_BINNAMES 12
  409. #define DC_ENUMRESOLUTIONS 13
  410. #define DC_FILEDEPENDENCIES 14
  411. #define DC_TRUETYPE 15
  412. #define DC_PAPERNAMES 16
  413. #define DC_ORIENTATION 17
  414. #define DC_COPIES 18
  415. #define DC_BINADJUST 19
  416. #define DC_EMF_COMPLIANT 20
  417. #define DC_DATATYPE_PRODUCED 21
  418. #define DC_ICC_MANUFACTURER 23
  419. #define DC_ICC_MODEL 24
  420. /* bit fields of the return value (DWORD) for DC_TRUETYPE */
  421. #define DCTT_BITMAP 0x0000001L
  422. #define DCTT_DOWNLOAD 0x0000002L
  423. #define DCTT_SUBDEV 0x0000004L
  424. #define DCTT_DOWNLOAD_OUTLINE 0x0000008L
  425. /* return values for DC_BINADJUST */
  426. #define DCBA_FACEUPNONE 0x0000
  427. #define DCBA_FACEUPCENTER 0x0001
  428. #define DCBA_FACEUPLEFT 0x0002
  429. #define DCBA_FACEUPRIGHT 0x0003
  430. #define DCBA_FACEDOWNNONE 0x0100
  431. #define DCBA_FACEDOWNCENTER 0x0101
  432. #define DCBA_FACEDOWNLEFT 0x0102
  433. #define DCBA_FACEDOWNRIGHT 0x0103
  434. /* export ordinal definitions */
  435. #define PROC_EXTDEVICEMODE MAKEINTRESOURCE(90)
  436. #define PROC_DEVICECAPABILITIES MAKEINTRESOURCE(91)
  437. #define PROC_OLDDEVICEMODE MAKEINTRESOURCE(13)
  438. /* define types of pointers to ExtDeviceMode() and DeviceCapabilities()
  439. * functions
  440. */
  441. /* BUGBUG, many of these params are const */
  442. typedef UINT (CALLBACK* LPFNDEVMODE)(HWND, HMODULE, LPDEVMODE,
  443. LPSTR, LPSTR, LPDEVMODE, LPSTR, UINT);
  444. typedef DWORD (CALLBACK* LPFNDEVCAPS)(LPSTR, LPSTR, UINT, LPSTR, LPDEVMODE);
  445. #ifndef NOEXTDEVMODEPROPSHEET
  446. #include <prsht.h> /* for EXTDEVMODEPROPSHEET */
  447. /* these are the names of the exports from the printer drivers */
  448. #define PROCNAME_EXTDEVICEMODE "EXTDEVICEMODE"
  449. #define PROCNAME_EXTDEVMODEPROPSHEET "EXTDEVICEMODEPROPSHEET"
  450. /* this function is similar to ExtDeviceMode(), with the following
  451. ** changes:
  452. **
  453. ** 1) No lpdmIn or lpdmOut. Changes are global
  454. ** 2) UI always displays, changes always saved (wMode is always
  455. ** DM_PROMPT | DM_UPDATE)
  456. ** 3) Driver enumerates property pages back to the caller via
  457. ** lpfnAddPage and lParam.
  458. ** lpfnAddPage is called by the driver to enumerate each HPROPSHEETPAGE
  459. ** lParam is passed back to lpfnAddPage.
  460. */
  461. typedef int (WINAPI *LPFNEXTDEVICEMODEPROPSHEET)(
  462. HWND hWnd,
  463. HINSTANCE hinstDriver,
  464. LPCSTR lpszDevice,
  465. LPCSTR lpszPort,
  466. DWORD dwReserved,
  467. LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam);
  468. /* Ordinal for new entry point */
  469. #define PROC_EXTDEVICEMODEPROPSHEET MAKEINTRESOURCE(95)
  470. #endif /* NOEXTDEVMODEPROPSHEET */
  471. HDC WINAPI ResetDC(HDC, const DEVMODE FAR*);
  472. /* this structure is used by the GETSETSCREENPARAMS escape */
  473. typedef struct tagSCREENPARAMS
  474. {
  475. int angle;
  476. int frequency;
  477. } SCREENPARAMS;
  478. #ifdef __cplusplus
  479. }
  480. #endif /* __cplusplus */
  481. #ifndef RC_INVOKED
  482. // #pragma pack() //DANNY
  483. #endif /* !RC_INVOKED */
  484. #endif /* !_INC_PRINT */