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.

263 lines
8.6 KiB

  1. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  2. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  3. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  4. // PARTICULAR PURPOSE.
  5. //
  6. // Copyright 1997 - 2003 Microsoft Corporation. All Rights Reserved.
  7. //
  8. // FILE: Intrface.H
  9. //
  10. //
  11. // PURPOSE: Define COM interface for User Mode Printer Customization DLL.
  12. //
  13. // PLATFORMS:
  14. //
  15. // Windows 2000, Windows XP, Windows Server 2003
  16. //
  17. //
  18. #ifndef _INTERFACE_H
  19. #define _INTERFACE_H
  20. ////////////////////////////////////////////////////////////////////////////////
  21. //
  22. // IOemUni
  23. //
  24. // Interface for Unidrv OEM sample rendering module
  25. //
  26. class IOemUni : public IPrintOemUni
  27. {
  28. public:
  29. public:
  30. // *** IUnknown methods ***
  31. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj);
  32. STDMETHOD_(ULONG,AddRef) (THIS);
  33. STDMETHOD_(ULONG,Release) (THIS);
  34. //
  35. // Method for publishing Driver interface.
  36. //
  37. STDMETHOD(PublishDriverInterface)(THIS_ IUnknown *pIUnknown);
  38. //
  39. // Method for getting the implemented methods.
  40. // Returns S_OK if the given method is implemneted.
  41. // Returns S_FALSE if the given method is notimplemneted.
  42. //
  43. STDMETHOD(GetImplementedMethod)(THIS_ PSTR pMethodName);
  44. //
  45. // Method for OEM to specify DDI hook out
  46. //
  47. STDMETHOD(EnableDriver) (THIS_ DWORD DriverVersion,
  48. DWORD cbSize,
  49. PDRVENABLEDATA pded);
  50. //
  51. // Method to notify OEM plugin that it is no longer required
  52. //
  53. STDMETHOD(DisableDriver) (THIS);
  54. //
  55. // Method for OEM to contruct its own PDEV
  56. //
  57. STDMETHOD(EnablePDEV) (THIS_ PDEVOBJ pdevobj,
  58. PWSTR pPrinterName,
  59. ULONG cPatterns,
  60. HSURF *phsurfPatterns,
  61. ULONG cjGdiInfo,
  62. GDIINFO *pGdiInfo,
  63. ULONG cjDevInfo,
  64. DEVINFO *pDevInfo,
  65. DRVENABLEDATA *pded,
  66. OUT PDEVOEM *pDevOem);
  67. //
  68. // Method for OEM to free any resource associated with its PDEV
  69. //
  70. STDMETHOD(DisablePDEV) (THIS_ PDEVOBJ pdevobj);
  71. //
  72. // Method for OEM to transfer from old PDEV to new PDEV
  73. //
  74. STDMETHOD(ResetPDEV) (THIS_ PDEVOBJ pdevobjOld,
  75. PDEVOBJ pdevobjNew);
  76. //
  77. // Get OEM dll related information
  78. //
  79. STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
  80. PVOID pBuffer,
  81. DWORD cbSize,
  82. PDWORD pcbNeeded);
  83. //
  84. // OEMDriverDMS - UNIDRV only, return E_NOTIMPL on Pscript
  85. //
  86. STDMETHOD(DriverDMS)(THIS_ PVOID pDevObj,
  87. PVOID pBuffer,
  88. DWORD cbSize,
  89. PDWORD pcbNeeded);
  90. //
  91. // OEMDevMode
  92. //
  93. STDMETHOD(DevMode) (THIS_ DWORD dwMode,
  94. POEMDMPARAM pOemDMParam);
  95. //
  96. // OEMCommandCallback - UNIDRV only, return E_NOTIMPL on Pscript
  97. //
  98. STDMETHOD(CommandCallback)(THIS_ PDEVOBJ pdevobj,
  99. DWORD dwCallbackID,
  100. DWORD dwCount,
  101. PDWORD pdwParams,
  102. OUT INT *piResult);
  103. //
  104. // OEMImageProcessing - UNIDRV only, return E_NOTIMPL on Pscript
  105. //
  106. STDMETHOD(ImageProcessing)(THIS_ PDEVOBJ pdevobj,
  107. PBYTE pSrcBitmap,
  108. PBITMAPINFOHEADER pBitmapInfoHeader,
  109. PBYTE pColorTable,
  110. DWORD dwCallbackID,
  111. PIPPARAMS pIPParams,
  112. OUT PBYTE *ppbResult);
  113. //
  114. // OEMFilterGraphics - UNIDRV only, return E_NOTIMPL on Pscript
  115. //
  116. STDMETHOD(FilterGraphics) (THIS_ PDEVOBJ pdevobj,
  117. PBYTE pBuf,
  118. DWORD dwLen);
  119. //
  120. // OEMCompression - UNIDRV only, return E_NOTIMPL on Pscript
  121. //
  122. STDMETHOD(Compression)(THIS_ PDEVOBJ pdevobj,
  123. PBYTE pInBuf,
  124. PBYTE pOutBuf,
  125. DWORD dwInLen,
  126. DWORD dwOutLen,
  127. OUT INT *piResult);
  128. //
  129. // OEMHalftone - UNIDRV only, return E_NOTIMPL on Pscript
  130. //
  131. STDMETHOD(HalftonePattern) (THIS_ PDEVOBJ pdevobj,
  132. PBYTE pHTPattern,
  133. DWORD dwHTPatternX,
  134. DWORD dwHTPatternY,
  135. DWORD dwHTNumPatterns,
  136. DWORD dwCallbackID,
  137. PBYTE pResource,
  138. DWORD dwResourceSize);
  139. //
  140. // OEMMemoryUsage - UNIDRV only, return E_NOTIMPL on Pscript
  141. //
  142. STDMETHOD(MemoryUsage) (THIS_ PDEVOBJ pdevobj,
  143. POEMMEMORYUSAGE pMemoryUsage);
  144. //
  145. // OEMTTYGetInfo - UNIDRV only, return E_NOTIMPL on Pscript
  146. //
  147. STDMETHOD(TTYGetInfo)(THIS_ PDEVOBJ pdevobj,
  148. DWORD dwInfoIndex,
  149. PVOID pOutputBuf,
  150. DWORD dwSize,
  151. DWORD *pcbcNeeded);
  152. //
  153. // OEMDownloadFontheader - UNIDRV only
  154. //
  155. STDMETHOD(DownloadFontHeader)(THIS_ PDEVOBJ pdevobj,
  156. PUNIFONTOBJ pUFObj,
  157. OUT DWORD *pdwResult);
  158. //
  159. // OEMDownloadCharGlyph - UNIDRV only
  160. //
  161. STDMETHOD(DownloadCharGlyph)(THIS_ PDEVOBJ pdevobj,
  162. PUNIFONTOBJ pUFObj,
  163. HGLYPH hGlyph,
  164. PDWORD pdwWidth,
  165. OUT DWORD *pdwResult);
  166. //
  167. // OEMTTDownloadMethod - UNIDRV only
  168. //
  169. STDMETHOD(TTDownloadMethod)(THIS_ PDEVOBJ pdevobj,
  170. PUNIFONTOBJ pUFObj,
  171. OUT DWORD *pdwResult);
  172. //
  173. // OEMOutputCharStr - UNIDRV only
  174. //
  175. STDMETHOD(OutputCharStr)(THIS_ PDEVOBJ pdevobj,
  176. PUNIFONTOBJ pUFObj,
  177. DWORD dwType,
  178. DWORD dwCount,
  179. PVOID pGlyph);
  180. //
  181. // OEMSendFontCmd - UNIDRV only
  182. //
  183. STDMETHOD(SendFontCmd)(THIS_ PDEVOBJ pdevobj,
  184. PUNIFONTOBJ pUFObj,
  185. PFINVOCATION pFInv);
  186. //
  187. // OEMTextOutAsBitmap - UNIDRV only
  188. //
  189. STDMETHOD(TextOutAsBitmap)(THIS_ SURFOBJ *pso,
  190. STROBJ *pstro,
  191. FONTOBJ *pfo,
  192. CLIPOBJ *pco,
  193. RECTL *prclExtra,
  194. RECTL *prclOpaque,
  195. BRUSHOBJ *pboFore,
  196. BRUSHOBJ *pboOpaque,
  197. POINTL *pptlOrg,
  198. MIX mix);
  199. IOemUni() { m_cRef = 1; m_pOEMHelp = NULL; };
  200. ~IOemUni();
  201. protected:
  202. LONG m_cRef;
  203. IPrintOemDriverUni* m_pOEMHelp;
  204. };
  205. #endif