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.2 KiB

  1. #ifndef _PDEV_H
  2. #define _PDEV_H
  3. #include <minidrv.h>
  4. #include <stdio.h>
  5. #include <prcomoem.h>
  6. //
  7. // OEM Signature and version.
  8. //
  9. #define OEM_SIGNATURE 'CPWN' // CASIO Winmode
  10. #define DLLTEXT(s) "CSWN: " s
  11. #define OEM_VERSION 0x00010000L
  12. #define VALID_PDEVOBJ(pdevobj) \
  13. ((pdevobj) && (pdevobj)->dwSize >= sizeof(DEVOBJ) && \
  14. (pdevobj)->hEngine && (pdevobj)->hPrinter && \
  15. (pdevobj)->pPublicDM && (pdevobj)->pDrvProcs )
  16. //
  17. // ASSERT_VALID_PDEVOBJ can be used to verify the passed in "pdevobj". However,
  18. // it does NOT check "pdevOEM" and "pOEMDM" fields since not all OEM DLL's create
  19. // their own pdevice structure or need their own private devmode. If a particular
  20. // OEM DLL does need them, additional checks should be added. For example, if
  21. // an OEM DLL needs a private pdevice structure, then it should use
  22. // ASSERT(VALID_PDEVOBJ(pdevobj) && pdevobj->pdevOEM && ...)
  23. //
  24. #define ASSERT_VALID_PDEVOBJ(pdevobj) ASSERT(VALID_PDEVOBJ(pdevobj))
  25. // Debug text.
  26. //#define ERRORTEXT(s) "ERROR " s
  27. ////////////////////////////////////////////////////////
  28. // OEM UD Type Defines
  29. ////////////////////////////////////////////////////////
  30. typedef struct tag_CPPL_EXTRADATA {
  31. OEM_DMEXTRAHEADER dmExtraHdr;
  32. } CPPL_EXTRADATA, *PCPPL_EXTRADATA;
  33. #define POEMUD_EXTRADATA PCPPL_EXTRADATA
  34. #define OEMUD_EXTRADATA CPPL_EXTRADATA
  35. typedef struct {
  36. BYTE jModel;
  37. DWORD dwGeneral;
  38. BYTE jPreAttrib;
  39. SHORT sRes;
  40. SHORT sWMXPosi;
  41. SHORT sWMYPosi;
  42. BYTE jAutoSelect;
  43. BYTE jTonerSave;
  44. BYTE jSmoothing;
  45. BYTE jMPFSetting;
  46. WORD wRectWidth;
  47. WORD wRectHeight;
  48. BOOL bWinmode;
  49. BOOL bHasTonerSave;
  50. BOOL bHasSmooth;
  51. } MYPDEV, *PMYPDEV;
  52. #define MINIPDEV_DATA(p) ((p)->pdevOEM)
  53. // Value for sRes
  54. // The ratio MasterUnit to DeviceUnit
  55. #define MASTERUNIT 1200
  56. #define RATIO_240 (MASTERUNIT / 240)
  57. #define RATIO_400 (MASTERUNIT / 400)
  58. // Flags for dwGeneral
  59. //+++ 0x000000xx(1byte) For character attribute switch
  60. #define FG_BOLD 0x00000001
  61. #define FG_ITALIC 0x00000002
  62. #define FG_WHITE 0x00000008
  63. // ---
  64. #define FG_VERT 0x00000100
  65. #define FG_PROP 0x00000200
  66. #define FG_DOUBLE 0x00000400
  67. #define FG_UNDERLINE 0x00000800
  68. #define FG_STRIKETHRU 0x00001000
  69. #define FG_COMP 0x00010000
  70. #define FG_VERT_ROT 0x00020000
  71. #define FG_HAS_TSAVE 0x01000000
  72. #define FG_HAS_SMOTH 0x02000000
  73. // Value for byTonerSave
  74. #define VAL_TS_NORMAL 0x00
  75. #define VAL_TS_LV1 0x01
  76. #define VAL_TS_LV2 0x02
  77. #define VAL_TS_LV3 0x03
  78. #define VAL_TS_NOTSELECT 0xFF
  79. // Value for bySmoothing
  80. #define VAL_SMOOTH_OFF 0x00
  81. #define VAL_SMOOTH_ON 0x01
  82. #define VAL_SMOOTH_NOTSELECT 0xFF
  83. // Value for byMPFSetting
  84. #define MPF_NOSET 0x00
  85. #define MPF_A3 0x01
  86. #define MPF_B4 0x02
  87. #define MPF_A4 0x03
  88. #define MPF_B5 0x04
  89. #define MPF_LETTER 0x05
  90. #define MPF_POSTCARD 0x06
  91. #define MPF_A5 0x07
  92. extern BOOL BInitOEMExtraData(POEMUD_EXTRADATA pOEMExtra);
  93. extern BMergeOEMExtraData(POEMUD_EXTRADATA pdmIn, POEMUD_EXTRADATA pdmOut);
  94. #endif // _PDEV_H