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.

186 lines
5.0 KiB

  1. +++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. +++++ Eng-callbacks for user mode printer drivers +++++
  3. +++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4. *** All FLOATOBJ-related callbacks
  5. These are still available to user mode printer drivers (compile-time
  6. macro USERMODE_DRIVER must be defined). But drivers are strongly
  7. encouraged to use floating-point expressions directly.
  8. *** Callbacks with direct user mode counterparts
  9. These are still available to user mode printer drivers. But drivers
  10. are strongly encouraged to use their user mode counterparts.
  11. EngGetLastError
  12. EngSetLastError
  13. EngWritePrinter
  14. EngGetPrinter
  15. EngGetPrinterDriver
  16. EngGetPrinterData
  17. EngSetPrinterData
  18. EngEnumForms
  19. EngGetForm
  20. EngAllocMem
  21. EngFreeMem
  22. EngAllocUserMem
  23. EngFreeUserMem
  24. EngMulDiv
  25. EngLoadImage
  26. EngFindImageProcAddress
  27. EngUnloadImage
  28. *** Callbacks simulated in the user mode
  29. These are simulated in the client-side GDI for user mode printer drivers.
  30. Driver's are strongly encouraged to use Win32 APIs instead.
  31. EngGetPrinterDataFileName
  32. EngGetDriverName
  33. EngLoadModule
  34. EngFindResource
  35. EngFreeModule
  36. EngCreateSemaphore
  37. EngAcquireSemaphore
  38. EngReleaseSemaphore
  39. EngDeleteSemaphore
  40. EngQueryLocalTime
  41. EngMultiByteToUnicodeN
  42. EngUnicodeToMultiByteN
  43. EngMultiByteToWideChar
  44. EngWideCharToMultiByte
  45. EngGetCurrentCodePage
  46. *** Currently supported callbacks
  47. BRUSHOBJ_pvAllocRbrush
  48. BRUSHOBJ_pvGetRbrush
  49. BRUSHOBJ_ulGetBrushColor
  50. BRUSHOBJ_hGetColorTransform
  51. CLIPOBJ_cEnumStart
  52. CLIPOBJ_bEnum
  53. CLIPOBJ_ppoGetPath
  54. FONTOBJ_cGetAllGlyphHandles
  55. FONTOBJ_vGetInfo
  56. FONTOBJ_cGetGlyphs
  57. FONTOBJ_pxoGetXform
  58. FONTOBJ_pifi
  59. FONTOBJ_pvTrueTypeFontFile
  60. PATHOBJ_vEnumStart
  61. PATHOBJ_bEnum
  62. PATHOBJ_vGetBounds
  63. PATHOBJ_vEnumStartClipLines
  64. PATHOBJ_bEnumClipLines
  65. STROBJ_vEnumStart
  66. STROBJ_bEnum
  67. STROBJ_dwGetCodePage
  68. XFORMOBJ_bApplyXform
  69. XFORMOBJ_iGetFloatObjXform (same as XFORMOBJ_iGetXform)
  70. XLATEOBJ_iXlate
  71. XLATEOBJ_piVector (simulated in client side)
  72. XLATEOBJ_cGetPalette
  73. XLATEOBJ_hGetColorTransform
  74. EngCreateBitmap
  75. EngCreateDeviceBitmap
  76. EngCreateDeviceSurface
  77. EngDeleteSurface
  78. EngLockSurface
  79. EngUnlockSurface
  80. EngEraseSurface
  81. EngAssociateSurface
  82. EngMarkBandingSurface
  83. EngDeletePath
  84. EngCreateClip
  85. EngDeleteClip
  86. EngCreatePalette
  87. EngDeletePalette
  88. EngBitBlt
  89. EngLineTo
  90. EngStretchBlt
  91. EngStretchBltROP
  92. EngAlphaBlend
  93. EngGradientFill
  94. EngTransparentBlt
  95. EngTextOut
  96. EngStrokePath
  97. EngFillPath
  98. EngStrokeAndFillPath
  99. EngCopyBits
  100. EngPlgBlt
  101. EngCheckAbort
  102. *** Notable callbacks we're not going to support
  103. EngMapModule
  104. EngCreatePath
  105. EngPaint (obsolte)
  106. EngGetType1FontList (obsolete)
  107. EngDebugBreak (DbgBreakPoint)
  108. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  109. +++++ Special requirements on user mode printer drivers +++++
  110. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  111. STROBJ.pgp->gdf is NULL during DrvTextOut and STROBJ_bEnum.
  112. Drivers must call FONTOBJ_cGetGlyphs to get glyph bitmap
  113. or glyph outline. (By the way, cGlyph parameter must be 1
  114. for FONTOBJ_cGetGlyphs. This is true for both kernel mode
  115. and user mode driver.)
  116. During a single DDI entrypoint, drivers must balance each
  117. CLIPOBJ_ppoGetPath call with an EngDeletePath call. No nesting
  118. is allowed.
  119. During a single DDI entrypoint, drivers must balance each
  120. EngCreateClip call with EngDeleteClip call. No nesting is
  121. allowed.
  122. ++++++++++++++++++++++++++++++++++++++++++++++
  123. +++++ Building user mode printer drivers +++++
  124. ++++++++++++++++++++++++++++++++++++++++++++++
  125. Make sure compile-time macro USERMODE_DRIVER is defined
  126. before including winddi.h.
  127. Driver graphics DLL should be built as a regular DLL
  128. (in the "sources" file, use TARGETTYPE=DYNLINK instead
  129. of TARGETTYPE=GDIDRIVER). Don't link with win32k.lib.
  130. Link with gdi32.lib, etc. as regular DLLs do.
  131. User mode printer driver graphics DLL should export a
  132. new entrypoint named DrvQueryDriverInfo:
  133. BOOL
  134. DrvQueryDriverInfo(
  135. DWORD dwMode,
  136. PVOID pBuffer,
  137. DWORD cbBuf,
  138. PDWORD pcbNeeded
  139. );
  140. Arguments:
  141. dwMode - Specify the information being queried
  142. pBuffer - Points to output buffer
  143. cbBuf - Size of output buffer in bytes
  144. pcbNeeded - Return the expected size of output buffer
  145. Return Value:
  146. TRUE if successful, FALSE if there is an error
  147. Note:
  148. Only dwMode defined at this point is DRVQUERY_USERMODE=1.
  149. In this case, pBuffer points to a DWORD and cbBuf=sizeof(DWORD).