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.

91 lines
3.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. //
  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 " s
  30. ////////////////////////////////////////////////////////
  31. // OEM UD Prototypes
  32. ////////////////////////////////////////////////////////
  33. //
  34. // OEM Signature and version.
  35. //
  36. #define OEM_SIGNATURE 'NC62' // NEC 602 series dll
  37. #define DLLTEXT(s) "NC62: " 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. DWORD dwSBCSX; // temp
  46. DWORD dwDBCSX; // temp
  47. LONG lSBCSXMove; // SBCS The expectation X movement quantity
  48. LONG lSBCSYMove; // SBCS The expectation Y movement quantity
  49. LONG lDBCSXMove; // DBCS The expectation X movement quantity
  50. LONG lDBCSYMove; // DBCS The expectation Y movement quantity
  51. LONG lPrevXMove; // The previous X movement quantity
  52. LONG lPrevYMove; // The previous Y movement quantity
  53. DWORD fGeneral; // general flag
  54. WORD wCurrentAddMode; // draw mode
  55. DWORD dwDeviceDestX; // current X coordinate
  56. DWORD dwDeviceDestY; // current Y coordinate
  57. DWORD dwDevicePrevX; // previous X coordinate
  58. DWORD dwDevicePrevY; // previous Y coordinate
  59. // NTRAID#NTBUG9-278517-2002/03/28-yasuho-: RectFill
  60. DWORD dwRectWidth; // width for RectFill
  61. DWORD dwRectHeight; // height for RectFill
  62. } OEMUD_EXTRADATA, *POEMUD_EXTRADATA;
  63. // Flags for fGeneral
  64. #define FG_DBCS 0x00000002
  65. #define FG_VERT 0x00000004
  66. // NTRAID#NTBUG9-278517-2002/03/28-yasuho-: RectFill
  67. #define FG_GMINIT 0x00000040
  68. #define FLAG_SBCS 1
  69. #define FLAG_DBCS 2
  70. #define MASTER_UNIT 1200
  71. extern BOOL BInitOEMExtraData(POEMUD_EXTRADATA pOEMExtra);
  72. extern BMergeOEMExtraData(POEMUD_EXTRADATA pdmIn, POEMUD_EXTRADATA pdmOut);
  73. #endif // _PDEV_H