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.

572 lines
15 KiB

  1. /*++
  2. Copyright (c) 1996 - 1999 Microsoft Corporation
  3. Module Name:
  4. vectorif.h
  5. Abstract:
  6. Interface between Control module and Vector module
  7. Environment:
  8. Windows NT Unidrv driver
  9. Revision History:
  10. 02/29/00 -hsingh-
  11. Created
  12. mm-dd-yy -author-
  13. description
  14. --*/
  15. #ifndef _VECTORIF_H_
  16. #define _VECTORIF_H_
  17. #define HANDLE_VECTORHOOKS(pdev, ep, pfn, resultType, args) \
  18. if ((pdev)->pVectorProcs != NULL && \
  19. ((PVMPROCS)(pdev)->pVectorProcs)->pfn != NULL && \
  20. (pdev)->dwVMCallingFuncID != ep) \
  21. { \
  22. resultType result; \
  23. DWORD dwCallerFuncID;\
  24. dwCallerFuncID = (pdev)->dwVMCallingFuncID;\
  25. (pdev)->dwVMCallingFuncID = ep; \
  26. (pdev)->devobj.pdevOEM = (pdev)->pVectorPDEV; \
  27. result = (((PVMPROCS)(pdev)->pVectorProcs)->pfn) args; \
  28. (pdev)->dwVMCallingFuncID = dwCallerFuncID; \
  29. return result; \
  30. }
  31. #define HANDLE_VECTORPROCS_RET(pdev, pfn, retval, args) \
  32. if ((pdev)->pVectorProcs != NULL && \
  33. ((PVMPROCS)(pdev)->pVectorProcs)->pfn != NULL ) \
  34. { \
  35. (pdev)->devobj.pdevOEM = (pdev)->pVectorPDEV; \
  36. retval = (((PVMPROCS)(pdev)->pVectorProcs)->pfn) args;\
  37. }
  38. #define HANDLE_VECTORPROCS(pdev, pfn, args) \
  39. if ((pdev)->pVectorProcs != NULL && \
  40. ((PVMPROCS)(pdev)->pVectorProcs)->pfn != NULL ) \
  41. { \
  42. (pdev)->devobj.pdevOEM = (pdev)->pVectorPDEV; \
  43. (((PVMPROCS)(pdev)->pVectorProcs)->pfn) args;\
  44. }
  45. BOOL
  46. VMInit (
  47. PDEV *pPDev,
  48. DEVINFO *pDevInfo,
  49. GDIINFO *pGDIInfo
  50. );
  51. //
  52. // This structure provides a table of pointers to each function exported
  53. // by the plugin.
  54. // The first part consists of functions defined in oemkm.h.
  55. // under the heading . "Unidrv specific COM wrappers"
  56. // The second part consists of DDI's
  57. //
  58. //
  59. // The order of functions listed is same as the order in
  60. // static DRVFN UniDriverFuncs[] in unidrv2\control\enable.c
  61. //
  62. typedef struct _VMPROCS {
  63. //
  64. // Part. 1
  65. // Functions listed in oemkm.h
  66. //
  67. BOOL
  68. (*VMDriverDMS)(
  69. PVOID pdevobj,
  70. PVOID pvBuffer,
  71. DWORD cbSize,
  72. PDWORD pcbNeeded
  73. );
  74. INT
  75. (*VMCommandCallback)(
  76. PDEVOBJ pdevobj,
  77. DWORD dwCmdCbID,
  78. DWORD dwCount,
  79. PDWORD pdwParams
  80. );
  81. LONG
  82. (*VMImageProcessing)(
  83. PDEVOBJ pdevobj,
  84. PBYTE pSrcBitmap,
  85. PBITMAPINFOHEADER pBitmapInfoHeader,
  86. PBYTE pColorTable,
  87. DWORD dwCallbackID,
  88. PIPPARAMS pIPParams,
  89. OUT PBYTE *ppbResult
  90. );
  91. LONG
  92. (*VMFilterGraphics)(
  93. PDEVOBJ pdevobj,
  94. PBYTE pBuf,
  95. DWORD dwLen
  96. );
  97. LONG
  98. (*VMCompression)(
  99. PDEVOBJ pdevobj,
  100. PBYTE pInBuf,
  101. PBYTE pOutBuf,
  102. DWORD dwInLen,
  103. DWORD dwOutLen,
  104. INT *piResult
  105. );
  106. LONG
  107. (*VMHalftonePattern)(
  108. PDEVOBJ pdevobj,
  109. PBYTE pHTPattern,
  110. DWORD dwHTPatternX,
  111. DWORD dwHTPatternY,
  112. DWORD dwHTNumPatterns,
  113. DWORD dwCallbackID,
  114. PBYTE pResource,
  115. DWORD dwResourceSize
  116. );
  117. LONG
  118. (*VMMemoryUsage)(
  119. PDEVOBJ pdevobj,
  120. POEMMEMORYUSAGE pMemoryUsage
  121. );
  122. LONG
  123. (*VMTTYGetInfo)(
  124. PDEVOBJ pdevobj,
  125. DWORD dwInfoIndex,
  126. PVOID pOutputBuf,
  127. DWORD dwSize,
  128. DWORD *pcbcNeeded
  129. );
  130. LONG
  131. (*VMDownloadFontHeader)(
  132. PDEVOBJ pdevobj,
  133. PUNIFONTOBJ pUFObj,
  134. OUT DWORD *pdwResult
  135. );
  136. LONG
  137. (*VMDownloadCharGlyph)(
  138. PDEVOBJ pdevobj,
  139. PUNIFONTOBJ pUFObj,
  140. HGLYPH hGlyph,
  141. PDWORD pdwWidth,
  142. OUT DWORD *pdwResult
  143. );
  144. LONG
  145. (*VMTTDownloadMethod)(
  146. PDEVOBJ pdevobj,
  147. PUNIFONTOBJ pUFObj,
  148. OUT DWORD *pdwResult
  149. );
  150. LONG
  151. (*VMOutputCharStr)(
  152. PDEVOBJ pdevobj,
  153. PUNIFONTOBJ pUFObj,
  154. DWORD dwType,
  155. DWORD dwCount,
  156. PVOID pGlyph
  157. );
  158. LONG
  159. (*VMSendFontCmd)(
  160. PDEVOBJ pdevobj,
  161. PUNIFONTOBJ pUFObj,
  162. PFINVOCATION pFInv
  163. );
  164. BOOL
  165. (*VMTextOutAsBitmap)(
  166. SURFOBJ *pso,
  167. STROBJ *pstro,
  168. FONTOBJ *pfo,
  169. CLIPOBJ *pco,
  170. RECTL *prclExtra,
  171. RECTL *prclOpaque,
  172. BRUSHOBJ *pboFore,
  173. BRUSHOBJ *pboOpaque,
  174. POINTL *pptlOrg,
  175. MIX mix
  176. );
  177. //
  178. // Part 2.
  179. // Functions listed in enable.c
  180. // The order of functions listed is same as the order in
  181. // static DRVFN UniDriverFuncs[] in unidrv2\control\enable.c
  182. //
  183. PDEVOEM
  184. (*VMEnablePDEV)(
  185. PDEVOBJ pdevobj,
  186. PWSTR pPrinterName,
  187. ULONG cPatterns,
  188. HSURF *phsurfPatterns,
  189. ULONG cjGdiInfo,
  190. GDIINFO *pGdiInfo,
  191. ULONG cjDevInfo,
  192. DEVINFO *pDevInfo,
  193. DRVENABLEDATA *pded // Unidrv's hook table
  194. );
  195. BOOL
  196. (*VMResetPDEV)(
  197. PDEVOBJ pPDevOld,
  198. PDEVOBJ pPDevNew
  199. );
  200. VOID
  201. (*VMCompletePDEV)(
  202. DHPDEV dhpdev,
  203. HDEV hdev
  204. );
  205. VOID
  206. (*VMDisablePDEV)(
  207. PDEVOBJ pPDev
  208. );
  209. BOOL
  210. (*VMEnableSurface)(
  211. PDEVOBJ pPDev
  212. );
  213. VOID
  214. (*VMDisableSurface)(
  215. PDEVOBJ pPDev
  216. );
  217. VOID
  218. (*VMDisableDriver)(
  219. VOID
  220. );
  221. BOOL
  222. (*VMStartDoc)(
  223. SURFOBJ *pso,
  224. PWSTR pDocName,
  225. DWORD jobId
  226. );
  227. BOOL
  228. (*VMStartPage) (
  229. SURFOBJ *pso
  230. );
  231. BOOL
  232. (*VMSendPage)(
  233. SURFOBJ *pso
  234. );
  235. BOOL
  236. (*VMEndDoc)(
  237. SURFOBJ *pso,
  238. FLONG flags
  239. );
  240. BOOL
  241. (*VMStartBanding)(
  242. SURFOBJ *pso,
  243. POINTL *pptl
  244. );
  245. BOOL
  246. (*VMNextBand)(
  247. SURFOBJ *pso,
  248. POINTL *pptl
  249. );
  250. BOOL
  251. (*VMPaint)(
  252. SURFOBJ *pso,
  253. CLIPOBJ *pco,
  254. BRUSHOBJ *pbo,
  255. POINTL *pptlBrushOrg,
  256. MIX mix
  257. );
  258. BOOL
  259. (*VMBitBlt)(
  260. SURFOBJ *psoTrg,
  261. SURFOBJ *psoSrc,
  262. SURFOBJ *psoMask,
  263. CLIPOBJ *pco,
  264. XLATEOBJ *pxlo,
  265. RECTL *prclTrg,
  266. POINTL *pptlSrc,
  267. POINTL *pptlMask,
  268. BRUSHOBJ *pbo,
  269. POINTL *pptlBrush,
  270. ROP4 rop4
  271. );
  272. BOOL
  273. (*VMStretchBlt)(
  274. SURFOBJ *psoDst,
  275. SURFOBJ *psoSrc,
  276. SURFOBJ *psoMask,
  277. CLIPOBJ *pco,
  278. XLATEOBJ *pxlo,
  279. COLORADJUSTMENT *pca,
  280. POINTL *pptlHTOrg,
  281. RECTL *prclDst,
  282. RECTL *prclSrc,
  283. POINTL *pptlMask,
  284. ULONG iMode
  285. );
  286. #ifndef WINNT_40
  287. BOOL
  288. (*VMStretchBltROP)(
  289. SURFOBJ *psoDst,
  290. SURFOBJ *psoSrc,
  291. SURFOBJ *psoMask,
  292. CLIPOBJ *pco,
  293. XLATEOBJ *pxlo,
  294. COLORADJUSTMENT *pca,
  295. POINTL *pptlHTOrg,
  296. RECTL *prclDst,
  297. RECTL *prclSrc,
  298. POINTL *pptlMask,
  299. ULONG iMode,
  300. BRUSHOBJ *pbo,
  301. DWORD rop4
  302. );
  303. BOOL
  304. (*VMPlgBlt)(
  305. SURFOBJ *psoDst,
  306. SURFOBJ *psoSrc,
  307. SURFOBJ *psoMask,
  308. CLIPOBJ *pco,
  309. XLATEOBJ *pxlo,
  310. COLORADJUSTMENT *pca,
  311. POINTL *pptlBrushOrg,
  312. POINTFIX *pptfixDest,
  313. RECTL *prclSrc,
  314. POINTL *pptlMask,
  315. ULONG iMode
  316. );
  317. #endif //ifndef WINNT_40
  318. BOOL
  319. (*VMCopyBits)(
  320. SURFOBJ *psoDst,
  321. SURFOBJ *psoSrc,
  322. CLIPOBJ *pco,
  323. XLATEOBJ *pxlo,
  324. RECTL *prclDst,
  325. POINTL *pptlSrc
  326. );
  327. ULONG
  328. (*VMDitherColor)(
  329. DHPDEV dhpdev,
  330. ULONG iMode,
  331. ULONG rgbColor,
  332. ULONG *pulDither
  333. );
  334. BOOL
  335. (*VMRealizeBrush)(
  336. BRUSHOBJ *pbo,
  337. SURFOBJ *psoTarget,
  338. SURFOBJ *psoPattern,
  339. SURFOBJ *psoMask,
  340. XLATEOBJ *pxlo,
  341. ULONG iHatch
  342. );
  343. BOOL
  344. (*VMLineTo)(
  345. SURFOBJ *pso,
  346. CLIPOBJ *pco,
  347. BRUSHOBJ *pbo,
  348. LONG x1,
  349. LONG y1,
  350. LONG x2,
  351. LONG y2,
  352. RECTL *prclBounds,
  353. MIX mix
  354. );
  355. BOOL
  356. (*VMStrokePath)(
  357. SURFOBJ *pso,
  358. PATHOBJ *ppo,
  359. CLIPOBJ *pco,
  360. XFORMOBJ *pxo,
  361. BRUSHOBJ *pbo,
  362. POINTL *pptlBrushOrg,
  363. LINEATTRS *plineattrs,
  364. MIX mix
  365. );
  366. BOOL
  367. (*VMFillPath)(
  368. SURFOBJ *pso,
  369. PATHOBJ *ppo,
  370. CLIPOBJ *pco,
  371. BRUSHOBJ *pbo,
  372. POINTL *pptlBrushOrg,
  373. MIX mix,
  374. FLONG flOptions
  375. );
  376. BOOL
  377. (*VMStrokeAndFillPath)(
  378. SURFOBJ *pso,
  379. PATHOBJ *ppo,
  380. CLIPOBJ *pco,
  381. XFORMOBJ *pxo,
  382. BRUSHOBJ *pboStroke,
  383. LINEATTRS *plineattrs,
  384. BRUSHOBJ *pboFill,
  385. POINTL *pptlBrushOrg,
  386. MIX mixFill,
  387. FLONG flOptions
  388. );
  389. #ifndef WINNT_40
  390. BOOL
  391. (*VMGradientFill)(
  392. SURFOBJ *psoDest,
  393. CLIPOBJ *pco,
  394. XLATEOBJ *pxlo,
  395. TRIVERTEX *pVertex,
  396. ULONG nVertex,
  397. PVOID pMesh,
  398. ULONG nMesh,
  399. RECTL *prclExtents,
  400. POINTL *pptlDitherOrg,
  401. ULONG ulMode
  402. );
  403. BOOL
  404. (*VMAlphaBlend)(
  405. SURFOBJ *psoDest,
  406. SURFOBJ *psoSrc,
  407. CLIPOBJ *pco,
  408. XLATEOBJ *pxlo,
  409. RECTL *prclDest,
  410. RECTL *prclSrc,
  411. BLENDOBJ *pBlendObj
  412. );
  413. BOOL
  414. (*VMTransparentBlt)(
  415. SURFOBJ *psoDst,
  416. SURFOBJ *psoSrc,
  417. CLIPOBJ *pco,
  418. XLATEOBJ *pxlo,
  419. RECTL *prclDst,
  420. RECTL *prclSrc,
  421. ULONG iTransColor,
  422. ULONG ulReserved
  423. );
  424. #endif // ifndef WINNT_40
  425. BOOL
  426. (*VMTextOut)(
  427. SURFOBJ *pso,
  428. STROBJ *pstro,
  429. FONTOBJ *pfo,
  430. CLIPOBJ *pco,
  431. RECTL *prclExtra,
  432. RECTL *prclOpaque,
  433. BRUSHOBJ *pboFore,
  434. BRUSHOBJ *pboOpaque,
  435. POINTL *pptlOrg,
  436. MIX mix
  437. );
  438. ULONG
  439. (*VMEscape)(
  440. SURFOBJ *pso,
  441. ULONG iEsc,
  442. ULONG cjIn,
  443. PVOID pvIn,
  444. ULONG cjOut,
  445. PVOID pvOut
  446. );
  447. PIFIMETRICS
  448. (*VMQueryFont)(
  449. DHPDEV dhpdev,
  450. ULONG_PTR iFile,
  451. ULONG iFace,
  452. ULONG_PTR *pid
  453. );
  454. PVOID
  455. (*VMQueryFontTree)(
  456. DHPDEV dhpdev,
  457. ULONG_PTR iFile,
  458. ULONG iFace,
  459. ULONG iMode,
  460. ULONG_PTR *pid
  461. );
  462. LONG
  463. (*VMQueryFontData)(
  464. DHPDEV dhpdev,
  465. FONTOBJ *pfo,
  466. ULONG iMode,
  467. HGLYPH hg,
  468. GLYPHDATA *pgd,
  469. PVOID pv,
  470. ULONG cjSize
  471. );
  472. ULONG
  473. (*VMGetGlyphMode)(
  474. DHPDEV dhpdev,
  475. FONTOBJ *pfo
  476. );
  477. ULONG
  478. (*VMFontManagement)(
  479. SURFOBJ *pso,
  480. FONTOBJ *pfo,
  481. ULONG iMode,
  482. ULONG cjIn,
  483. PVOID pvIn,
  484. ULONG cjOut,
  485. PVOID pvOut
  486. );
  487. BOOL
  488. (*VMQueryAdvanceWidths)(
  489. DHPDEV dhpdev,
  490. FONTOBJ *pfo,
  491. ULONG iMode,
  492. HGLYPH *phg,
  493. PVOID *pvWidths,
  494. ULONG cGlyphs
  495. );
  496. }VMPROCS, * PVMPROCS;
  497. #endif // !_VECTORIF_H_