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.

119 lines
3.4 KiB

  1. #ifndef _PDEV_H
  2. #define _PDEV_H
  3. /*++
  4. Copyright (c) 1996-2001 Microsoft Corp. & Ricoh Co., Ltd. All rights reserved.
  5. FILE: PDEV.H
  6. Abstract: Header file for OEM rendering plugin.
  7. Environment: Windows NT Unidrv5 driver
  8. Revision History:
  9. 02/25/2000 -Masatoshi Kubokura-
  10. Created it.
  11. 10/11/2000 -Masatoshi Kubokura-
  12. Last modified for Whistler.
  13. --*/
  14. //
  15. // Files necessary for OEM plugin.
  16. //
  17. #include <minidrv.h>
  18. #include <stdio.h>
  19. #include "devmode.h"
  20. #include "oem.h"
  21. #include "resource.h"
  22. //
  23. // Misc definitions follows.
  24. //
  25. #ifdef DLLTEXT
  26. #undef DLLTEXT
  27. #endif // ifdef DLLTEXT
  28. #define DLLTEXT(s) "RENDER: " s
  29. // ASSERT(VALID_PDEVOBJ) can be used to verify the passed in "pdevobj". However,
  30. // it does NOT check "pdevOEM" and "pOEMDM" fields since not all OEM DLL's create
  31. // their own pdevice structure or need their own private devmode. If a particular
  32. // OEM DLL does need them, additional checks should be added. For example, if
  33. // an OEM DLL needs a private pdevice structure, then it should use
  34. // ASSERT(VALID_PDEVOBJ(pdevobj) && pdevobj->pdevOEM && ...)
  35. #define VALID_PDEVOBJ(pdevobj) \
  36. ((pdevobj) && (pdevobj)->dwSize >= sizeof(DEVOBJ) && \
  37. (pdevobj)->hEngine && (pdevobj)->hPrinter && \
  38. (pdevobj)->pPublicDM && (pdevobj)->pDrvProcs )
  39. ////////////////////////////////////////////////////////
  40. // DDI hooks
  41. // Warning: the following enum order must match the
  42. // order in OEMHookFuncs[] in DDI.C.
  43. ////////////////////////////////////////////////////////
  44. #ifdef DDIHOOK
  45. enum {
  46. // UD_DrvRealizeBrush,
  47. // UD_DrvDitherColor,
  48. // UD_DrvCopyBits,
  49. // UD_DrvBitBlt,
  50. // UD_DrvStretchBlt,
  51. // UD_DrvStretchBltROP,
  52. // UD_DrvPlgBlt,
  53. // UD_DrvTransparentBlt,
  54. // UD_DrvAlphaBlend,
  55. // UD_DrvGradientFill,
  56. // UD_DrvTextOut,
  57. // UD_DrvStrokePath,
  58. // UD_DrvFillPath,
  59. // UD_DrvStrokeAndFillPath,
  60. // UD_DrvPaint,
  61. // UD_DrvLineTo,
  62. // UD_DrvStartPage,
  63. // UD_DrvSendPage,
  64. // UD_DrvEscape,
  65. UD_DrvStartDoc,
  66. // UD_DrvEndDoc,
  67. // UD_DrvNextBand,
  68. // UD_DrvStartBanding,
  69. // UD_DrvQueryFont,
  70. // UD_DrvQueryFontTree,
  71. // UD_DrvQueryFontData,
  72. // UD_DrvQueryAdvanceWidths,
  73. // UD_DrvFontManagement,
  74. // UD_DrvGetGlyphMode,
  75. MAX_DDI_HOOKS,
  76. };
  77. #endif // DDIHOOK
  78. #define JOBNAMESIZE 224
  79. // rendering plugin device data
  80. typedef struct _OEMPDEV {
  81. DWORD fGeneral; // bit flags for general status
  82. BYTE JobName[(JOBNAMESIZE*2)]; // for CharToOemBuff().
  83. #ifdef DDIHOOK
  84. PFN pfnUnidrv[MAX_DDI_HOOKS]; // Unidrv's hook function pointer
  85. #endif // DDIHOOK
  86. } OEMPDEV, *POEMPDEV;
  87. // PCL Command callback IDs
  88. #define CMD_STARTJOB_PORT_AUTOTRAYCHANGE_OFF 1
  89. #define CMD_STARTJOB_PORT_AUTOTRAYCHANGE_ON 2
  90. #define CMD_STARTJOB_LAND_AUTOTRAYCHANGE_OFF 3
  91. #define CMD_STARTJOB_LAND_AUTOTRAYCHANGE_ON 4
  92. #define CMD_ENDJOB_P5 5
  93. #define CMD_ENDJOB_P6 6
  94. #define CMD_STARTJOB_AUTOTRAYCHANGE_OFF 7
  95. #define CMD_STARTJOB_AUTOTRAYCHANGE_ON 8
  96. #define CMD_COLLATE_JOBOFFSET_OFF 9
  97. #define CMD_COLLATE_JOBOFFSET_ROTATE 10
  98. #define CMD_COLLATE_JOBOFFSET_SHIFT 11
  99. #define CMD_COPIES_P5 12
  100. #define CMD_ENDPAGE_P6 13
  101. #endif // _PDEV_H