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.

217 lines
4.3 KiB

  1. /*++
  2. Copyright (c) 1996 - 1999 Microsoft Corporation
  3. Module Name:
  4. common.h
  5. Abstract:
  6. This file contain information and function prototypes for helper
  7. library functions provided by the Control module
  8. Environment:
  9. Windows NT Unidrv driver
  10. Revision History:
  11. 10/12/96 -amandan-
  12. Created
  13. dd-mm-yy -author-
  14. description
  15. --*/
  16. #ifndef _COMMON_H_
  17. #define _COMMON_H_
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #include "ddint5.h"
  22. INT
  23. WriteSpoolBuf(
  24. PDEV *pPDev,
  25. BYTE *pbBuf,
  26. INT iCount
  27. );
  28. VOID WriteAbortBuf(
  29. PDEV *pPDev,
  30. BYTE *pbBuf,
  31. INT iCount,
  32. DWORD dwWait
  33. );
  34. BOOL
  35. FlushSpoolBuf(
  36. PDEV *pPDev
  37. );
  38. INT
  39. WriteChannel(
  40. PDEV *pPDev,
  41. COMMAND *pCmd
  42. );
  43. INT
  44. WriteChannelEx(
  45. PDEV *pPDev,
  46. COMMAND *pCmd,
  47. INT iRequestedValue,
  48. INT iDeviceScaleFac
  49. );
  50. VOID
  51. SetRop3(
  52. PDEV *pPDev,
  53. DWORD dwRop3
  54. );
  55. INT
  56. XMoveTo(
  57. PDEV *pPDev,
  58. INT iXIn,
  59. INT fFlags
  60. );
  61. INT
  62. YMoveTo(
  63. PDEV *pPDev,
  64. INT iYIn,
  65. INT fFlags
  66. );
  67. BOOL
  68. BIntersectRect(
  69. OUT PRECTL prcDest,
  70. IN PRECTL prcRect1,
  71. IN PRECTL prcRect2
  72. );
  73. BOOL
  74. bIsRegionWhite (
  75. SURFOBJ *,
  76. RECTL *
  77. );
  78. VOID
  79. CheckBitmapSurface(
  80. SURFOBJ *,
  81. RECTL *
  82. );
  83. ULONG
  84. DrawPatternRect(
  85. PDEV *,
  86. PDRAWPATRECT
  87. );
  88. /*
  89. * Flags to use when calling the [XY]Moveto functions.
  90. *
  91. * MV_UPDATE is used when it is desired to change our record of where
  92. * the cursor is now located. Typically this will happen after some
  93. * operation such as printing a glyph, or sending graphics.
  94. *
  95. * MV_RELATIVE means add the value passed to the current position. This
  96. * would be used after printing a glyph, and passing in the glyph
  97. * width as parameter, rather than calculating the new position.
  98. *
  99. * MV_GRAPHICS indicates that the value is in GRAPHICS RESOLUTION units.
  100. * Otherwise MASTER UNITS are assumed. If set, the value will be
  101. * converted to master units before processing. Typically used to
  102. * pass information when sending scan lines of graphics data.
  103. *
  104. * MV_PHYSICAL is used to indicate that the value passed in is relative
  105. * to the printers print origin, and not the printable area, which
  106. * is the case otherwise. Typically this flag would be used to
  107. * allow setting the position to the printer's X = 0 position after
  108. * sending a <CR>.
  109. *
  110. * MV_FINE requests sending graphics data (nulls) to position the cursor
  111. * to finer position than can otherwise be achieved. Typically
  112. * only available in the direction of movement of the head on a
  113. * dot matrix printer. This command may be ignored. It must not
  114. * be issued for a LaserJet, since it will cause all sorts of other
  115. * problems.
  116. */
  117. //
  118. // 4/7/97 Zhanw
  119. // the first 4 constants are defined in "printoem.h" since we now export
  120. // XMoveTo and YMoveTo to OEM DLL's
  121. //
  122. //#define MV_UPDATE 0x0001
  123. //#define MV_RELATIVE 0x0002
  124. //#define MV_GRAPHICS 0x0004
  125. //#define MV_PHYSICAL 0x0008
  126. //
  127. // Internal use only!!! update warning in oak\inc\printoem.h
  128. // whenever new flags are added.
  129. //
  130. #define MV_FORCE_CR 0x4000
  131. #define MV_FINE 0x8000
  132. BOOL
  133. BSelectProgrammableBrushColor(
  134. PDEV *pPDev,
  135. ULONG Color
  136. );
  137. VOID
  138. VResetProgrammableBrushColor(
  139. PDEV *pPDev
  140. );
  141. DWORD
  142. BestMatchDeviceColor(
  143. PDEV *pPDev,
  144. DWORD Color
  145. );
  146. BYTE
  147. BGetMask(
  148. PDEV * pPDev,
  149. RECTL * pRect
  150. );
  151. BOOL
  152. BGetStandardVariable(
  153. PDEV *pPDev,
  154. DWORD dwIndex,
  155. PVOID pBuffer,
  156. DWORD cbSize,
  157. PDWORD pcbNeeded
  158. );
  159. DWORD
  160. ConvertRGBToGrey(
  161. DWORD Color
  162. );
  163. BOOL
  164. BGetGPDData(
  165. PDEV *pPDev,
  166. DWORD dwType, // Type of the data
  167. PVOID pInputData, // reserved. Should be set to 0
  168. PVOID pBuffer, // Caller allocated Buffer to be copied
  169. DWORD cbSize, // Size of the buffer
  170. PDWORD pcbNeeded // New Size of the buffer if needed.
  171. ) ;
  172. #ifdef __cplusplus
  173. }
  174. #endif
  175. #endif