home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 5.ddi / MWHC.005 / V0 < prev    next >
Encoding:
Text File  |  1992-01-07  |  4.9 KB  |  166 lines

  1. /*
  2.  *  drivinit.h
  3.  *
  4.  *  Header file for printer driver initialization using ExtDeviceMode()
  5.  *  and DeviceCapabilities().
  6.  *
  7.  */
  8.  
  9. #ifdef __HIGHC__
  10. #pragma Off(align_members)
  11. #endif
  12.  
  13. /* size of a device name string */
  14. #define CCHDEVICENAME 32
  15.  
  16. /* current version of specification */
  17. #define DM_SPECVERSION 0x300
  18.  
  19. /* field selection bits */
  20. #define DM_ORIENTATION        0x0000001L
  21. #define DM_PAPERSIZE        0x0000002L
  22. #define DM_PAPERLENGTH        0x0000004L
  23. #define DM_PAPERWIDTH        0x0000008L
  24. #define DM_SCALE        0x0000010L
  25. #define DM_COPIES        0x0000100L
  26. #define DM_DEFAULTSOURCE    0x0000200L
  27. #define DM_PRINTQUALITY     0x0000400L
  28. #define DM_COLOR        0x0000800L
  29. #define DM_DUPLEX        0x0001000L
  30.  
  31. /* orientation selections */
  32. #define DMORIENT_PORTRAIT   1
  33. #define DMORIENT_LANDSCAPE  2
  34.  
  35. /* paper selections */
  36. #define DMPAPER_FIRST        DMPAPER_LETTER
  37. #define DMPAPER_LETTER        1        // Letter 8 1/2 x 11 in
  38. #define DMPAPER_LETTERSMALL 2        // Letter Small 8 1/2 x 11 in
  39. #define DMPAPER_TABLOID     3        // Tabloid 11 x 17 in
  40. #define DMPAPER_LEDGER        4        // Ledger 17 x 11 in
  41. #define DMPAPER_LEGAL        5        // Legal 8 1/2 x 14 in
  42. #define DMPAPER_STATEMENT   6        // Statement 5 1/2 x 8 1/2 in
  43. #define DMPAPER_EXECUTIVE   7        // Executive"7 1/2 x 10 in
  44. #define DMPAPER_A3        8        // A3 297 x 420 mm
  45. #define DMPAPER_A4        9        // A4 210 x 297 mm
  46. #define DMPAPER_A4SMALL     10        // A4 Small 210 x 297 mm
  47. #define DMPAPER_A5        11        // A5 148 x 210 mm
  48. #define DMPAPER_B4        12        // B4 250 x 354
  49. #define DMPAPER_B5        13        // B5 182 x 257 mm
  50. #define DMPAPER_FOLIO        14        // Folio 8 1/2 x 13 in
  51. #define DMPAPER_QUARTO        15        // Quarto 215 x 275 mm
  52. #define DMPAPER_10X14        16        // 10x14 in
  53. #define DMPAPER_11X17        17        // 11x17 in
  54. #define DMPAPER_NOTE        18        // Note 8 1/2 x 11 in
  55. #define DMPAPER_ENV_9        19        // Envelope #9 3 7/8 x 8 7/8
  56. #define DMPAPER_ENV_10        20        // Envelope #10 4 1/8 x 9 1/2
  57. #define DMPAPER_ENV_11        21        // Envelope #11 4 1/2 x 10 3/8
  58. #define DMPAPER_ENV_12        22        // Envelope #12 4 \276 x 11
  59. #define DMPAPER_ENV_14        23        // Envelope #14 5 x 11 1/2
  60. #define DMPAPER_CSHEET        24        // C size sheet
  61. #define DMPAPER_DSHEET        25        // D size sheet
  62. #define DMPAPER_ESHEET        26        // E size sheet
  63. #define DMPAPER_LAST        DMPAPER_ESHEET
  64.  
  65. #define DMPAPER_USER        256
  66.  
  67. /* bin selections */
  68. #define DMBIN_FIRST        DMBIN_UPPER
  69. #define DMBIN_UPPER        1
  70. #define DMBIN_ONLYONE        1
  71. #define DMBIN_LOWER        2
  72. #define DMBIN_MIDDLE        3
  73. #define DMBIN_MANUAL        4
  74. #define DMBIN_ENVELOPE        5
  75. #define DMBIN_ENVMANUAL     6
  76. #define DMBIN_AUTO        7
  77. #define DMBIN_TRACTOR        8
  78. #define DMBIN_SMALLFMT        9
  79. #define DMBIN_LARGEFMT        10
  80. #define DMBIN_LARGECAPACITY 11
  81. #define DMBIN_CASSETTE      14
  82. #define DMBIN_LAST        DMBIN_CASSETTE
  83.  
  84. #define DMBIN_USER        256     /* device specific bins start here */
  85.  
  86. /* print qualities */
  87. #define DMRES_DRAFT        (-1)
  88. #define DMRES_LOW        (-2)
  89. #define DMRES_MEDIUM        (-3)
  90. #define DMRES_HIGH        (-4)
  91.  
  92. /* color enable/disable for color printers */
  93. #define DMCOLOR_MONOCHROME  1
  94. #define DMCOLOR_COLOR        2
  95.  
  96. /* duplex enable */
  97. #define DMDUP_SIMPLEX     1
  98. #define DMDUP_VERTICAL     2
  99. #define DMDUP_HORIZONTAL 3
  100.  
  101. typedef struct _devicemode {
  102.     char dmDeviceName[CCHDEVICENAME];
  103.     WORD dmSpecVersion;
  104.     WORD dmDriverVersion;
  105.     WORD dmSize;
  106.     WORD dmDriverExtra;
  107.     DWORD dmFields;
  108.     short dmOrientation;
  109.     short dmPaperSize;
  110.     short dmPaperLength;
  111.     short dmPaperWidth;
  112.     short dmScale;
  113.     short dmCopies;
  114.     short dmDefaultSource;
  115.     short dmPrintQuality;
  116.     short dmColor;
  117.     short dmDuplex;
  118. } DEVMODE;
  119.  
  120. typedef DEVMODE * PDEVMODE, NEAR * NPDEVMODE, FAR * LPDEVMODE;
  121.  
  122. /* mode selections for the device mode function */
  123. #define DM_UPDATE        1
  124. #define DM_COPY         2
  125. #define DM_PROMPT        4
  126. #define DM_MODIFY        8
  127.  
  128. #define DM_IN_BUFFER        DM_MODIFY
  129. #define DM_IN_PROMPT        DM_PROMPT
  130. #define DM_OUT_BUFFER        DM_COPY
  131. #define DM_OUT_DEFAULT        DM_UPDATE
  132.  
  133. /* device capabilities indices */
  134. #define DC_FIELDS        1
  135. #define DC_PAPERS        2
  136. #define DC_PAPERSIZE        3
  137. #define DC_MINEXTENT        4
  138. #define DC_MAXEXTENT        5
  139. #define DC_BINS         6
  140. #define DC_DUPLEX        7
  141. #define DC_SIZE         8
  142. #define DC_EXTRA        9
  143. #define DC_VERSION        10
  144. #define DC_DRIVER        11
  145.  
  146. /* export ordinal definitions */
  147. #define PROC_EXTDEVICEMODE    MAKEINTRESOURCE(90)
  148. #define PROC_DEVICECAPABILITIES MAKEINTRESOURCE(91)
  149. #define PROC_OLDDEVICEMODE    MAKEINTRESOURCE(13)
  150.  
  151. /* define types of pointers to ExtDeviceMode() and DeviceCapabilities()
  152.  * functions
  153.  */
  154. typedef WORD FAR PASCAL FNDEVMODE(HWND, HANDLE, LPDEVMODE, LPSTR, LPSTR,
  155.     LPDEVMODE, LPSTR, WORD);
  156.  
  157. typedef FNDEVMODE FAR * LPFNDEVMODE;
  158.  
  159. typedef DWORD FAR PASCAL FNDEVCAPS(LPSTR, LPSTR, WORD, LPSTR, LPDEVMODE);
  160.  
  161. typedef FNDEVCAPS FAR * LPFNDEVCAPS;
  162.  
  163. #ifdef __HIGHC__
  164. #pragma Pop(align_members)
  165. #endif
  166.