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.

116 lines
3.8 KiB

  1. #ifndef _PDEV_H
  2. #define _PDEV_H
  3. //
  4. // Files necessary for OEM plug-in.
  5. //
  6. #include <minidrv.h>
  7. #include <stdio.h>
  8. #include <prcomoem.h>
  9. //
  10. // Misc definitions follows.
  11. //
  12. ////////////////////////////////////////////////////////
  13. // OEM UD Defines
  14. ////////////////////////////////////////////////////////
  15. #define VALID_PDEVOBJ(pdevobj) \
  16. ((pdevobj) && (pdevobj)->dwSize >= sizeof(DEVOBJ) && \
  17. (pdevobj)->hEngine && (pdevobj)->hPrinter && \
  18. (pdevobj)->pPublicDM && (pdevobj)->pDrvProcs )
  19. //
  20. // ASSERT_VALID_PDEVOBJ can be used to verify the passed in "pdevobj". However,
  21. // it does NOT check "pdevOEM" and "pOEMDM" fields since not all OEM DLL's create
  22. // their own pdevice structure or need their own private devmode. If a particular
  23. // OEM DLL does need them, additional checks should be added. For example, if
  24. // an OEM DLL needs a private pdevice structure, then it should use
  25. // ASSERT(VALID_PDEVOBJ(pdevobj) && pdevobj->pdevOEM && ...)
  26. //
  27. #define ASSERT_VALID_PDEVOBJ(pdevobj) ASSERT(VALID_PDEVOBJ(pdevobj))
  28. // Debug text.
  29. //#define ERRORTEXT(s) "ERROR " DLLTEXT(s)
  30. ////////////////////////////////////////////////////////
  31. // OEM UD Prototypes
  32. ////////////////////////////////////////////////////////
  33. //
  34. // OEM Signature and version.
  35. //
  36. #define OEM_SIGNATURE 'NCDL' // NEC NPDL2 series dll
  37. #define DLLTEXT(s) "NCDL: " s
  38. #define OEM_VERSION 0x00010000L
  39. ////////////////////////////////////////////////////////
  40. // OEM UD Type Defines
  41. ////////////////////////////////////////////////////////
  42. typedef struct tag_OEMUD_EXTRADATA {
  43. OEM_DMEXTRAHEADER dmExtraHdr;
  44. WORD wRes; // resolution / MasterUnit
  45. WORD wScale; // The magnification of the font
  46. LONG lPointsx; // font width
  47. LONG lPointsy; // font height
  48. DWORD dwSBCSX; // temp
  49. DWORD dwDBCSX; // temp
  50. LONG lSBCSXMove; // SBCS The expectation X movement quantity
  51. LONG lSBCSYMove; // SBCS The expectation Y movement quantity
  52. LONG lDBCSXMove; // DBCS The expectation X movement quantity
  53. LONG lDBCSYMove; // DBCS The expectation Y movement quantity
  54. LONG lPrevXMove; // The previous X movement quantity
  55. LONG lPrevYMove; // The previous Y movement quantity
  56. DWORD fGeneral; // general flag
  57. WORD wCurrentAddMode; // draw mode
  58. PBYTE pCompBuf; // buffer for compression
  59. DWORD dwCompBufLen; // line buffer
  60. DWORD dwScanLen; // bitmap width
  61. DWORD dwDeviceDestX; // current X coordinate
  62. DWORD dwDeviceDestY; // current Y coordinate
  63. DWORD dwDevicePrevX; // previous X coordinate
  64. DWORD dwDevicePrevY; // previous Y coordinate
  65. // #278517: RectFill
  66. DWORD dwRectWidth; // width for RectFill
  67. DWORD dwRectHeight; // height for RectFill
  68. UINT iGray; // rect fill gray scale
  69. UINT cSubPath; // sub path counter max is 500
  70. // 2001.3.16 add
  71. WORD Duplex_mode;
  72. WORD Duplex_OU;
  73. WORD Margin;
  74. WORD ESort_mode;
  75. } OEMUD_EXTRADATA, *POEMUD_EXTRADATA;
  76. #define MAX_SUBPATH 500
  77. // Flags for fGeneral
  78. #define FG_DBCS 0x00000002
  79. #define FG_VERT 0x00000004
  80. #define FG_PLUS 0x00000010
  81. #ifdef BYPASS
  82. #define FG_NO_COMP 0x00000020
  83. #endif // BYPASS
  84. // #278517: RectFill
  85. #define FG_GMINIT 0x00000040
  86. // Flags for Draw Mode
  87. #define FLAG_RASTER 0 //
  88. #define FLAG_SBCS 1 // FSa SBCS - FSR
  89. #define FLAG_DBCS 2 // FSa DBCS - FSR
  90. #define FLAG_VECTOR 3 // FSY - FSZ
  91. #define MASTER_UNIT 1200
  92. extern BOOL BInitOEMExtraData(POEMUD_EXTRADATA pOEMExtra);
  93. extern BMergeOEMExtraData(POEMUD_EXTRADATA pdmIn, POEMUD_EXTRADATA pdmOut);
  94. #endif // _PDEV_H