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.

170 lines
6.6 KiB

  1. /*++
  2. Copyright (c) 1996 - 1999 Microsoft Corporation
  3. Module Name:
  4. RastPdev.h
  5. Abstract:
  6. Unidrv RASTPDEV and related info header file.
  7. Environment:
  8. Windows NT Unidrv driver
  9. Revision History:
  10. 12/06/96 -alvins-
  11. Created
  12. dd-mm-yy -author-
  13. description
  14. --*/
  15. #ifndef _RASTPDEV_H_
  16. #define _RASTPDEV_H_
  17. #include "win30def.h"
  18. /* flags for fRMode */
  19. #define PFR_SENDSRCWIDTH 0x00000001 // send source width
  20. #define PFR_SENDSRCHEIGHT 0x00000002 // send source height
  21. #define PFR_SENDBEGINRASTER 0x00000004 // send begin raster command
  22. #define PFR_RECT_FILL 0x00000008 // enable rules checking
  23. #define PFR_RECT_HORIZFILL 0x00000010 // enable horizontal rules check
  24. #define PFR_BLOCK_IS_BAND 0x00000020 /* Derryd:Full band sent to OemFlGrx */
  25. #define PFR_ENDBLOCK 0x00000100 // need to send end of block command
  26. #define PFR_COMP_TIFF 0x00000200 // enable TIFF compression
  27. #define PFR_COMP_FERLE 0x00000400 // enable FERLE compression
  28. #define PFR_COMP_DISABLED 0x00000800 // enable no compression
  29. #define PFR_COMP_DRC 0x00001000 // enable DRC compression
  30. #define PFR_COMP_OEM 0x00002000 // enable OEM compression
  31. /*
  32. * fDump values
  33. */
  34. #define RES_DM_GDI 0x0040 // GDI bitmap format
  35. #define RES_DM_LEFT_BOUND 0x0080 // Optimize by bounding rect
  36. #define RES_DM_COLOR 0x0100 // Color support is available
  37. /*
  38. * fBlockOut values
  39. */
  40. #define RES_BO_LEADING_BLNKS 0x0001 // Strip leading blanks
  41. #define RES_BO_TRAILING_BLNKS 0x0002 // Strip trailing blanks
  42. #define RES_BO_ENCLOSED_BLNKS 0x0004 // Strip enclosed blanks
  43. #define RES_BO_UNIDIR 0x0008 // send unidir command for raster
  44. #define RES_BO_MIRROR 0x0010 // mirror the data
  45. #define RES_BO_MULTIPLE_ROWS 0x0020 // Multiple lines of data can be sent
  46. #define RES_BO_NO_YMOVE_CMD 0x0040 // No Y movement so can't strip blanks
  47. /*
  48. * fCursor values
  49. */
  50. #define RES_CUR_X_POS_ORG 0x0001 // X Position is at X start point
  51. // of graphic data after rendering data
  52. #define RES_CUR_X_POS_AT_0 0x0002 // X position at leftmost place
  53. // on page after rendering data
  54. #define RES_CUR_Y_POS_AUTO 0x0004 // Y position automatically moves
  55. // to next Y row
  56. //#define RES_CUR_CR_GRX_ORG 0x0008 // CR moves X pos to X start point of
  57. // of graphic data
  58. //
  59. // RASTERPDEV structure
  60. //
  61. #define DC_MAX_PLANES 4
  62. typedef struct _RASTERPDEV {
  63. DWORD fRMode;
  64. DWORD *pdwTrans; /* Transpose table, if required */
  65. DWORD *pdwColrSep; /* Colour separation data, if required */
  66. DWORD *pdwBitMask; /* Bitmask table, white skip code */
  67. VOID *pHalftonePattern; /* Custom halftone table */
  68. BYTE rgbOrder[DC_MAX_PLANES]; /*Colour plane/palette order*/
  69. DWORD rgbCmdOrder[DC_MAX_PLANES];
  70. PAL_DATA *pPalData; /* Palette information */
  71. DWORD dwRectFillCommand; // command to use for rules
  72. WORD fColorFormat; /* color flags DEVCOLOR: */
  73. WORD fDump; // Dump method flags.
  74. WORD fBlockOut; // Block out method flags.
  75. WORD fCursor; // Cursor position flags.
  76. short sMinBlankSkip; // Min. # of bytes of null data that must occur before
  77. short sNPins; // Minimum height of the image to be rendered together.
  78. short sPinsPerPass; // Physical number of pins fired in one pass.
  79. short sDevPlanes; /* # of planes in the device color model, */
  80. short sDevBPP; /* Device Bits per pixel - if Pixel model */
  81. short sDrvBPP; // Drv Bits per pixel
  82. BOOL bTTY; // Is printer type TTY
  83. int iLookAhead; // look ahead region for deskjet types
  84. void *pRuleData; // pointer to rules structure
  85. VOID *pvRenderData; /* Rendering summary data, PRENDER */
  86. VOID *pvRenderDataTmp; /* Temporary copy for use in banding */
  87. //
  88. // callback functions
  89. //
  90. PFN_OEMCompression pfnOEMCompression;
  91. PFN_OEMHalftonePattern pfnOEMHalftonePattern;
  92. PFN_OEMImageProcessing pfnOEMImageProcessing;
  93. PFN_OEMFilterGraphics pfnOEMFilterGraphics;
  94. DWORD dwIPCallbackID; /* OEM Image Processing CallbackID */
  95. #ifdef TIMING
  96. DWORD dwTiming; // used for timing
  97. DWORD dwDocTiming;
  98. #endif
  99. } RASTERPDEV, *PRASTERPDEV;
  100. /*
  101. * DEVCOLOR.fGeneral bit flags:
  102. */
  103. #define DC_PRIMARY_RGB 0x0001 // use RGB as 3 primary colors.
  104. // Default: use CMY instead.
  105. #define DC_EXTRACT_BLK 0x0002 // Separate black ink/ribbon is available.
  106. // Default: compose black using CMY.
  107. // It is ignored if DC_PRIMARY_RGB is set
  108. #define DC_CF_SEND_CR 0x0004 // send CR before selecting graphics
  109. // color. Due to limited printer buffer
  110. #define DC_SEND_ALL_PLANES 0x0008 /* All planes must be sent, e.g. PaintJet */
  111. #define DC_OEM_BLACK 0x0010 // OEM is responsible for creating black
  112. // and inverting data
  113. #define DC_EXPLICIT_COLOR 0x0020 /* Send command to select colour */
  114. #define DC_SEND_PALETTE 0x0040 /* Device is Palette Managed; Seiko 8BPP */
  115. /* sandram
  116. * add field to send dithered text for Color LaserJet - set foreground color.
  117. */
  118. //#define DC_FG_TEXT_COLOR 0x0080 /* Send command to select text foreground color */
  119. #define DC_ZERO_FILL 0x0100 /* This model fills raster to the end of the page with zeros */
  120. //* define color order
  121. #define DC_PLANE_RED 1
  122. #define DC_PLANE_GREEN 2
  123. #define DC_PLANE_BLUE 3
  124. #define DC_PLANE_CYAN 4
  125. #define DC_PLANE_MAGENTA 5
  126. #define DC_PLANE_YELLOW 6
  127. #define DC_PLANE_BLACK 7
  128. //-------------------------------------------
  129. // fTechnology--used as an ID, not a bitfield
  130. //-------------------------------------------
  131. #define GPC_TECH_DEFAULT 0 // Default technology
  132. #define GPC_TECH_PCL4 1 // Uses PCL level 4 or above
  133. #define GPC_TECH_CAPSL 2 // Uses CaPSL level 3 or above
  134. #define GPC_TECH_PPDS 3 // Uses PPDS
  135. #define GPC_TECH_TTY 4 // TTY printer--user configurable
  136. /*
  137. * fCompMode
  138. */
  139. #define CMP_ID_TIFF4 0x0001
  140. #define CMP_ID_FERLE 0x0002
  141. #define CMP_ID_DRC 0x0004
  142. #define CMP_ID_OEM 0x0008
  143. #endif // !_RASTPDEV_H_