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.

124 lines
4.1 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. // NTRAID#NTBUG9-580353-2002/03/18-v-sueyas-: Use strsafe.h
  10. #include <strsafe.h>
  11. //
  12. // Misc definitions follows.
  13. //
  14. ////////////////////////////////////////////////////////
  15. // OEM UD Defines
  16. ////////////////////////////////////////////////////////
  17. #define VALID_PDEVOBJ(pdevobj) \
  18. ((pdevobj) && (pdevobj)->dwSize >= sizeof(DEVOBJ) && \
  19. (pdevobj)->hEngine && (pdevobj)->hPrinter && \
  20. (pdevobj)->pPublicDM && (pdevobj)->pDrvProcs )
  21. //
  22. // ASSERT_VALID_PDEVOBJ can be used to verify the passed in "pdevobj". However,
  23. // it does NOT check "pdevOEM" and "pOEMDM" fields since not all OEM DLL's create
  24. // their own pdevice structure or need their own private devmode. If a particular
  25. // OEM DLL does need them, additional checks should be added. For example, if
  26. // an OEM DLL needs a private pdevice structure, then it should use
  27. // ASSERT(VALID_PDEVOBJ(pdevobj) && pdevobj->pdevOEM && ...)
  28. //
  29. #define ASSERT_VALID_PDEVOBJ(pdevobj) ASSERT(VALID_PDEVOBJ(pdevobj))
  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. } OEMUD_EXTRADATA, *POEMUD_EXTRADATA;
  71. #define MAX_SUBPATH 500
  72. // Flags for fGeneral
  73. #define FG_DBCS 0x00000002
  74. #define FG_VERT 0x00000004
  75. #define FG_PLUS 0x00000010
  76. #ifdef BYPASS
  77. #define FG_NO_COMP 0x00000020
  78. #endif // BYPASS
  79. // #278517: RectFill
  80. #define FG_GMINIT 0x00000040
  81. // Flags for Draw Mode
  82. #define FLAG_RASTER 0 //
  83. #define FLAG_SBCS 1 // FSa SBCS - FSR
  84. #define FLAG_DBCS 2 // FSa DBCS - FSR
  85. #define FLAG_VECTOR 3 // FSY - FSZ
  86. #define MASTER_UNIT 1200
  87. extern BOOL BInitOEMExtraData(POEMUD_EXTRADATA pOEMExtra);
  88. extern BMergeOEMExtraData(POEMUD_EXTRADATA pdmIn, POEMUD_EXTRADATA pdmOut);
  89. // NTRAID#NTBUG9-580367-2002/03/18-v-sueyas-: Error handling
  90. // New interface functions with Unidrv callbacks.
  91. #ifdef __cplusplus
  92. extern "C" {
  93. #endif
  94. BOOL APIENTRY bOEMSendFontCmd(PDEVOBJ pdevobj, PUNIFONTOBJ pUFObj, PFINVOCATION pFInv);
  95. BOOL APIENTRY bOEMOutputCharStr(PDEVOBJ pdevobj, PUNIFONTOBJ pUFObj, DWORD dwType, DWORD dwCount, PVOID pGlyph);
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99. #endif // _PDEV_H