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.

1535 lines
55 KiB

  1. /*++
  2. Copyright (c) 1996 - 1999 Microsoft Corporation
  3. Module Name:
  4. uni16gpc.h
  5. Abstract:
  6. Universal printer driver specific resource header
  7. This file contains definitions for tables contained in the resource file
  8. of the Mini Drivers. It should be shared by both gentool and the
  9. generic library.
  10. Environment:
  11. Windows NT printer drivers
  12. Revision History:
  13. 10/30/96 -eigos-
  14. Created it.
  15. --*/
  16. #ifndef _UNI16GPC_H_
  17. #define _UNI16GPC_H_
  18. //
  19. // The following definitions are the resource IDs for the minidrivers.
  20. // These values are public, since anyone producing minidrivers needs
  21. // them.
  22. //
  23. #define RC_TABLES 257
  24. #define RC_FONT 258
  25. #define RC_TRANSTAB 259
  26. //
  27. // DATAHDR is at the beginning of each Mini Driver, describes where the rest
  28. // of the strcutures are, their size, count, etc.
  29. //
  30. typedef struct
  31. {
  32. short sOffset; /* offset from the beginning of this resource */
  33. /* to obtain a table entry */
  34. short sLength; /* length of each element in the table */
  35. short sCount; /* number of elements in the table. */
  36. } HEADERENTRY;
  37. //
  38. // Index into array of header entry in DATAHDR
  39. //
  40. #define HE_MODELDATA 0
  41. #define HE_RESOLUTION 1
  42. #define HE_PAPERSIZE 2
  43. #define HE_PAPERQUALITY 3
  44. #define HE_PAPERSOURCE 4
  45. #define HE_PAPERDEST 5
  46. #define HE_TEXTQUAL 6
  47. #define HE_COMPRESSION 7
  48. #define HE_FONTCART 8
  49. #define HE_PAGECONTROL 9
  50. #define HE_CURSORMOVE 10
  51. #define HE_FONTSIM 11
  52. #define HE_COLOR 12
  53. #define HE_RECTFILL 13
  54. #define HE_DOWNLOADINFO 14
  55. //
  56. //normanh following need to be defined for GPC3
  57. //
  58. #define HE_RESERVED1 15
  59. #define HE_RESERVED2 16
  60. #define HE_RESERVED3 17
  61. #define HE_RESERVED4 18
  62. #define HE_RESERVED5 19
  63. #define HE_RESERVED6 20
  64. #define HE_RESERVED7 21
  65. #define HE_RESERVED8 22
  66. //
  67. // derryd added for WDL release June 1995
  68. //
  69. #define HE_IMAGECONTROL 23
  70. #define HE_PRINTDENSITY 24
  71. #define HE_COLORTRC 25
  72. #define HE_RESERVED12 26
  73. #define HE_RESERVED13 27
  74. #define HE_RESERVED14 28
  75. #define HE_RESERVED15 29
  76. #define MAXHE 30
  77. #define MAXHE_GPC2 15 //for GPC2 compatibility
  78. typedef struct
  79. {
  80. short sMagic; /* Must be 0x7F00 */
  81. WORD wVersion; /* GPC file version # */
  82. POINTw ptMaster; /* Horizontal & Vertical Master Units */
  83. DWORD loHeap; /* Offset from DATAHDR to HEAP section */
  84. DWORD dwFileSize; /* Size of file in bytes */
  85. WORD fTechnology; /* Flags for special technologies */
  86. WORD fGeneral; /* Misc flags */
  87. char rgchRes[10]; /* 10 bytes reserved */
  88. short sMaxHE; /* Header entry count (15 here) */
  89. HEADERENTRY rghe[MAXHE];
  90. } DATAHDR, *PDH;
  91. #define LPDH PDH /* UNIDRV compatability */
  92. //
  93. // The version field consists of two bytes. The high byte is the major
  94. // number, the low byte the minor number. Version number checking
  95. // should take place against the high byte, since this changes when
  96. // there is a significant structural change. The minor number will
  97. // change with updated data only.
  98. //
  99. #define GPC_VERSION3 0x0300 // GPC file version 3
  100. #define GPC_VERSION 0x0300 // current GPC file version #
  101. #define VERSION_CHECK(x) (((x) & 0xff00) <= GPC_VERSION)
  102. //
  103. // fTechnology--used as an ID, not a bitfield
  104. //
  105. #define GPC_TECH_DEFAULT 0 // Default technology
  106. #define GPC_TECH_PCL4 1 // Uses PCL level 4 or above
  107. #define GPC_TECH_CAPSL 2 // Uses CaPSL level 3 or above
  108. #define GPC_TECH_PPDS 3 // Uses PPDS
  109. #define GPC_TECH_TTY 4 // TTY printer--user configurable
  110. #define GPC_TECH_DBCS 5 // Uses DBCS PDL printer
  111. //
  112. // fGeneral
  113. //
  114. #define GPC_GEN_PRIVATE_HELP 0x0001 // this driver has a private help
  115. #define GPC_GEN_DRAFT_SINGLE 0x0002 // Only 1 font in draft mode
  116. #ifndef _OCD_
  117. #define _OCD_
  118. //
  119. // OCD are offsets into the heap to obtain a CD structure
  120. //
  121. typedef WORD OCD;
  122. typedef DWORD LOCD; /* double word offset to a CD */
  123. typedef WORD OOCD; /* offset to table of OCD's. */
  124. typedef OCD * POCD;
  125. #endif //_OCD_
  126. //*****************************************************************************
  127. //
  128. // MODELDATA contains information describing the attributes and capabilities
  129. // of a single printer model.
  130. //
  131. //*****************************************************************************
  132. //
  133. // MODELDATA.rgoi[] index values
  134. //
  135. #define MD_OI_FIRST MD_OI_PORT_FONTS
  136. #define MD_OI_PORT_FONTS 0
  137. #define MD_OI_LAND_FONTS 1
  138. #define MD_OI_RESOLUTION 2
  139. #define MD_OI_PAPERSIZE 3
  140. #define MD_OI_PAPERQUALITY 4
  141. #define MD_OI_PAPERSOURCE 5
  142. #define MD_OI_PAPERDEST 6
  143. #define MD_OI_TEXTQUAL 7
  144. #define MD_OI_COMPRESSION 8
  145. #define MD_OI_FONTCART 9
  146. #define MD_OI_COLOR 10
  147. #define MD_OI_MEMCONFIG 11
  148. #define MD_OI_MAX 12
  149. //
  150. // MODELDATA.rgoi2[] index values
  151. //
  152. #define MD_OI2_PENINFO 0
  153. #define MD_OI2_IMAGECONTROL 1
  154. #define MD_OI2_PRINTDENSITY 2
  155. #define MD_OI2_COLORTRC 3
  156. #define MD_OI2_RESERVED1 4
  157. #define MD_OI2_MAX 5
  158. //
  159. // MODELDATA.rgi[] index values
  160. //
  161. #define MD_I_PAGECONTROL 0
  162. #define MD_I_CURSORMOVE 1
  163. #define MD_I_FONTSIM 2
  164. #define MD_I_RECTFILL 3
  165. #define MD_I_DOWNLOADINFO 4
  166. #define MD_I_VECTPAGE 5
  167. #define MD_I_CAROUSEL 6
  168. #define MD_I_LINEINFO 7
  169. #define MD_I_BRUSHINFO 8
  170. #define MD_I_VECTOUTPUT 9
  171. #define MD_I_POLYVECTOUTPUT 10
  172. #define MD_I_VECTSUPPORT 11
  173. #define MD_I_RESERVED1 12
  174. #define MD_I_RESERVED2 13
  175. #define MD_I_RESERVED3 14
  176. #define MD_I_RESERVED4 15
  177. #define MD_I_MAX 16
  178. //
  179. // define some constants help uniform access of rgoi and rgoi2 arrays.
  180. // When more indices are used in rgoi2 array, make sure to add new define's.
  181. //
  182. #define MD_OI_OI2 (MD_OI_MAX + MD_I_MAX)
  183. #define MD_OI_PENINFO (MD_OI_OI2 + MD_OI2_PENINFO)
  184. #define MD_OI_IMAGECONTROL (MD_OI_OI2 + MD_OI2_IMAGECONTROL)
  185. #define MD_OI_PRINTDENSITY (MD_OI_OI2 + MD_OI2_PRINTDENSITY)
  186. #define MD_OI_COLORTRC (MD_OI_OI2 + MD_OI2_COLORTRC)
  187. #define MD_OI_RESERVED (MD_OI_OI2 + MD_OI2_RESERVED)
  188. #define MD_OI_TOTALMAX (MD_OI_OI2 + MD_OI2_MAX)
  189. typedef struct
  190. {
  191. short cbSize; // size of MODELDATA, 150 bytes
  192. short sIDS; // stringtable ID for model name
  193. WORD fGeneral; // General printer capabilities
  194. WORD fCurves; // Curve Capabilities
  195. WORD fLines; // Line Capabilities
  196. WORD fPolygonals; // Polygonal Capabilities
  197. WORD fText; // Text Capabilities
  198. WORD fClip; // Clipping Capabilities
  199. WORD fRaster; // Raster Capabilities
  200. WORD fLText; // Text Capabilities in landscape mode
  201. short sLeftMargin; // Unprintable minimum left margin.
  202. short sMaxPhysWidth; // Maximum physical page width
  203. POINTw ptMax; // Maximum X & Y printable dimensions in master units
  204. POINTw ptMin; // Minimum X & Y page dimensions in master units
  205. short sDefaultFontID; // Default font resource ID
  206. short sLookAhead; // Size of Lookahead region
  207. short sMaxFontsPage; // Max number of fonts printer can place on single
  208. // page -1 if no limit
  209. short sCartSlots; // Number of cartridge slots on printer
  210. short sDefaultCTT;
  211. WORD rgoi[MD_OI_MAX];// list of offsets to index lists
  212. short rgi[MD_I_MAX]; // list of indices.
  213. //
  214. // The following fields are added in GPC 3.0
  215. //
  216. WORD rgoi2[MD_OI2_MAX];// Orphans from rgoi (here due to compatibility)
  217. WORD orgoiDefaults; // Offset to list of defaults for RGOI & RGOI2
  218. WORD wReserved; // Needed for alignment
  219. DWORD dwICMManufacturer;// id to match ICC profiles against
  220. DWORD dwICMModel; // id to match ICC profiles against
  221. DWORD rgdwReserved[8]; // 32 bytes reserved for future use
  222. } MODELDATA, *PMODELDATA;
  223. //
  224. // MODELDATA.fGeneral flag values
  225. //
  226. #define MD_SERIAL 0x0001 // must output text serially such
  227. // as dotmatrix printers
  228. #define MD_PARAMETERIZE 0x0002 // supports parameterized escape codes
  229. #define MD_ROTATE_FONT_ABLE 0x0004 // can rotate hardware fonts
  230. #define MD_COPIES 0x0008 // supports multiple copies
  231. #define MD_DUPLEX 0x0010 // supports duplexing
  232. #define MD_NO_ADJACENT 0x0020 // old model, cannot print adjacent pins
  233. #define MD_LANDSCAPE_GRX_ABLE 0x0040 // can rotate raster graphics
  234. #define MD_ALIGN_BASELINE 0x0080 // text output are algned on the
  235. // baseline, not top of char
  236. #define MD_FONT_MEMCFG 0x0100 // Mem ref'd @ rgoi[MD_OI_MEMCONFIG]
  237. // used for download fonts only.
  238. #define MD_LANDSCAPE_RT90 0x0200 // landscape is portrait rotated
  239. // 90 degress counter-clockwise, i.e. the end of a page is printed
  240. // first. The default is 270 degrees, i.e. the beginning of a
  241. // page is printed first. !!!For printers which do not have the
  242. // set-orientation command (i.e. only have portrait mode), this
  243. // bit should NOT be set. UNIDRV will rotate the graphics and
  244. // the beginning of a page will come out first.
  245. #define MD_USE_CURSOR_ORIG 0x0400 // use cursor origins in
  246. // PAPERSIZE to calculate the print origin. The default
  247. // cursor origin is the upper left corner of the printable area.
  248. #define MD_WHITE_TEXT 0x0800 // can print white text on black
  249. // bkgrd. Cmds from DEVCOLOR struct.
  250. #define MD_PCL_PAGEPROTECT 0x1000 // provide PCL5-style page protection
  251. #define MD_MARGINS 0x2000 // allow the user to set paper
  252. // unprintable area. On some printers (such
  253. // as Epson, the user could manipulate the
  254. // printer to have different margins than
  255. // the default. Add this bit for Win3.0
  256. // driver compatibility.
  257. #define MD_CMD_CALLBACK 0x4000 // Model requires fnOEMGetCmd callback
  258. #define MD_MEMRES 0x8000 // User may reserve printer memory
  259. //*****************************************************************************
  260. //
  261. // RESOLUTION contains information needed to compose bitmap images on the printer.
  262. // There is one RESOLUTION structure defined for each supported printer resolution.
  263. // RESOLUTION array should be arranged from the highest resolution to the lowest
  264. // resolution. It is also the order that will be displayed in the dialog box.
  265. // This strucuture becomes part of the physical device block.
  266. //
  267. //*****************************************************************************
  268. //
  269. // RESOLUTION.rgocd[] index values
  270. //
  271. #define RES_OCD_SELECTRES 0
  272. #define RES_OCD_BEGINGRAPHICS 1
  273. #define RES_OCD_ENDGRAPHICS 2
  274. #define RES_OCD_SENDBLOCK 3
  275. #define RES_OCD_ENDBLOCK 4
  276. #define RES_OCD_MAX 5
  277. //
  278. // Note: RESOLUTION data structure is defined in parser.h for GPD.
  279. // GPC RESOLUTION data strucutre is changed as GPCRESOLUTION
  280. //
  281. typedef struct // size is 40 bytes
  282. {
  283. short cbSize; // size of RESOLUTION, 40 bytes
  284. short sIDS; // String ID for displaying resolution
  285. WORD fDump; // Dump method flags.
  286. WORD fBlockOut; // Block out method flags.
  287. WORD fCursor; // Cursor position flags.
  288. short iDitherBrush; // selected brush for dithering
  289. POINTw ptTextScale; // relationship between master units and text units.
  290. POINTw ptScaleFac; // relationship between graphics and text
  291. // scale factors. expressed in powers of 2.
  292. short sNPins; // Minimum height of the image to be rendered
  293. // together.
  294. short sPinsPerPass; // Physical number of pins fired in one pass.
  295. short sTextYOffset; // offset from top of graphics output that of text
  296. // output
  297. short sMinBlankSkip; // Min. # of bytes of null data that must occur before
  298. // compression (strip null data only) will occur
  299. short sSpotDiameter; // size of dot at this resolution
  300. OCD rgocd[RES_OCD_MAX];
  301. } GPCRESOLUTION, *PGPCRESOLUTION;
  302. //
  303. // RESOLUTION.fDump values
  304. //
  305. #define RES_DM_GDI 0x0040 // GDI bitmap format
  306. #define RES_DM_LEFT_BOUND 0x0080 // Optimize by bounding rect
  307. #define RES_DM_COLOR 0x0100 // Color support is available
  308. #define RES_DM_DOWNLOAD_OUTLINE 0x0200 // this res supports outline font download
  309. #define RES_DM_CALLBACK 0x8000 // Color support is available
  310. // for this resolution
  311. //
  312. // RESOLUTION.fBlockOut values
  313. //
  314. #define RES_BO_LEADING_BLNKS 0x0001 // Strip leading blanks if sMinBlankSkip
  315. // or more bytes of null data occur
  316. #define RES_BO_TRAILING_BLNKS 0x0002 // Strip trailing blanks if sMinBlankSkip
  317. // or more bytes of null data occur
  318. #define RES_BO_ENCLOSED_BLNKS 0x0004 // Strip enclosed blanks if sMinBlankSkip
  319. // or more bytes of null data occur
  320. #define RES_BO_RESET_FONT 0x0008 // Must reselect font after
  321. // blockout command
  322. #define RES_BO_3BYTESIN4 0x0010 // each pixel is expressed in 4 bytes
  323. #define RES_BO_UNIDIR 0x0020 // send unidir
  324. #define RES_BO_NO_ADJACENT 0x0040 // no adjacent pins can be fired
  325. // block out command
  326. //
  327. // !!!LindsayH additions - for Seiko Color Point */
  328. //
  329. #define RES_BO_ALL_GRAPHICS 0x0100 // Send ALL graphics - no cursor
  330. #define RES_BO_OEMGRXFILTER 0x4000 // use oem supplied graphics filter
  331. //
  332. // Removed ..normanh 20/11/93 minidriv.c does not have this.
  333. // rasdd deson't use it. unidrv GPC3 needs this bit.
  334. // #define RES_BO_CALLBACK 0x8000 // Color support is available
  335. //
  336. #define RES_BO_MULTIPLE_ROWS 0x8000 // Multiple lines of data can be sent
  337. // with the RES_OCD_SENDBLOCK command.
  338. //
  339. // RESOLUTION.fCursor values
  340. //
  341. #define RES_CUR_X_POS_ORG 0x0001 // X Position is at X start point
  342. // of graphic data after rendering data
  343. #define RES_CUR_X_POS_AT_0 0x0002 // X position at leftmost place
  344. // on page after rendering data
  345. #define RES_CUR_Y_POS_AUTO 0x0004 // Y position automatically moves
  346. // to next Y row
  347. #define RES_CUR_CR_GRX_ORG 0x0008 // CR moves X pos to X start point of
  348. // of graphic data
  349. //
  350. // RESOLUTION.fDitherBrush flag values
  351. //
  352. #define RES_DB_NONE 0
  353. #define RES_DB_COARSE 1
  354. #define RES_DB_FINE 2
  355. #define RES_DB_LINEART 3
  356. #define RES_DB_ERRORDIFFUSION 4
  357. #define RES_DB_MAX RES_DB_ERRORDIFFUSION // last defined ditherbrush
  358. //*****************************************************************************
  359. //
  360. // PAPERSIZE contains physical paper sizes and unprintable margins
  361. //
  362. //*****************************************************************************
  363. //
  364. // PAPERSIZE.rgocd[] index values
  365. //
  366. #define PSZ_OCD_SELECTPORTRAIT 0
  367. #define PSZ_OCD_SELECTLANDSCAPE 1
  368. #define PSZ_OCD_PAGEPROTECT_ON 2
  369. #define PSZ_OCD_PAGEPROTECT_OFF 3
  370. #define PSZ_OCD_RESERVED1 4
  371. #define PSZ_OCD_RESERVED2 5
  372. #define PSZ_OCD_MAX 6
  373. typedef struct
  374. {
  375. short cbSize; // size of PAPERSIZE, 60 bytes.
  376. short sPaperSizeID; // If sPaperSizeID is < 256 then it's predefined.
  377. // If it's = 256, allow user defined sizes.
  378. // If it's >= 257, it's driver-defined & is the
  379. // string ID to name this driver-defined PAPERSIZE
  380. WORD fGeneral; // General flag to describe info about this size
  381. WORD fPaperType; // Bit field to describe this size, used by PAPERSRC
  382. POINTw ptSize; // X & Y paper size dimension in master units.
  383. RECTw rcMargins; // Specifies the unprintable margins in master units.
  384. // (Portrait mode in new spec)
  385. POINTw ptCursorOrig; // Cursor origin relative to physical page origin.
  386. POINTw ptLCursorOrig; // Cursor origin relative to physical page origin
  387. // in landscape.
  388. OCD rgocd[PSZ_OCD_MAX]; // Command Descriptors
  389. RECTw rcLMargins; // Specifies the unprintable margins in master units
  390. // when printing in landscape mode.
  391. POINTw ptVectOffset; // Offset (in master units) from vector 0,0 to
  392. // UL corner of page in portrait mode
  393. POINTw ptLVectOffset; // Offset (in master units) from vector 0,0 to
  394. // UL corner of page in landscape mode
  395. WORD wYSizeUnit; // Base unit for custom paper size dimensions
  396. WORD wPageProtMem; // Amount of mem (in KBs) PAGEPROTECT_ON uses
  397. } PAPERSIZE, * PPAPERSIZE;
  398. //
  399. // PAPERSIZE.fGeneral flag values
  400. //
  401. #define PS_CENTER 0x0001 // center the printable area along the paper path
  402. #define PS_ROTATE 0x0002 // rotate X & Y dimensions
  403. #define PS_SUGGEST_LNDSCP 0x0004 // suggest landscape mode
  404. #define PS_EJECTFF 0x0008 // eject page via CURSORMOVE.rgocd[CM_OCD_FF]
  405. //
  406. // PAPERSIZE.fPaperType flag values
  407. //
  408. #define PS_T_STD 0x0001
  409. #define PS_T_LARGE 0x0002
  410. #define PS_T_ENV 0x0004
  411. #define PS_T_LRGENV 0x0008
  412. #define PS_T_ROLL 0x0010
  413. #define PS_T_OEM1 0x0400
  414. #define PS_T_OEM2 0x0800
  415. #define PS_T_OEM3 0x1000
  416. #define PS_T_OEM4 0x2000
  417. #define PS_T_OEM5 0x4000
  418. #define PS_T_OEM6 0x8000
  419. //*****************************************************************************
  420. //
  421. // PAPERQUALITY contains an ID & OCD
  422. //
  423. //*****************************************************************************
  424. //
  425. // ganeshp!Change the order of wReserved and dwReserved to make dwReserved DWORD
  426. // aligned, as NT compiler adds a word after wReserved to make dwReserved
  427. // DWORD aligned. Because of this ocdSelect gets bad value from the GPC data.
  428. //
  429. typedef struct
  430. {
  431. short cbSize; // size of PAPERQUALITY, 12 bytes.
  432. short sPaperQualID; //
  433. DWORD dwReserved; // " "
  434. WORD wReserved; // resevered for future use
  435. OCD ocdSelect; // Command Descriptor to select this Paper Quality.
  436. } PAPERQUALITY, *PPAPERQUALITY;
  437. //*****************************************************************************
  438. //
  439. // PAPERSOURCE contains information needed to select a feed methods and
  440. // the margin that might be introduced by the feed method.
  441. //
  442. //*****************************************************************************
  443. typedef struct
  444. {
  445. short cbSize; // size of PAPERSOURCE, 16 bytes
  446. short sPaperSourceID;// If sPaperSourceID <= 256 then it's predefined
  447. // by genlib, otherwise, it is the string ID.
  448. WORD fGeneral;
  449. WORD fPaperType; // Bit field to describe this size, used by PAPERSRC
  450. short sTopMargin; // Top margin introduced by the feed method.
  451. short sBottomMargin; // Bottom margin introduced by the feed method.
  452. short sBinAdjust; // Describes adjustments supported by bin
  453. OCD ocdSelect; // Command Descriptor to select this Paper source.
  454. } PAPERSOURCE, * PPAPERSOURCE;
  455. //
  456. // PAPERSOURCE.fGeneral flag values
  457. //
  458. #define PSRC_EJECTFF 0x0001
  459. #define PSRC_MAN_PROMPT 0x0002
  460. //*****************************************************************************
  461. //
  462. // PAPERDEST contains information needed to select a paper out bin/tray
  463. //
  464. //*****************************************************************************
  465. typedef struct
  466. {
  467. short cbSize; // size of PAPERDEST, 8 bytes
  468. short sID; // If sID <= 256 then it's predefined
  469. // otherwise, it is the stringtable ID.
  470. short fGeneral; // General purpose Bit field
  471. OCD ocdSelect; // Command Descriptor to select this attribute.
  472. } PAPERDEST, * PPAPERDEST;
  473. //
  474. // PAPERDEST.fGeneral flag values
  475. //
  476. #define PDST_JOBSEPARATION 0x0001
  477. //*****************************************************************************
  478. //
  479. // TEXTQUALITY contains information needed to select a text quality attribute
  480. //
  481. //*****************************************************************************
  482. typedef struct
  483. {
  484. short cbSize; // size of TEXTQUALITY, 8 bytes
  485. short sID; // If sID <= 256 then it's predefined
  486. // otherwise, it is the string ID.
  487. short fGeneral; // General purpose Bit field
  488. OCD ocdSelect; // Command Descriptor to select this text quality.
  489. } TEXTQUALITY, * PTEXTQUALITY;
  490. //*****************************************************************************
  491. //
  492. // COMPRESSMODE
  493. //
  494. //*****************************************************************************
  495. //
  496. // COMPRESSMODE.rgocd[] index values
  497. //
  498. #define CMP_OCD_BEGIN 0
  499. #define CMP_OCD_END 1
  500. #define CMP_OCD_MAX 2
  501. typedef struct
  502. {
  503. short cbSize; // size of COMPRESSMODE, 8 bytes
  504. WORD iMode; // ID for type of commpression mode
  505. OCD rgocd[CMP_OCD_MAX]; // Actual Command String, variable length
  506. } COMPRESSMODE, *PCOMPRESSMODE;
  507. //
  508. // COMPRESSMODE.wModeID flags
  509. //
  510. #define CMP_ID_FIRST CMP_ID_RLE
  511. #define CMP_ID_RLE 1
  512. #define CMP_ID_TIFF40 2
  513. #define CMP_ID_DELTAROW 3
  514. #define CMP_ID_BITREPEAT 4
  515. #define CMP_ID_FE_RLE 5
  516. #define CMP_ID_LAST CMP_ID_FE_RLE
  517. //*****************************************************************************
  518. //
  519. // GPCFONTCART
  520. //
  521. //*****************************************************************************
  522. #define FC_ORGW_PORT 0
  523. #define FC_ORGW_LAND 1
  524. #define FC_ORGW_MAX 2
  525. typedef struct
  526. {
  527. short cbSize; // size of FONTCART, 12 bytes
  528. WORD sCartNameID; // stringtable ID for cartridge name
  529. WORD orgwPFM[FC_ORGW_MAX]; // array of offsets to array of indices
  530. // of PFM resources
  531. WORD fGeneral; // General bit flags
  532. short sShiftVal; // amt to shift each font in this cart by
  533. } GPCFONTCART, *PGPCFONTCART;
  534. //#define FC_GEN_RESIDENT 0x0001 // resident font cart
  535. //*****************************************************************************
  536. //
  537. // PAGECONTROL
  538. //
  539. //*****************************************************************************
  540. //
  541. // PAGECONTROL.rgocd[] index values
  542. //
  543. #define PC_OCD_BEGIN_DOC 0
  544. #define PC_OCD_BEGIN_PAGE 1
  545. #define PC_OCD_DUPLEX_ON 2
  546. #define PC_OCD_ENDDOC 3
  547. #define PC_OCD_ENDPAGE 4
  548. #define PC_OCD_DUPLEX_OFF 5
  549. #define PC_OCD_ABORT 6
  550. #define PC_OCD_PORTRAIT 7
  551. #define PC_OCD_LANDSCAPE 8
  552. #define PC_OCD_MULT_COPIES 9
  553. #define PC_OCD_DUPLEX_VERT 10
  554. #define PC_OCD_DUPLEX_HORZ 11
  555. #define PC_OCD_PRN_DIRECTION 12
  556. #define PC_OCD_JOB_SEPARATION 13
  557. #define PC_OCD_MAX 14
  558. typedef struct
  559. {
  560. short cbSize; // size of PAGECONTROL, 36 bytes
  561. short sMaxCopyCount; // max # of copies w/ PC_OCD_MULT_COPIES
  562. WORD fGeneral; // General bit flags
  563. WORD orgwOrder;
  564. OCD rgocd[PC_OCD_MAX];
  565. } PAGECONTROL, * PPAGECONTROL;
  566. //
  567. // PAGECONTROL.owOrder index values
  568. //
  569. #define PC_ORD_BEGINDOC 1
  570. #define PC_ORD_ORIENTATION 2
  571. #define PC_ORD_MULT_COPIES 3
  572. #define PC_ORD_DUPLEX 4
  573. #define PC_ORD_DUPLEX_TYPE 5
  574. #define PC_ORD_TEXTQUALITY 6
  575. #define PC_ORD_PAPER_SOURCE 7
  576. #define PC_ORD_PAPER_SIZE 8
  577. #define PC_ORD_PAPER_DEST 9
  578. #define PC_ORD_RESOLUTION 10
  579. #define PC_ORD_BEGINPAGE 11
  580. #define PC_ORD_SETCOLORMODE 12
  581. #define PC_ORD_PAPER_QUALITY 13
  582. #define PC_ORD_PAGEPROTECT 14
  583. #define PC_ORD_IMAGECONTROL 15
  584. #define PC_ORD_PRINTDENSITY 16
  585. #define PC_ORD_MAX PC_ORD_PRINTDENSITY
  586. #define PC_ORD_LAST PC_ORD_PRINTDENSITY
  587. //*****************************************************************************
  588. //
  589. // CURSORMOVE
  590. //
  591. //*****************************************************************************
  592. //
  593. // CURSORMOVE.rgocd[] index values
  594. //
  595. #define CM_OCD_XM_ABS 0
  596. #define CM_OCD_XM_REL 1
  597. #define CM_OCD_XM_RELLEFT 2
  598. #define CM_OCD_YM_ABS 3
  599. #define CM_OCD_YM_REL 4
  600. #define CM_OCD_YM_RELUP 5
  601. #define CM_OCD_YM_LINESPACING 6
  602. #define CM_OCD_XY_REL 7
  603. #define CM_OCD_XY_ABS 8
  604. #define CM_OCD_CR 9
  605. #define CM_OCD_LF 10
  606. #define CM_OCD_FF 11
  607. #define CM_OCD_BS 12
  608. #define CM_OCD_UNI_DIR 13
  609. #define CM_OCD_UNI_DIR_OFF 14
  610. #define CM_OCD_PUSH_POS 15
  611. #define CM_OCD_POP_POS 16
  612. #define CM_OCD_MAX 17
  613. typedef struct
  614. {
  615. short cbSize; // size of CURSORMOVE, 44 bytes
  616. short sReserved;
  617. WORD fGeneral;
  618. WORD fXMove;
  619. WORD fYMove;
  620. OCD rgocd[CM_OCD_MAX]; // Actual Command String, variable length
  621. } CURSORMOVE, *PCURSORMOVE;
  622. //
  623. // CURSORMOVE.fGeneral flags
  624. //
  625. #define CM_GEN_FAV_XY 0x0002 // from Win95 GPC
  626. //
  627. // CURSORMOVE.fXmove flag values
  628. //
  629. #define CM_XM_NO_POR_GRX 0x0004 // no x movemnt while in graphics mode, portrait
  630. #define CM_XM_NO_LAN_GRX 0x0008 // no x movemnt while in graphics mode, landscape
  631. #define CM_XM_RESET_FONT 0x0010 // Font is reset after x movement command
  632. #define CM_XM_FAVOR_ABS 0x0080 // favor absolute x command
  633. #define CM_XM_REL_LEFT 0x0200 // has relative x to the left
  634. #define CM_XM_ABS_NO_LEFT 0x0400 // No left X movement command
  635. #define CM_XM_RES_DEPENDENT 0x0800 // X movement in resolution unit, not mu
  636. //
  637. // CURSORMOVE.fYmove flag values
  638. //
  639. #define CM_YM_FAV_ABS 0x0001
  640. #define CM_YM_REL_UP 0x0002
  641. #define CM_YM_NO_POR_GRX 0x0004 // no y movemnt while in graphics mode, portrait
  642. #define CM_YM_NO_LAN_GRX 0x0008 // no y movemnt while in graphics mode, landscape
  643. #define CM_YM_CR 0x0040
  644. #define CM_YM_LINESPACING 0x0080
  645. #define CM_YM_TRUNCATE 0x0100 // don't compensate for ymovement error
  646. #define CM_YM_RES_DEPENDENT 0x0200 // X movement in resolution unit, not mu
  647. //*****************************************************************************
  648. //
  649. // FONTSIMULATION describes various printer commands to enable and disable
  650. // various character attributes such as bold, italic, etc.
  651. //
  652. //*****************************************************************************
  653. //
  654. // FONTSIMULATION.rgocStd[] index values
  655. //
  656. #define FS_OCD_BOLD_ON 0
  657. #define FS_OCD_BOLD_OFF 1
  658. #define FS_OCD_ITALIC_ON 2
  659. #define FS_OCD_ITALIC_OFF 3
  660. #define FS_OCD_UNDERLINE_ON 4
  661. #define FS_OCD_UNDERLINE_OFF 5
  662. #define FS_OCD_DOUBLEUNDERLINE_ON 6
  663. #define FS_OCD_DOUBLEUNDERLINE_OFF 7
  664. #define FS_OCD_STRIKETHRU_ON 8
  665. #define FS_OCD_STRIKETHRU_OFF 9
  666. #define FS_OCD_WHITE_TEXT_ON 10
  667. #define FS_OCD_WHITE_TEXT_OFF 11
  668. #define FS_OCD_SINGLE_BYTE 12
  669. #define FS_OCD_DOUBLE_BYTE 13
  670. #define FS_OCD_VERT_ON 14
  671. #define FS_OCD_VERT_OFF 15
  672. #define FS_OCD_MAX 16
  673. typedef struct
  674. {
  675. short cbSize; // size of FONTSIMULATION, 44 bytes
  676. short sReserved; // so DW aligned
  677. WORD fGeneral;
  678. short sBoldExtra;
  679. short sItalicExtra;
  680. short sBoldItalicExtra;
  681. OCD rgocd[FS_OCD_MAX];
  682. } FONTSIMULATION, * PFONTSIMULATION;
  683. //*****************************************************************************
  684. //
  685. // DEVCOLOR is the physical color info which describes the device color
  686. // capabilities and how to compose colors based on available device colors.
  687. //
  688. //*****************************************************************************
  689. //
  690. // DEVCOLOR.fGeneral bit flags:
  691. //
  692. #define DC_PRIMARY_RGB 0x0001 // use RGB as 3 primary colors.
  693. // Default: use CMY instead.
  694. #define DC_EXTRACT_BLK 0x0002 // Separate black ink/ribbon is available.
  695. // Default: compose black using CMY.
  696. // It is ignored if DC_PRIMARY_RGB is set
  697. #define DC_CF_SEND_CR 0x0004 // send CR before selecting graphics
  698. // color. Due to limited printer buffer
  699. #define DC_SEND_ALL_PLANES 0x0008 // All color plane data must be sent
  700. #define DC_SEND_PAGE_PLANE 0x0010 // Color separation required
  701. #define DC_EXPLICIT_COLOR 0x0020 // Color must be set before sending
  702. // the RES_OCD_SENDBLOCK command.
  703. #define DC_SEND_PALETTE 0x0040 // Color palette must be downloaded
  704. //
  705. // sandram
  706. // add field to send dithered text for Color LaserJet - set foreground color.
  707. //
  708. #define DC_FG_TEXT_COLOR 0x0080 // Send command to select text foreground color
  709. #define DC_ZERO_FILL 0x0100 // This model fills raster to the end of the page with zeros
  710. //
  711. // One and only one of DEVCOLOR.sPlanes or DEVCOLOR.sBitsPixel must be 1.
  712. //
  713. // Example:
  714. //
  715. // DEVCOLOR.sPlanes:
  716. // Valid values are:
  717. // 1: use the pixel color model.
  718. // n (n > 1): use the plane color model.
  719. // Ex. for Brother M-1924, n = 4; for PaintJet, n = 3.
  720. //
  721. // DEVCOLOR.sBitsPixel:
  722. // Valid values are:
  723. // 1: use the plane color model.
  724. // 4 & 8: use the pixel color model.
  725. // The color bits (4 or 8) are directly from DIB driver. They
  726. // should be used as index into the printer's color palette.
  727. // The mini driver write should make sure that the printer's
  728. // color palette is configured in the same way as DIB's
  729. // color palette in respective cases.
  730. //
  731. //
  732. // DEVCOLOR.rgocd array values
  733. //
  734. #define DC_OCD_TC_BLACK 0
  735. #define DC_OCD_TC_RED 1
  736. #define DC_OCD_TC_GREEN 2
  737. #define DC_OCD_TC_YELLOW 3
  738. #define DC_OCD_TC_BLUE 4
  739. #define DC_OCD_TC_MAGENTA 5
  740. #define DC_OCD_TC_CYAN 6
  741. #define DC_OCD_TC_WHITE 7
  742. #define DC_OCD_SETCOLORMODE 8
  743. #define DC_OCD_PC_START 9
  744. #define DC_OCD_PC_ENTRY 10
  745. #define DC_OCD_PC_END 11
  746. #define DC_OCD_PC_SELECTINDEX 12
  747. #define DC_OCD_SETMONOMODE 13
  748. #define DC_OCD_MAX 14
  749. //
  750. // DEVCOLOR.rgbOrder array values
  751. //
  752. #define DC_PLANE_NONE 0
  753. #define DC_PLANE_RED 1
  754. #define DC_PLANE_GREEN 2
  755. #define DC_PLANE_BLUE 3
  756. #define DC_PLANE_CYAN 4
  757. #define DC_PLANE_MAGENTA 5
  758. #define DC_PLANE_YELLOW 6
  759. #define DC_PLANE_BLACK 7
  760. #define DC_MAX_PLANES 4
  761. typedef struct
  762. {
  763. short cbSize; // size of DEVCOLOR, 44 bytes
  764. WORD fGeneral; // general flag bit field
  765. short sPlanes; // # of color planes required
  766. short sBitsPixel; // # of bits per pixel (per plane). At least
  767. // one of 'sPlanes' and 'sBitsPixel' is 1.
  768. WORD orgocdPlanes; // offset to a list of OCD's for sending data
  769. // planes. The # of OCD's is equal to 'sPlanes'.
  770. // This field is not used in case of pixel
  771. // color models. The first command will be
  772. // used to send data of the first plane,
  773. // and so on.
  774. OCD rgocd[DC_OCD_MAX]; // array of Offsets to commands.
  775. BYTE rgbOrder[DC_MAX_PLANES]; // order in which color planes are sent
  776. WORD wReserved; // For alignment
  777. } DEVCOLOR, * PDEVCOLOR, FAR * LPDEVCOLOR;
  778. //*****************************************************************************
  779. //
  780. // RECTFILL
  781. //
  782. //*****************************************************************************
  783. //
  784. // RECTFILL.rgocd[] index values
  785. //
  786. #define RF_OCD_X_SIZE 0
  787. #define RF_OCD_Y_SIZE 1
  788. #define RF_OCD_GRAY_FILL 2
  789. #define RF_OCD_WHITE_FILL 3
  790. #define RF_OCD_HATCH_FILL 4
  791. #define RF_OCD_MAX 5
  792. typedef struct
  793. {
  794. short cbSize; // size of RECTFILL, 20 bytes
  795. WORD fGeneral;
  796. WORD wMinGray;
  797. WORD wMaxGray;
  798. OCD rgocd[RF_OCD_MAX]; // Actual Command String, variable length
  799. WORD wReserved;
  800. } RECTFILL, *PRECTFILL;
  801. //
  802. // RECTFILL.fGenral flag values
  803. //
  804. #define RF_WHITE_ABLE 0x0001 // White rule exists
  805. #define RF_MIN_IS_WHITE 0x0002 // min. graylevel = white rule
  806. #define RF_CUR_X_END 0x0100 // X Position is at X end point
  807. // of fill area after rendering
  808. #define RF_CUR_Y_END 0x0200 // Y position is at Y end point
  809. // of fill area after rendering
  810. // default is no chg of position
  811. //*****************************************************************************
  812. //
  813. // DOWNLOADINFO describes that way in which genlib should instruct the font
  814. // installer to handle downloading soft fonts. It contains OCDs for all
  815. // appropriate codes.
  816. //
  817. //*****************************************************************************
  818. //
  819. // DOWNLOADINFO.rgocd[] index values
  820. //
  821. #define DLI_OCD_RESERVED 0
  822. #define DLI_OCD_BEGIN_DL_JOB 1
  823. #define DLI_OCD_BEGIN_FONT_DL 2
  824. #define DLI_OCD_SET_FONT_ID 3
  825. #define DLI_OCD_SEND_FONT_DESCRIPTOR 4
  826. #define DLI_OCD_SELECT_FONT_ID 5
  827. #define DLI_OCD_SET_CHAR_CODE 6
  828. #define DLI_OCD_SEND_CHAR_DESCRIPTOR 7
  829. #define DLI_OCD_END_FONT_DL 8
  830. #define DLI_OCD_MAKE_PERM 9
  831. #define DLI_OCD_MAKE_TEMP 10
  832. #define DLI_OCD_END_DL_JOB 11
  833. #define DLI_OCD_DEL_FONT 12
  834. #define DLI_OCD_DEL_ALL_FONTS 13
  835. #define DLI_OCD_SET_SECOND_FONT_ID 14
  836. #define DLI_OCD_SELECT_SECOND_FONT_ID 15
  837. #define DLI_OCD_MAX 16
  838. typedef struct
  839. {
  840. short cbSize; // size of DOWNLOADINFO, 52 bytes
  841. WORD wReserved; // for DWORD alignment
  842. WORD fGeneral; // general bit flags
  843. WORD fFormat; // describes download font format
  844. WORD wIDMin;
  845. WORD wIDMax;
  846. short cbBitmapFontDescriptor;
  847. short cbScaleFontDescriptor;
  848. short cbCharDescriptor;
  849. WORD wMaxCharHeight;
  850. short sMaxFontCount;
  851. WORD orgwCmdOrder;
  852. OCD rgocd[DLI_OCD_MAX];
  853. } DOWNLOADINFO, * PDOWNLOADINFO;
  854. //
  855. // DOWNLOADINFO.fGeneral flag values
  856. //
  857. #define DLI_GEN_CNT 0x0001 // printer limits # DL fonts by fixed #
  858. #define DLI_GEN_MEMORY 0x0002 // printer limits # DL fonts by memory
  859. #define DLI_GEN_DLJOB 0x0004 // printer can only DL fonts on per
  860. // job basis
  861. #define DLI_GEN_DLPAGE 0x0008 // printer can DL fonts on per page
  862. // basis
  863. //
  864. // NOTE: if neither of the above 2 flags
  865. // are ste, assume DL can happen any time
  866. //
  867. #define DLI_GEN_PT_IDS 0x0010 // use OCD_SET_FONT_ID for specifiy
  868. // perm/temp
  869. #define DLI_GEN_FNTDEL 0x0020 // del single font supported
  870. #define DLI_GEN_ALLFNTDEL 0x0040 // del all fonts supported
  871. #define DLI_GEN_FNTDEL_ANYWHERE 0x0080 // if set, fonts can be deleted at
  872. // any point. Default is at page
  873. // boundary only
  874. #define DLI_GEN_7BIT_CHARSET 0x0100 // printer supports only 7-bit charset
  875. //
  876. // DOWNLOADINFO.fFormat flag values
  877. //
  878. #define DLI_FMT_PCL 0x0001 // PCL printer
  879. #define DLI_FMT_INCREMENT 0x0002 // incremental download recommended
  880. #define DLI_FMT_RES_SPECIFIED 0x0004 // allow resolution specified bitmap
  881. // font download. The X & Y resolutions
  882. // are attached to the end of the
  883. // regular bitmap font descriptor.
  884. #define DLI_FMT_OUTLINE 0x0008 // from WIN95 GPC
  885. #define DLI_FMT_PCLETTO 0x0008 // alias for outline downloading (remove later)
  886. #define DLI_FMT_CAPSL 0x0010 // Use CaPSL download header
  887. #define DLI_FMT_PPDS 0x0020 // Use PPDS download header
  888. #define DLI_FMT_CALLBACK 0x0040 // minidriver provide callbacks for
  889. // for downloading bitmap fonts.
  890. //*****************************************************************************
  891. //
  892. // VECTPAGE describes information about the vector page and miscellaneous
  893. // vector capabilities and commands
  894. //
  895. //*****************************************************************************
  896. //
  897. // VECTPAGE.rgocd[] index values
  898. //
  899. #define VP_OCD_INIT_VECT 0
  900. #define VP_OCD_ENTER_VECT 1
  901. #define VP_OCD_EXIT_VECT 2
  902. #define VP_OCD_TRANSPARENT 3
  903. #define VP_OCD_OPAQUE 4
  904. #define VP_OCD_ANCHOR 5
  905. #define VP_OCD_SET_CLIPRECT 6
  906. #define VP_OCD_CLEAR_CLIPRECT 7
  907. #define VP_OCD_ENDCAP_FLAT 8
  908. #define VP_OCD_ENDCAP_ROUND 9
  909. #define VP_OCD_ENDCAP_SQUARE 10
  910. #define VP_OCD_JOIN_BEVEL 11
  911. #define VP_OCD_JOIN_MITER 12
  912. #define VP_OCD_JOIN_ROUND 13
  913. #define VP_OCD_RESERVED1 14
  914. #define VP_OCD_RESERVED2 15
  915. #define VP_OCD_RESERVED3 16
  916. #define VP_OCD_RESERVED4 17
  917. #define VP_OCD_MAX 18
  918. typedef struct
  919. {
  920. WORD cbSize; // Size of VECTPAGE, 44 bytes
  921. WORD fGeneral; // General use bitfield
  922. POINT ptVectDPI; // Vector units per inch
  923. OCD rgocd[VP_OCD_MAX]; // Offsets to commands
  924. } VECTPAGE, *PVECTPAGE, FAR *LPVECTPAGE;
  925. //
  926. // VECTPAGE.fGeneral flags
  927. //
  928. #define VP_GEN_X_AXIS_LEFT 0x0001 // Set if plotter's X axis (horizontal)
  929. // extends left. Default is to the right
  930. #define VP_GEN_Y_AXIS_UP 0x0002 // Sef if plotter's Y axis (vertical)
  931. //******************************************************************************//
  932. // CAROUSEL describes carousel characteristics. If the pens are fixed,
  933. // this also specifies the colors of each pen.
  934. //
  935. //******************************************************************************
  936. //
  937. // CAROUSEL.rgocd[] index values
  938. //
  939. #define CAR_OCD_SELECT_PEN_COLOR 0
  940. #define CAR_OCD_SET_PEN_WIDTH 1
  941. #define CAR_OCD_RETURN_PEN 2
  942. #define CAR_OCD_RESERVED 3
  943. #define CAR_OCD_MAX 4
  944. typedef struct
  945. {
  946. WORD cbSize; // Size of CAROUSEL, 16 bytes
  947. WORD fGeneral; // General purpose bitfield
  948. WORD wNumPens; // # of pens in carousel
  949. short oiRGBColors; // colors of pens in carousel
  950. OCD rgocd[CAR_OCD_MAX]; // commands associated with carousel
  951. } CAROUSEL, *PCAROUSEL, FAR *LPCAROUSEL;
  952. //
  953. // CAROUSEL.fGeneral flags
  954. //
  955. #define CAR_GEN_CAROUSEL_LEFT 0x0001 // Set if pen moves to the left of
  956. // page when returned to carousel
  957. #define CAR_GEN_CAROUSEL_RIGHT 0x0002 // Set if pen moves to the right of
  958. // page when returned to carousel
  959. #define CAR_GEN_CAROUSEL_TOP 0x0004 // Set if pen moves to the top of
  960. // page when returned to carousel
  961. #define CAR_GEN_CAROUSEL_BOTTOM 0x0008 // Set if pen moves to the bottom of
  962. // page when returned to carousel
  963. #define CAR_GEN_CAROUSEL_FIXED 0x0010 // Carousel has fixed set of pens
  964. #define CAR_GEN_RETURN_PEN 0x0020 // Pen must be explicitly returned
  965. // to the carousel before selecting
  966. // a new pen.
  967. #define CAR_GEN_VARIABLE_PEN_WIDTH 0x0040 // Set if SET_PEN_WIDTH changes
  968. // the width of the (logical) pen
  969. // as opposed to informing the
  970. // plotter of the physical width.
  971. //******************************************************************************//
  972. // PENINFO describes the characteristics of an available pen
  973. //
  974. //******************************************************************************
  975. //
  976. // PENINFO.rgocd[] index values
  977. //
  978. typedef struct
  979. {
  980. WORD cbSize; // Size of PENINFO, 16 bytes
  981. WORD fGeneral; // General purpose bitfield
  982. DWORD fType; // Surfaces on which pen can draw
  983. DWORD dwColor; // RGB color of the pen
  984. WORD fThick; // Thickness in which pen is available
  985. WORD wIDS; // Stringtable resource for this color's name
  986. } PENINFO, *PPENINFO, FAR *LPPENINFO;
  987. //
  988. // PENINFO.fThick values
  989. //
  990. #define PI_FTHICK_18 0x0001 // Pen comes in 0.18mm
  991. #define PI_FTHICK_25 0x0002 // Pen comes in 0.25mm
  992. #define PI_FTHICK_30 0x0004 // Pen comes in 0.30mm
  993. #define PI_FTHICK_35 0x0008 // Pen comes in 0.35mm
  994. #define PI_FTHICK_50 0x0010 // Pen comes in 0.50mm
  995. #define PI_FTHICK_70 0x0020 // Pen comes in 0.70mm
  996. #define PI_FTHICK_100 0x0040 // Pen comes in 1.00mm
  997. //
  998. // PENINFO.fType values depend on the defined paper sources, but reserve
  999. // the high bit to indicate that any paper source is valid.
  1000. //
  1001. #define PI_FTYPE_ANY 0x80000000
  1002. //******************************************************************************//
  1003. // LINEINFO describes the line style creation and selection commands
  1004. //
  1005. //******************************************************************************
  1006. //
  1007. // LINEINFO.rgocd[] index values
  1008. //
  1009. #define LI_OCD_DELETE_LINESTYLE 0
  1010. #define LI_OCD_SELECT_NULL 1
  1011. #define LI_OCD_SELECT_SOLID 2
  1012. #define LI_OCD_CREATE_DASH 3
  1013. #define LI_OCD_SELECT_DASH 4
  1014. #define LI_OCD_CREATE_DOT 5
  1015. #define LI_OCD_SELECT_DOT 6
  1016. #define LI_OCD_CREATE_DASHDOT 7
  1017. #define LI_OCD_SELECT_DASHDOT 8
  1018. #define LI_OCD_CREATE_DASHDOTDOT 9
  1019. #define LI_OCD_SELECT_DASHDOTDOT 10
  1020. #define LI_OCD_RESERVED1 11
  1021. #define LI_OCD_RESERVED2 12
  1022. #define LI_OCD_RESERVED3 13
  1023. #define LI_OCD_RESERVED4 14
  1024. #define LI_OCD_RESERVED5 15
  1025. #define LI_OCD_MAX 16
  1026. typedef struct
  1027. {
  1028. WORD cbSize; // Size of LINEINFO, 40 bytes
  1029. WORD fGeneral; // General purpose bitfield
  1030. short sMaxUserDefined; // Max # of line styles that can be defined at once
  1031. WORD wReserved; // Maintain DWORD alignment
  1032. OCD rgocd[LI_OCD_MAX];// Offsets to commands
  1033. } LINEINFO, *PLINEINFO, FAR *LPLINEINFO;
  1034. //******************************************************************************//
  1035. // BRUSHINFO describes the brush style creation and selection commands
  1036. //
  1037. //******************************************************************************
  1038. //
  1039. // BRUSHINFO.rgocd[] index values
  1040. //
  1041. #define BI_OCD_SELECT_NULL 0
  1042. #define BI_OCD_SELECT_SOLID 1
  1043. #define BI_OCD_SELECT_HS_HORIZONTAL 2
  1044. #define BI_OCD_SELECT_HS_VERTICAL 3
  1045. #define BI_OCD_SELECT_HS_FDIAGONAL 4
  1046. #define BI_OCD_SELECT_HS_BDIAGONAL 5
  1047. #define BI_OCD_SELECT_HS_CROSS 6
  1048. #define BI_OCD_SELECT_HS_DIAGCROSS 7
  1049. #define BI_OCD_CREATE_BRUSHSTYLE_1 8
  1050. #define BI_OCD_CREATE_BIT_1 9
  1051. #define BI_OCD_CREATE_SEPARATOR_1 10
  1052. #define BI_OCD_CREATE_BRUSHSTYLE_2 11
  1053. #define BI_OCD_CREATE_BYTE_2 12
  1054. #define BI_OCD_SELECT_BRUSHSTYLE 13
  1055. #define BI_OCD_DELETE_BRUSHSTYLE 14
  1056. #define BI_OCD_CREATE_END_1 15
  1057. #define BI_OCD_RESERVED2 16
  1058. #define BI_OCD_RESERVED3 17
  1059. #define BI_OCD_MAX 18
  1060. typedef struct
  1061. {
  1062. WORD cbSize; // Size of BRUSHINFO, 40 bytes
  1063. WORD fGeneral; // General purpose bitfield
  1064. short sMaxUserDefined; // Max # of user-defined brushes allowed at once
  1065. WORD wReserved; // Maintain DWORD alignment
  1066. OCD rgocd[BI_OCD_MAX]; // Offsets to commands
  1067. } BRUSHINFO, *PBRUSHINFO, FAR *LPBRUSHINFO;
  1068. //
  1069. // BRUSHINFO.fGeneral flags
  1070. //
  1071. #define BI_GEN_BRUSHSTYLE1 0x0001 // BRUSHSTYLE1 supported
  1072. #define BI_GEN_BRUSHSTYLE2 0x0002 // BRUSHSTYLE2 supported
  1073. #define BI_GEN_BRUSH32x32 0x0004 // Brush size of 32x32 pixels ONLY
  1074. //******************************************************************************//
  1075. // VECTOUTPUT describes the graphic output drawing commands & ordering
  1076. //
  1077. //******************************************************************************
  1078. //
  1079. // VECTOUTPUT.rgocd[] index values
  1080. //
  1081. #define VO_OCD_RECTANGLE 0
  1082. #define VO_OCD_CIRCLE 1
  1083. #define VO_OCD_ELLIPSE 2
  1084. #define VO_OCD_C_PIE 3
  1085. #define VO_OCD_E_PIE 4
  1086. #define VO_OCD_C_ARC 5
  1087. #define VO_OCD_E_ARC 6
  1088. #define VO_OCD_C_CHORD 7
  1089. #define VO_OCD_E_CHORD 8
  1090. #define VO_OCD_RESERVED1 9
  1091. #define VO_OCD_RESERVED2 10
  1092. #define VO_OCD_RESERVED3 11
  1093. #define VO_OCD_RESERVED4 12
  1094. #define VO_OCD_RESERVED5 13
  1095. #define VO_OCD_RESERVED6 14
  1096. #define VO_OCD_RESERVED7 15
  1097. #define VO_OCD_MAX 16
  1098. #define VO_OCD_NUM 9 // # non-reserved VOs
  1099. typedef struct
  1100. {
  1101. WORD cbSize; // Size of VECTOUTPUT, 40 bytes
  1102. WORD fGeneral; // General purpose bitfield
  1103. WORD wReserved; // Maintain DWORD alignment
  1104. short rgoi[VO_OCD_MAX]; // Offsets to arrays of VECTSUPPORT
  1105. OCD rgocd[VO_OCD_MAX]; // Offsets to commands
  1106. } VECTOUTPUT, *PVECTOUTPUT, FAR *LPVECTOUTPUT;
  1107. //******************************************************************************//
  1108. // POLYVECTOUTPUT describes the polygon/polyline drawing commands & ordering
  1109. //
  1110. //******************************************************************************
  1111. //
  1112. // POLYVECTOUTPUT.rgocd[] index values
  1113. //
  1114. #define PVO_OCD_POLYLINE 0
  1115. #define PVO_OCD_ALTPOLYGON 1
  1116. #define PVO_OCD_WINDPOLYGON 2
  1117. #define PVO_OCD_POLYBEZIER 3
  1118. #define PVO_OCD_RESERVED1 4
  1119. #define PVO_OCD_RESERVED2 5
  1120. #define PVO_OCD_RESERVED3 6
  1121. #define PVO_OCD_RESERVED4 7
  1122. #define PVO_OCD_MAX 8
  1123. #define PVO_OCD_NUM 4 // # non-reserved PVOs
  1124. //
  1125. // Indices into 2-dimensional array rgocd
  1126. //
  1127. #define OCD_BEGIN 0
  1128. #define OCD_CONTINUE 1
  1129. #define OCD_SEPARATOR 2
  1130. #define OCD_END 3
  1131. #define OCD_MAX 4
  1132. typedef struct
  1133. {
  1134. WORD cbSize; // sizeof POLYVECTOUTPUT, 88 bytes
  1135. WORD fGeneral; // General purpose bitfield
  1136. WORD wPointLimit; // Polygon Point Number Limit
  1137. WORD wReserved; // Reserved for future use
  1138. short rgoi[PVO_OCD_MAX]; // Describes which VECTSUPPORTs are used
  1139. OCD rgocd[PVO_OCD_MAX][OCD_MAX]; // offsets to commands
  1140. } POLYVECTOUTPUT, *PPOLYVECTOUTPUT, FAR *LPPOLYVECTOUTPUT;
  1141. //******************************************************************************//
  1142. // VECTSUPPORT describes methods used by VECTOUTPUT and POLYVECTOUTPUT
  1143. //
  1144. //******************************************************************************
  1145. //
  1146. // VECTSUPPORT.rgocd[] index values
  1147. //
  1148. #define VS_OCD_BEGIN_POLYDEF 0
  1149. #define VS_OCD_END_POLYDEF 1
  1150. #define VS_OCD_WIND_FILL 2
  1151. #define VS_OCD_ALT_FILL 3
  1152. #define VS_OCD_STROKE 4
  1153. #define VS_OCD_PEN_UP 5
  1154. #define VS_OCD_PEN_DOWN 6
  1155. #define VS_OCD_RESERVED1 7
  1156. #define VS_OCD_RESERVED2 8
  1157. #define VS_OCD_RESERVED3 9
  1158. #define VS_OCD_MAX 10
  1159. //
  1160. // These are used by VECTOUTPUT and POLYVECTOUTPUT to represent their ordering
  1161. // of pen and brush selection, as well as their OCD or Begin OCD, Continue
  1162. // OCD, and End OCD combination
  1163. //
  1164. #define VS_SELECT_PEN -1
  1165. #define VS_SELECT_BRUSH -2
  1166. #define VS_OCD -3
  1167. #define VS_OCD_BEGIN -4
  1168. #define VS_OCD_CONTINUE -5
  1169. #define VS_OCD_END -6
  1170. typedef struct
  1171. {
  1172. WORD cbSize; // Size of VECTSUPPORT, 24 bytes
  1173. WORD fGeneral; // General purpose bitfield
  1174. short rgocd[VS_OCD_MAX]; // Offsets to commands
  1175. } VECTSUPPORT, *PVECTSUPPORT, FAR *LPVECTSUPPORT;
  1176. //*****************************************************************************
  1177. //
  1178. // IMAGECONTROL contains information needed to select an image control
  1179. //
  1180. //*****************************************************************************
  1181. typedef struct
  1182. {
  1183. short cbSize; // size of IMAGECONTROL, 8 bytes
  1184. short sID; // If sID <= 256 then it's predefined
  1185. // otherwise, it is the stringtable ID.
  1186. short fGeneral; // General purpose Bit field
  1187. OCD ocdSelect; // Command Descriptor to select this attribute.
  1188. } IMAGECONTROL, * PIMAGECONTROL, FAR * LPIMAGECONTROL;
  1189. //
  1190. // IMAGECONTROL.fGeneral flag values
  1191. //
  1192. // None defined
  1193. //*****************************************************************************
  1194. //
  1195. // PRINTDENSITY contains information needed to select an image control
  1196. //
  1197. //*****************************************************************************
  1198. typedef struct
  1199. {
  1200. short cbSize; // size of PRINTDENSITY, 8 bytes
  1201. short sID; // If sID <= 256 then it's predefined
  1202. // otherwise, it is the stringtable ID.
  1203. OCD ocdSelect; // Command Descriptor to select this attribute.
  1204. WORD wReserved; // make the structure DWORD aligned.
  1205. } PRINTDENSITY, * PPRINTDENSITY, FAR * LPPRINTDENSITY;
  1206. //*****************************************************************************
  1207. //
  1208. // COLORTRC contains rgb transfer curves on PAPERQUALITY and RESOLUTION basis
  1209. //
  1210. //*****************************************************************************
  1211. typedef struct tagColorTRC
  1212. {
  1213. short cbSize; // size of COLORTRC, 116 bytes
  1214. WORD wReserved; // keep everything DWORD aligned
  1215. WORD fGeneral;
  1216. WORD wIndexPaperQuality;
  1217. WORD wIndexResolution;
  1218. WORD wDitherType; // reserved for dither, set to zero
  1219. WORD wReserved1; // always a good idea
  1220. WORD wReserved2;
  1221. BYTE RGBOrdinates[3][17];
  1222. BYTE padding0; // keep everything DWORD aligned
  1223. BYTE DarkRGBOrdinates[3][17];
  1224. BYTE padding1; // keep everything DWORD aligned
  1225. } COLORTRC, * PCOLORTRC, FAR * LPCOLORTRC;
  1226. //
  1227. // flags for COLORTRC
  1228. //
  1229. #define CTRC_NO_CHECKER_BOARD 0x0001
  1230. #define CTRC_NO_BLACK_PEN 0x0002
  1231. //
  1232. // Offsets into arrays of ORDINATELIST
  1233. //
  1234. #define TRC_RED 0
  1235. #define TRC_GREEN 1
  1236. #define TRC_BLUE 2
  1237. //*****************************************************************************
  1238. //
  1239. // CD - Command Descriptor is used in many of the following structures to
  1240. // reference a particular set of printer command/escape codes
  1241. // used to select paper sizes, graphics resolutions, character attributes,
  1242. // etc. If CD.wType = CMD_FTYPE_EXTENDED, the CD is followed by CD.sCount
  1243. // EXTCD structures.
  1244. //
  1245. //*****************************************************************************
  1246. typedef struct
  1247. {
  1248. BYTE fGeneral; // general purpose bit fields
  1249. BYTE bCmdCbId; // command callback id. 0 iff no callback
  1250. WORD wCount;
  1251. WORD wLength; // length of the command
  1252. } CD, *PCD;
  1253. #define LPCD PCD /* For UNIDRV code */
  1254. //
  1255. // for cd.fGeneral field
  1256. //
  1257. #define CMD_GEN_MAY_REPEAT 0x0001 // Command may be sent multiple times if
  1258. // the parameter exceeds sMax
  1259. #define CMD_MARKER '%'
  1260. //
  1261. // EXTCD - Extended portion of the Command Descriptor. This structure
  1262. // follows rgchCmd[] if cd.wType is 1.
  1263. //
  1264. typedef struct
  1265. {
  1266. WORD fGeneral; // Modes, special command formats.
  1267. short sUnitDiv; // Units relative to master units (divide by)
  1268. short sUnitMult; // Units to multiply master units by, 1 usually
  1269. short sUnitAdd; // Units to add to parameter value, usually 0
  1270. short sPreAdd; // Units to add to master units prior to multiplication
  1271. short sMax; // Maximum parameter allowed in command units.
  1272. short sMin; // Minimum parameter allowed in command units.
  1273. // normanh following added for GPC3 .
  1274. WORD wParam; // Parameter ordinal for multiple parameters
  1275. } EXTCD;
  1276. typedef EXTCD UNALIGNED *PEXTCD ;
  1277. #define LPEXTCD PEXTCD /* For UNIDRV code */
  1278. #define XCD_GEN_RESERVED 0x0001 // Previously defined, now unused
  1279. #define XCD_GEN_NO_MAX 0x0002 // Set if there is no max (sMax ignored)
  1280. #define XCD_GEN_NO_MIN 0x0004 // Set if there is no min (sMin ignored)
  1281. #define XCD_GEN_MODULO 0x0008 // Set if divide should be modulo
  1282. #define CMD_FMODE_SETMODE 0x0001
  1283. //
  1284. // pre-defined text qualities
  1285. //
  1286. #define DMTEXT_FIRST DMTEXT_LQ
  1287. #define DMTEXT_LQ 1
  1288. #define DMTEXT_NLQ 2
  1289. #define DMTEXT_MEMO 3
  1290. #define DMTEXT_DRAFT 4
  1291. #define DMTEXT_TEXT 5
  1292. #define DMTEXT_LAST DMTEXT_TEXT
  1293. #define DMTEXT_USER 256 // lower bound for user-defined text quality id
  1294. //
  1295. // pre-defined paper qualities
  1296. //
  1297. #define DMPAPQUAL_FIRST DMPAPQUAL_NORMAL
  1298. #define DMPAPQUAL_NORMAL 1
  1299. #define DMPAPQUAL_TRANSPARENT 2
  1300. #define DMPAPQUAL_LAST DMPAPQUAL_TRANSPARENT
  1301. //
  1302. // misc
  1303. //
  1304. #define NOT_USED -1 // the value should not be used.
  1305. #define NOOCD 0xFFFF // command does not exist
  1306. // added by Derry Durand [derryd], June 95 for WDL release
  1307. #endif // _UNI16GPC_H_