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.

1106 lines
22 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 1998 - 2003 Microsoft Corporation. All Rights Reserved.
  7. //
  8. // FILE: DDIHook.cpp
  9. //
  10. //
  11. // PURPOSE: DDI Hook routines for User Mode COM Customization DLL.
  12. //
  13. //
  14. // Functions:
  15. //
  16. //
  17. //
  18. //
  19. // PLATFORMS: Windows 2000, Windows XP, Windows Server 2003
  20. //
  21. //
  22. #include "precomp.h"
  23. #include "debug.h"
  24. #include "oemuni.h"
  25. // StrSafe.h needs to be included last
  26. // to disallow bad string functions.
  27. #include <STRSAFE.H>
  28. //
  29. // OEMBitBlt
  30. //
  31. BOOL APIENTRY
  32. OEMBitBlt(
  33. SURFOBJ *psoTrg,
  34. SURFOBJ *psoSrc,
  35. SURFOBJ *psoMask,
  36. CLIPOBJ *pco,
  37. XLATEOBJ *pxlo,
  38. RECTL *prclTrg,
  39. POINTL *pptlSrc,
  40. POINTL *pptlMask,
  41. BRUSHOBJ *pbo,
  42. POINTL *pptlBrush,
  43. ROP4 rop4
  44. )
  45. {
  46. PDEVOBJ pdevobj;
  47. POEMPDEV poempdev;
  48. VERBOSE(DLLTEXT("OEMBitBlt() entry.\r\n"));
  49. pdevobj = (PDEVOBJ)psoTrg->dhpdev;
  50. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  51. //
  52. // turn around to call Unidrv
  53. //
  54. return (((PFN_DrvBitBlt)(poempdev->pfnUnidrv[UD_DrvBitBlt])) (
  55. psoTrg,
  56. psoSrc,
  57. psoMask,
  58. pco,
  59. pxlo,
  60. prclTrg,
  61. pptlSrc,
  62. pptlMask,
  63. pbo,
  64. pptlBrush,
  65. rop4));
  66. }
  67. //
  68. // OEMStretchBlt
  69. //
  70. BOOL APIENTRY
  71. OEMStretchBlt(
  72. SURFOBJ *psoDest,
  73. SURFOBJ *psoSrc,
  74. SURFOBJ *psoMask,
  75. CLIPOBJ *pco,
  76. XLATEOBJ *pxlo,
  77. COLORADJUSTMENT *pca,
  78. POINTL *pptlHTOrg,
  79. RECTL *prclDest,
  80. RECTL *prclSrc,
  81. POINTL *pptlMask,
  82. ULONG iMode
  83. )
  84. {
  85. PDEVOBJ pdevobj;
  86. POEMPDEV poempdev;
  87. VERBOSE(DLLTEXT("OEMStretchBlt() entry.\r\n"));
  88. pdevobj = (PDEVOBJ)psoDest->dhpdev;
  89. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  90. //
  91. // turn around to call Unidrv
  92. //
  93. return (((PFN_DrvStretchBlt)(poempdev->pfnUnidrv[UD_DrvStretchBlt])) (
  94. psoDest,
  95. psoSrc,
  96. psoMask,
  97. pco,
  98. pxlo,
  99. pca,
  100. pptlHTOrg,
  101. prclDest,
  102. prclSrc,
  103. pptlMask,
  104. iMode));
  105. }
  106. //
  107. // OEMCopyBits
  108. //
  109. BOOL APIENTRY
  110. OEMCopyBits(
  111. SURFOBJ *psoDest,
  112. SURFOBJ *psoSrc,
  113. CLIPOBJ *pco,
  114. XLATEOBJ *pxlo,
  115. RECTL *prclDest,
  116. POINTL *pptlSrc
  117. )
  118. {
  119. PDEVOBJ pdevobj;
  120. POEMPDEV poempdev;
  121. VERBOSE(DLLTEXT("OEMCopyBits() entry.\r\n"));
  122. pdevobj = (PDEVOBJ)psoDest->dhpdev;
  123. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  124. //
  125. // turn around to call Unidrv
  126. //
  127. return (((PFN_DrvCopyBits)(poempdev->pfnUnidrv[UD_DrvCopyBits])) (
  128. psoDest,
  129. psoSrc,
  130. pco,
  131. pxlo,
  132. prclDest,
  133. pptlSrc));
  134. }
  135. //
  136. // OEMTextOut
  137. //
  138. BOOL APIENTRY
  139. OEMTextOut(
  140. SURFOBJ *pso,
  141. STROBJ *pstro,
  142. FONTOBJ *pfo,
  143. CLIPOBJ *pco,
  144. RECTL *prclExtra,
  145. RECTL *prclOpaque,
  146. BRUSHOBJ *pboFore,
  147. BRUSHOBJ *pboOpaque,
  148. POINTL *pptlOrg,
  149. MIX mix
  150. )
  151. {
  152. PDEVOBJ pdevobj;
  153. POEMPDEV poempdev;
  154. VERBOSE(DLLTEXT("OEMTextOut() entry.\r\n"));
  155. pdevobj = (PDEVOBJ)pso->dhpdev;
  156. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  157. //
  158. // turn around to call Unidrv
  159. //
  160. return (((PFN_DrvTextOut)(poempdev->pfnUnidrv[UD_DrvTextOut])) (
  161. pso,
  162. pstro,
  163. pfo,
  164. pco,
  165. prclExtra,
  166. prclOpaque,
  167. pboFore,
  168. pboOpaque,
  169. pptlOrg,
  170. mix));
  171. }
  172. //
  173. // OEMStrokePath
  174. //
  175. BOOL APIENTRY
  176. OEMStrokePath(
  177. SURFOBJ *pso,
  178. PATHOBJ *ppo,
  179. CLIPOBJ *pco,
  180. XFORMOBJ *pxo,
  181. BRUSHOBJ *pbo,
  182. POINTL *pptlBrushOrg,
  183. LINEATTRS *plineattrs,
  184. MIX mix
  185. )
  186. {
  187. PDEVOBJ pdevobj;
  188. POEMPDEV poempdev;
  189. VERBOSE(DLLTEXT("OEMStokePath() entry.\r\n"));
  190. pdevobj = (PDEVOBJ)pso->dhpdev;
  191. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  192. //
  193. // turn around to call Unidrv
  194. //
  195. return (((PFN_DrvStrokePath)(poempdev->pfnUnidrv[UD_DrvStrokePath])) (
  196. pso,
  197. ppo,
  198. pco,
  199. pxo,
  200. pbo,
  201. pptlBrushOrg,
  202. plineattrs,
  203. mix));
  204. }
  205. //
  206. // OEMFillPath
  207. //
  208. BOOL APIENTRY
  209. OEMFillPath(
  210. SURFOBJ *pso,
  211. PATHOBJ *ppo,
  212. CLIPOBJ *pco,
  213. BRUSHOBJ *pbo,
  214. POINTL *pptlBrushOrg,
  215. MIX mix,
  216. FLONG flOptions
  217. )
  218. {
  219. PDEVOBJ pdevobj;
  220. POEMPDEV poempdev;
  221. VERBOSE(DLLTEXT("OEMFillPath() entry.\r\n"));
  222. pdevobj = (PDEVOBJ)pso->dhpdev;
  223. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  224. //
  225. // turn around to call Unidrv
  226. //
  227. return (((PFN_DrvFillPath)(poempdev->pfnUnidrv[UD_DrvFillPath])) (
  228. pso,
  229. ppo,
  230. pco,
  231. pbo,
  232. pptlBrushOrg,
  233. mix,
  234. flOptions));
  235. }
  236. //
  237. // OEMStrokeAndFillPath
  238. //
  239. BOOL APIENTRY
  240. OEMStrokeAndFillPath(
  241. SURFOBJ *pso,
  242. PATHOBJ *ppo,
  243. CLIPOBJ *pco,
  244. XFORMOBJ *pxo,
  245. BRUSHOBJ *pboStroke,
  246. LINEATTRS *plineattrs,
  247. BRUSHOBJ *pboFill,
  248. POINTL *pptlBrushOrg,
  249. MIX mixFill,
  250. FLONG flOptions
  251. )
  252. {
  253. PDEVOBJ pdevobj;
  254. POEMPDEV poempdev;
  255. VERBOSE(DLLTEXT("OEMStrokeAndFillPath() entry.\r\n"));
  256. pdevobj = (PDEVOBJ)pso->dhpdev;
  257. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  258. //
  259. // turn around to call Unidrv
  260. //
  261. return (((PFN_DrvStrokeAndFillPath)(poempdev->pfnUnidrv[UD_DrvStrokeAndFillPath])) (
  262. pso,
  263. ppo,
  264. pco,
  265. pxo,
  266. pboStroke,
  267. plineattrs,
  268. pboFill,
  269. pptlBrushOrg,
  270. mixFill,
  271. flOptions));
  272. }
  273. //
  274. // OEMRealizeBrush
  275. //
  276. BOOL APIENTRY
  277. OEMRealizeBrush(
  278. BRUSHOBJ *pbo,
  279. SURFOBJ *psoTarget,
  280. SURFOBJ *psoPattern,
  281. SURFOBJ *psoMask,
  282. XLATEOBJ *pxlo,
  283. ULONG iHatch
  284. )
  285. {
  286. PDEVOBJ pdevobj;
  287. POEMPDEV poempdev;
  288. VERBOSE(DLLTEXT("OEMRealizeBrush() entry.\r\n"));
  289. pdevobj = (PDEVOBJ)psoTarget->dhpdev;
  290. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  291. //
  292. // the OEM DLL should NOT hook out this function unless it wants to draw
  293. // graphics directly to the device surface. In that case, it calls
  294. // EngRealizeBrush which causes GDI to call DrvRealizeBrush.
  295. // Note that it cannot call back into Unidrv since Unidrv doesn't hook it.
  296. //
  297. //
  298. // In this test DLL, the drawing hooks does not call EngRealizeBrush. So this
  299. // this function will never be called. Do nothing.
  300. //
  301. return TRUE;
  302. }
  303. //
  304. // OEMStartPage
  305. //
  306. BOOL APIENTRY
  307. OEMStartPage(
  308. SURFOBJ *pso
  309. )
  310. {
  311. PDEVOBJ pdevobj;
  312. POEMPDEV poempdev;
  313. VERBOSE(DLLTEXT("OEMStartPage() entry.\r\n"));
  314. pdevobj = (PDEVOBJ)pso->dhpdev;
  315. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  316. //
  317. // turn around to call Unidrv
  318. //
  319. return (((PFN_DrvStartPage)(poempdev->pfnUnidrv[UD_DrvStartPage]))(pso));
  320. }
  321. #define OEM_TESTSTRING "The DDICMDCB DLL adds this line of text."
  322. //
  323. // OEMSendPage
  324. //
  325. BOOL APIENTRY
  326. OEMSendPage(
  327. SURFOBJ *pso
  328. )
  329. {
  330. PDEVOBJ pdevobj;
  331. POEMPDEV poempdev;
  332. VERBOSE(DLLTEXT("OEMSendPage() entry.\r\n"));
  333. pdevobj = (PDEVOBJ)pso->dhpdev;
  334. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  335. //
  336. // print a line of text, just for testing
  337. //
  338. if (pso->iType == STYPE_BITMAP)
  339. {
  340. pdevobj->pDrvProcs->DrvXMoveTo(pdevobj, 0, 0);
  341. pdevobj->pDrvProcs->DrvYMoveTo(pdevobj, 0, 0);
  342. pdevobj->pDrvProcs->DrvWriteSpoolBuf(pdevobj, OEM_TESTSTRING,
  343. sizeof(OEM_TESTSTRING));
  344. }
  345. //
  346. // turn around to call Unidrv
  347. //
  348. return (((PFN_DrvSendPage)(poempdev->pfnUnidrv[UD_DrvSendPage]))(pso));
  349. }
  350. //
  351. // OEMEscape
  352. //
  353. ULONG APIENTRY
  354. OEMEscape(
  355. SURFOBJ *pso,
  356. ULONG iEsc,
  357. ULONG cjIn,
  358. PVOID pvIn,
  359. ULONG cjOut,
  360. PVOID pvOut
  361. )
  362. {
  363. PDEVOBJ pdevobj;
  364. POEMPDEV poempdev;
  365. VERBOSE(DLLTEXT("OEMEscape() entry.\r\n"));
  366. pdevobj = (PDEVOBJ)pso->dhpdev;
  367. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  368. //
  369. // turn around to call Unidrv
  370. //
  371. return (((PFN_DrvEscape)(poempdev->pfnUnidrv[UD_DrvEscape])) (
  372. pso,
  373. iEsc,
  374. cjIn,
  375. pvIn,
  376. cjOut,
  377. pvOut));
  378. }
  379. //
  380. // OEMStartDoc
  381. //
  382. BOOL APIENTRY
  383. OEMStartDoc(
  384. SURFOBJ *pso,
  385. PWSTR pwszDocName,
  386. DWORD dwJobId
  387. )
  388. {
  389. PDEVOBJ pdevobj;
  390. POEMPDEV poempdev;
  391. VERBOSE(DLLTEXT("OEMStartDoc() entry.\r\n"));
  392. pdevobj = (PDEVOBJ)pso->dhpdev;
  393. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  394. //
  395. // turn around to call Unidrv
  396. //
  397. return (((PFN_DrvStartDoc)(poempdev->pfnUnidrv[UD_DrvStartDoc])) (
  398. pso,
  399. pwszDocName,
  400. dwJobId));
  401. }
  402. //
  403. // OEMEndDoc
  404. //
  405. BOOL APIENTRY
  406. OEMEndDoc(
  407. SURFOBJ *pso,
  408. FLONG fl
  409. )
  410. {
  411. PDEVOBJ pdevobj;
  412. POEMPDEV poempdev;
  413. VERBOSE(DLLTEXT("OEMEndDoc() entry.\r\n"));
  414. pdevobj = (PDEVOBJ)pso->dhpdev;
  415. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  416. //
  417. // turn around to call Unidrv
  418. //
  419. return (((PFN_DrvEndDoc)(poempdev->pfnUnidrv[UD_DrvEndDoc])) (
  420. pso,
  421. fl));
  422. }
  423. ////////
  424. // NOTE:
  425. // OEM DLL needs to hook out the following six font related DDI calls only
  426. // if it enumerates additional fonts beyond what's in the GPD file.
  427. // And if it does, it needs to take care of its own fonts for all font DDI
  428. // calls and DrvTextOut call.
  429. ///////
  430. //
  431. // OEMQueryFont
  432. //
  433. PIFIMETRICS APIENTRY
  434. OEMQueryFont(
  435. DHPDEV dhpdev,
  436. ULONG_PTR iFile,
  437. ULONG iFace,
  438. ULONG_PTR *pid
  439. )
  440. {
  441. PDEVOBJ pdevobj;
  442. POEMPDEV poempdev;
  443. VERBOSE(DLLTEXT("OEMQueryFont() entry.\r\n"));
  444. pdevobj = (PDEVOBJ)dhpdev;
  445. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  446. //
  447. // turn around to call Unidrv
  448. //
  449. return (((PFN_DrvQueryFont)(poempdev->pfnUnidrv[UD_DrvQueryFont])) (
  450. dhpdev,
  451. iFile,
  452. iFace,
  453. pid));
  454. }
  455. //
  456. // OEMQueryFontTree
  457. //
  458. PVOID APIENTRY
  459. OEMQueryFontTree(
  460. DHPDEV dhpdev,
  461. ULONG_PTR iFile,
  462. ULONG iFace,
  463. ULONG iMode,
  464. ULONG_PTR *pid
  465. )
  466. {
  467. PDEVOBJ pdevobj;
  468. POEMPDEV poempdev;
  469. VERBOSE(DLLTEXT("OEMQueryFontTree() entry.\r\n"));
  470. pdevobj = (PDEVOBJ)dhpdev;
  471. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  472. //
  473. // turn around to call Unidrv
  474. //
  475. return (((PFN_DrvQueryFontTree)(poempdev->pfnUnidrv[UD_DrvQueryFontTree])) (
  476. dhpdev,
  477. iFile,
  478. iFace,
  479. iMode,
  480. pid));
  481. }
  482. //
  483. // OEMQueryFontData
  484. //
  485. LONG APIENTRY
  486. OEMQueryFontData(
  487. DHPDEV dhpdev,
  488. FONTOBJ *pfo,
  489. ULONG iMode,
  490. HGLYPH hg,
  491. GLYPHDATA *pgd,
  492. PVOID pv,
  493. ULONG cjSize
  494. )
  495. {
  496. PDEVOBJ pdevobj;
  497. POEMPDEV poempdev;
  498. VERBOSE(DLLTEXT("OEMQueryFontData() entry.\r\n"));
  499. pdevobj = (PDEVOBJ)dhpdev;
  500. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  501. //
  502. // turn around to call Unidrv if this is not the font that OEM enumerated.
  503. //
  504. return (((PFN_DrvQueryFontData)(poempdev->pfnUnidrv[UD_DrvQueryFontData])) (
  505. dhpdev,
  506. pfo,
  507. iMode,
  508. hg,
  509. pgd,
  510. pv,
  511. cjSize));
  512. }
  513. //
  514. // OEMQueryAdvanceWidths
  515. //
  516. BOOL APIENTRY
  517. OEMQueryAdvanceWidths(
  518. DHPDEV dhpdev,
  519. FONTOBJ *pfo,
  520. ULONG iMode,
  521. HGLYPH *phg,
  522. PVOID pvWidths,
  523. ULONG cGlyphs
  524. )
  525. {
  526. PDEVOBJ pdevobj;
  527. POEMPDEV poempdev;
  528. VERBOSE(DLLTEXT("OEMQueryAdvanceWidths() entry.\r\n"));
  529. pdevobj = (PDEVOBJ)dhpdev;
  530. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  531. //
  532. // turn around to call Unidrv if this is not the font that OEM enumerated.
  533. //
  534. return (((PFN_DrvQueryAdvanceWidths)
  535. (poempdev->pfnUnidrv[UD_DrvQueryAdvanceWidths])) (
  536. dhpdev,
  537. pfo,
  538. iMode,
  539. phg,
  540. pvWidths,
  541. cGlyphs));
  542. }
  543. //
  544. // OEMFontManagement
  545. //
  546. ULONG APIENTRY
  547. OEMFontManagement(
  548. SURFOBJ *pso,
  549. FONTOBJ *pfo,
  550. ULONG iMode,
  551. ULONG cjIn,
  552. PVOID pvIn,
  553. ULONG cjOut,
  554. PVOID pvOut
  555. )
  556. {
  557. PDEVOBJ pdevobj;
  558. POEMPDEV poempdev;
  559. VERBOSE(DLLTEXT("OEMFontManagement() entry.\r\n"));
  560. //
  561. // Note that Unidrv will not call OEM DLL for iMode==QUERYESCSUPPORT.
  562. // So pso is not NULL for sure.
  563. //
  564. pdevobj = (PDEVOBJ)pso->dhpdev;
  565. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  566. //
  567. // turn around to call Unidrv if this is not the font that OEM enumerated.
  568. //
  569. return (((PFN_DrvFontManagement)(poempdev->pfnUnidrv[UD_DrvFontManagement])) (
  570. pso,
  571. pfo,
  572. iMode,
  573. cjIn,
  574. pvIn,
  575. cjOut,
  576. pvOut));
  577. }
  578. //
  579. // OEMGetGlyphMode
  580. //
  581. ULONG APIENTRY
  582. OEMGetGlyphMode(
  583. DHPDEV dhpdev,
  584. FONTOBJ *pfo
  585. )
  586. {
  587. PDEVOBJ pdevobj;
  588. POEMPDEV poempdev;
  589. VERBOSE(DLLTEXT("OEMGetGlyphMode() entry.\r\n"));
  590. pdevobj = (PDEVOBJ)dhpdev;
  591. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  592. //
  593. // turn around to call Unidrv if this is not the font that OEM enumerated.
  594. //
  595. return (((PFN_DrvGetGlyphMode)(poempdev->pfnUnidrv[UD_DrvGetGlyphMode])) (
  596. dhpdev,
  597. pfo));
  598. }
  599. BOOL APIENTRY
  600. OEMNextBand(
  601. SURFOBJ *pso,
  602. POINTL *pptl
  603. )
  604. {
  605. PDEVOBJ pdevobj;
  606. POEMPDEV poempdev;
  607. VERBOSE(DLLTEXT("OEMNextBand() entry.\r\n"));
  608. pdevobj = (PDEVOBJ)pso->dhpdev;
  609. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  610. //
  611. // turn around to call Unidrv
  612. //
  613. return (((PFN_DrvNextBand)(poempdev->pfnUnidrv[UD_DrvNextBand])) (
  614. pso,
  615. pptl));
  616. }
  617. BOOL APIENTRY
  618. OEMStartBanding(
  619. SURFOBJ *pso,
  620. POINTL *pptl
  621. )
  622. {
  623. PDEVOBJ pdevobj;
  624. POEMPDEV poempdev;
  625. VERBOSE(DLLTEXT("OEMStartBanding() entry.\r\n"));
  626. pdevobj = (PDEVOBJ)pso->dhpdev;
  627. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  628. //
  629. // turn around to call Unidrv
  630. //
  631. return (((PFN_DrvStartBanding)(poempdev->pfnUnidrv[UD_DrvStartBanding])) (
  632. pso,
  633. pptl));
  634. }
  635. ULONG APIENTRY
  636. OEMDitherColor(
  637. DHPDEV dhpdev,
  638. ULONG iMode,
  639. ULONG rgbColor,
  640. ULONG *pulDither
  641. )
  642. {
  643. PDEVOBJ pdevobj;
  644. POEMPDEV poempdev;
  645. VERBOSE(DLLTEXT("OEMDitherColor() entry.\r\n"));
  646. pdevobj = (PDEVOBJ)dhpdev;
  647. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  648. //
  649. // turn around to call Unidrv
  650. //
  651. return (((PFN_DrvDitherColor)(poempdev->pfnUnidrv[UD_DrvDitherColor])) (
  652. dhpdev,
  653. iMode,
  654. rgbColor,
  655. pulDither));
  656. }
  657. BOOL APIENTRY
  658. OEMPaint(
  659. SURFOBJ *pso,
  660. CLIPOBJ *pco,
  661. BRUSHOBJ *pbo,
  662. POINTL *pptlBrushOrg,
  663. MIX mix
  664. )
  665. {
  666. PDEVOBJ pdevobj;
  667. POEMPDEV poempdev;
  668. VERBOSE(DLLTEXT("OEMPaint() entry.\r\n"));
  669. pdevobj = (PDEVOBJ)pso->dhpdev;
  670. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  671. //
  672. // turn around to call Unidrv
  673. //
  674. return (((PFN_DrvPaint)(poempdev->pfnUnidrv[UD_DrvPaint])) (
  675. pso,
  676. pco,
  677. pbo,
  678. pptlBrushOrg,
  679. mix));
  680. }
  681. BOOL APIENTRY
  682. OEMLineTo(
  683. SURFOBJ *pso,
  684. CLIPOBJ *pco,
  685. BRUSHOBJ *pbo,
  686. LONG x1,
  687. LONG y1,
  688. LONG x2,
  689. LONG y2,
  690. RECTL *prclBounds,
  691. MIX mix
  692. )
  693. {
  694. PDEVOBJ pdevobj;
  695. POEMPDEV poempdev;
  696. VERBOSE(DLLTEXT("OEMLineTo() entry.\r\n"));
  697. pdevobj = (PDEVOBJ)pso->dhpdev;
  698. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  699. //
  700. // turn around to call Unidrv
  701. //
  702. return (((PFN_DrvLineTo)(poempdev->pfnUnidrv[UD_DrvLineTo])) (
  703. pso,
  704. pco,
  705. pbo,
  706. x1,
  707. y1,
  708. x2,
  709. y2,
  710. prclBounds,
  711. mix));
  712. }
  713. //
  714. // OEMStretchBltROP
  715. //
  716. BOOL APIENTRY
  717. OEMStretchBltROP(
  718. SURFOBJ *psoDest,
  719. SURFOBJ *psoSrc,
  720. SURFOBJ *psoMask,
  721. CLIPOBJ *pco,
  722. XLATEOBJ *pxlo,
  723. COLORADJUSTMENT *pca,
  724. POINTL *pptlHTOrg,
  725. RECTL *prclDest,
  726. RECTL *prclSrc,
  727. POINTL *pptlMask,
  728. ULONG iMode,
  729. BRUSHOBJ *pbo,
  730. ROP4 rop4
  731. )
  732. {
  733. PDEVOBJ pdevobj;
  734. POEMPDEV poempdev;
  735. VERBOSE(DLLTEXT("OEMStretchBltROP() entry.\r\n"));
  736. pdevobj = (PDEVOBJ)psoDest->dhpdev;
  737. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  738. //
  739. // turn around to call Unidrv
  740. //
  741. return (((PFN_DrvStretchBltROP)(poempdev->pfnUnidrv[UD_DrvStretchBltROP])) (
  742. psoDest,
  743. psoSrc,
  744. psoMask,
  745. pco,
  746. pxlo,
  747. pca,
  748. pptlHTOrg,
  749. prclDest,
  750. prclSrc,
  751. pptlMask,
  752. iMode,
  753. pbo,
  754. rop4
  755. ));
  756. }
  757. //
  758. // OEMPlgBlt
  759. //
  760. BOOL APIENTRY
  761. OEMPlgBlt(
  762. SURFOBJ *psoDst,
  763. SURFOBJ *psoSrc,
  764. SURFOBJ *psoMask,
  765. CLIPOBJ *pco,
  766. XLATEOBJ *pxlo,
  767. COLORADJUSTMENT *pca,
  768. POINTL *pptlBrushOrg,
  769. POINTFIX *pptfixDest,
  770. RECTL *prclSrc,
  771. POINTL *pptlMask,
  772. ULONG iMode
  773. )
  774. {
  775. PDEVOBJ pdevobj;
  776. POEMPDEV poempdev;
  777. VERBOSE(DLLTEXT("OEMPlgBlt() entry.\r\n"));
  778. pdevobj = (PDEVOBJ)psoDst->dhpdev;
  779. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  780. //
  781. // turn around to call Unidrv
  782. //
  783. return (((PFN_DrvPlgBlt)(poempdev->pfnUnidrv[UD_DrvPlgBlt])) (
  784. psoDst,
  785. psoSrc,
  786. psoMask,
  787. pco,
  788. pxlo,
  789. pca,
  790. pptlBrushOrg,
  791. pptfixDest,
  792. prclSrc,
  793. pptlMask,
  794. iMode));
  795. }
  796. //
  797. // OEMAlphaBlend
  798. //
  799. BOOL APIENTRY
  800. OEMAlphaBlend(
  801. SURFOBJ *psoDest,
  802. SURFOBJ *psoSrc,
  803. CLIPOBJ *pco,
  804. XLATEOBJ *pxlo,
  805. RECTL *prclDest,
  806. RECTL *prclSrc,
  807. BLENDOBJ *pBlendObj
  808. )
  809. {
  810. PDEVOBJ pdevobj;
  811. POEMPDEV poempdev;
  812. VERBOSE(DLLTEXT("OEMAlphaBlend() entry.\r\n"));
  813. pdevobj = (PDEVOBJ)psoDest->dhpdev;
  814. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  815. //
  816. // turn around to call Unidrv
  817. //
  818. return (((PFN_DrvAlphaBlend)(poempdev->pfnUnidrv[UD_DrvAlphaBlend])) (
  819. psoDest,
  820. psoSrc,
  821. pco,
  822. pxlo,
  823. prclDest,
  824. prclSrc,
  825. pBlendObj
  826. ));
  827. }
  828. //
  829. // OEMGradientFill
  830. //
  831. BOOL APIENTRY
  832. OEMGradientFill(
  833. SURFOBJ *psoDest,
  834. CLIPOBJ *pco,
  835. XLATEOBJ *pxlo,
  836. TRIVERTEX *pVertex,
  837. ULONG nVertex,
  838. PVOID pMesh,
  839. ULONG nMesh,
  840. RECTL *prclExtents,
  841. POINTL *pptlDitherOrg,
  842. ULONG ulMode
  843. )
  844. {
  845. PDEVOBJ pdevobj;
  846. POEMPDEV poempdev;
  847. VERBOSE(DLLTEXT("OEMGradientFill() entry.\r\n"));
  848. pdevobj = (PDEVOBJ)psoDest->dhpdev;
  849. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  850. //
  851. // turn around to call Unidrv
  852. //
  853. return (((PFN_DrvGradientFill)(poempdev->pfnUnidrv[UD_DrvGradientFill])) (
  854. psoDest,
  855. pco,
  856. pxlo,
  857. pVertex,
  858. nVertex,
  859. pMesh,
  860. nMesh,
  861. prclExtents,
  862. pptlDitherOrg,
  863. ulMode
  864. ));
  865. }
  866. BOOL APIENTRY
  867. OEMTransparentBlt(
  868. SURFOBJ *psoDst,
  869. SURFOBJ *psoSrc,
  870. CLIPOBJ *pco,
  871. XLATEOBJ *pxlo,
  872. RECTL *prclDst,
  873. RECTL *prclSrc,
  874. ULONG iTransColor,
  875. ULONG ulReserved
  876. )
  877. {
  878. PDEVOBJ pdevobj;
  879. POEMPDEV poempdev;
  880. VERBOSE(DLLTEXT("OEMTransparentBlt() entry.\r\n"));
  881. pdevobj = (PDEVOBJ)psoDst->dhpdev;
  882. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  883. //
  884. // turn around to call Unidrv
  885. //
  886. return (((PFN_DrvTransparentBlt)(poempdev->pfnUnidrv[UD_DrvTransparentBlt])) (
  887. psoDst,
  888. psoSrc,
  889. pco,
  890. pxlo,
  891. prclDst,
  892. prclSrc,
  893. iTransColor,
  894. ulReserved
  895. ));
  896. }