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.

139 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. textout.c
  5. Abstract:
  6. Implementation of text output related DDI entry points:
  7. DrvTextOut
  8. Environment:
  9. Windows NT Unidrv driver
  10. Revision History:
  11. 10/14/96 -amandan-
  12. Initial framework.
  13. 03/31/97 -zhanw-
  14. Added OEM customization support
  15. --*/
  16. #include "unidrv.h"
  17. BOOL
  18. DrvTextOut(
  19. SURFOBJ *pso,
  20. STROBJ *pstro,
  21. FONTOBJ *pfo,
  22. CLIPOBJ *pco,
  23. RECTL *prclExtra,
  24. RECTL *prclOpaque,
  25. BRUSHOBJ *pboFore,
  26. BRUSHOBJ *pboOpaque,
  27. POINTL *pptlOrg,
  28. MIX mix
  29. )
  30. /*++
  31. Routine Description:
  32. Implementation of DDI entry point DrvTextOut.
  33. Please refer to DDK documentation for more details.
  34. Arguments:
  35. pso - Defines the surface on which to be written.
  36. pstro - Defines the glyphs to be rendered and their positions
  37. pfo - Specifies the font to be used
  38. pco - Defines the clipping path
  39. prclExtra - A NULL-terminated array of rectangles to be filled
  40. prclOpaque - Specifies an opaque rectangle
  41. pboFore - Defines the foreground brush
  42. pboOpaque - Defines the opaque brush
  43. pptlOrg - Pointer to POINT struct , defining th origin
  44. mix - Specifies the foreground and background ROPs for pboFore
  45. Return Value:
  46. TRUE if successful, FALSE if there is an error
  47. --*/
  48. {
  49. PDEV * pPDev;
  50. PFMPROCS pFontProcs;
  51. VERBOSE(("Entering DrvTextOut...\n"));
  52. ASSERT(pso && pstro && pfo);
  53. pPDev = (PDEV *)pso->dhpdev;
  54. ASSERT_VALID_PDEV(pPDev);
  55. //
  56. // use driver managed surface
  57. //
  58. if (pPDev->pso)
  59. pso = pPDev->pso;
  60. //
  61. // QFE Fix for TTY driver.
  62. // Set flag if DrvTextOut DDI is called.
  63. //
  64. if (pPDev->bTTY)
  65. {
  66. pPDev->fMode2 |= PF2_DRVTEXTOUT_CALLED_FOR_TTY;
  67. }
  68. //
  69. // Handle OEM hooks
  70. //
  71. HANDLE_OEMHOOKS(pPDev,
  72. EP_OEMTextOut,
  73. PFN_OEMTextOut,
  74. BOOL,
  75. (pso,
  76. pstro,
  77. pfo,
  78. pco,
  79. prclExtra,
  80. prclOpaque,
  81. pboFore,
  82. pboOpaque,
  83. pptlOrg,
  84. mix));
  85. HANDLE_VECTORHOOKS(pPDev,
  86. EP_OEMTextOut,
  87. VMTextOut,
  88. BOOL,
  89. (pso,
  90. pstro,
  91. pfo,
  92. pco,
  93. prclExtra,
  94. prclOpaque,
  95. pboFore,
  96. pboOpaque,
  97. pptlOrg,
  98. mix));
  99. pFontProcs = (PFMPROCS)pPDev->pFontProcs;
  100. if ( pFontProcs->FMTextOut == NULL)
  101. {
  102. CheckBitmapSurface(pso,&pstro->rclBkGround);
  103. return FALSE;
  104. }
  105. else
  106. return (pFontProcs->FMTextOut(pso, pstro, pfo, pco, prclExtra,
  107. prclOpaque, pboFore, pboOpaque,
  108. pptlOrg, mix) );
  109. }