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.

270 lines
5.9 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. spvideop.h
  5. Abstract:
  6. Private header file for text setup display support.
  7. Author:
  8. Ted Miller (tedm) 29-July-1993
  9. Revision History:
  10. --*/
  11. #ifndef _SPVIDP_DEFN_
  12. #define _SPVIDP_DEFN_
  13. //
  14. // Globals that contain information about the font currently in use.
  15. //
  16. extern POEM_FONT_FILE_HEADER FontHeader;
  17. extern ULONG FontBytesPerRow;
  18. extern ULONG FontCharacterHeight;
  19. extern ULONG FontCharacterWidth;
  20. //
  21. // These values are passed to us by setupldr and represent monitor config
  22. // data from the monitor peripheral for the display we are supposed to use
  23. // during setup. They are used only for non-vga displays.
  24. //
  25. extern PMONITOR_CONFIGURATION_DATA MonitorConfigData;
  26. extern PCHAR MonitorFirmwareIdString;
  27. //
  28. // Routine to map or unmap video memory. Fills in or uses
  29. // the VideoMemoryInfo global.
  30. //
  31. VOID
  32. pSpvidMapVideoMemory(
  33. IN BOOLEAN Map
  34. );
  35. typedef
  36. VOID
  37. (*SPVID_DISPLAY_STRING_ROUTINE) (
  38. IN PSTR String,
  39. IN UCHAR Attribute,
  40. IN ULONG X, // 0-based coordinates (character units)
  41. IN ULONG Y
  42. );
  43. typedef
  44. VOID
  45. (*SPVID_CLEAR_REGION_ROUTINE) (
  46. IN ULONG X,
  47. IN ULONG Y,
  48. IN ULONG W,
  49. IN ULONG H,
  50. IN UCHAR Attribute
  51. );
  52. typedef
  53. VOID
  54. (*SPVID_SPECIFIC_INIT_ROUTINE) (
  55. IN PVIDEO_MODE_INFORMATION VideoModes,
  56. IN ULONG NumberOfModes,
  57. IN ULONG ModeSize
  58. );
  59. typedef
  60. VOID
  61. (*SPVID_SPECIFIC_REINIT_ROUTINE) (
  62. VOID
  63. );
  64. typedef
  65. VOID
  66. (*SPVID_SPECIFIC_TERMINATE_ROUTINE) (
  67. VOID
  68. );
  69. typedef
  70. BOOLEAN
  71. (*SPVID_SPECIFIC_PALETTE_ROUTINE) (
  72. VOID
  73. );
  74. typedef
  75. BOOLEAN
  76. (*SPVID_SPECIFIC_SCROLL_UP_ROUTINE) (
  77. IN ULONG TopLine,
  78. IN ULONG BottomLine,
  79. IN ULONG LineCount,
  80. IN UCHAR FillAttribute
  81. );
  82. typedef struct _VIDEO_FUNCTION_VECTOR {
  83. SPVID_DISPLAY_STRING_ROUTINE DisplayStringRoutine;
  84. SPVID_CLEAR_REGION_ROUTINE ClearRegionRoutine;
  85. SPVID_SPECIFIC_INIT_ROUTINE SpecificInitRoutine;
  86. SPVID_SPECIFIC_REINIT_ROUTINE SpecificReInitRoutine;
  87. SPVID_SPECIFIC_TERMINATE_ROUTINE SpecificTerminateRoutine;
  88. SPVID_SPECIFIC_PALETTE_ROUTINE SpecificInitPaletteRoutine;
  89. SPVID_SPECIFIC_SCROLL_UP_ROUTINE SpecificScrollUpRoutine;
  90. } VIDEO_FUNCTION_VECTOR, *PVIDEO_FUNCTION_VECTOR;
  91. extern PVIDEO_FUNCTION_VECTOR VideoFunctionVector;
  92. //
  93. // Shorthand for accessing routines in the video function vector.
  94. //
  95. #define spvidSpecificInitialize(v,n,m) \
  96. \
  97. VideoFunctionVector->SpecificInitRoutine((v),(n),(m))
  98. #define spvidSpecificReInitialize() \
  99. \
  100. VideoFunctionVector->SpecificReInitRoutine()
  101. #define spvidSpecificTerminate() \
  102. \
  103. VideoFunctionVector->SpecificTerminateRoutine()
  104. #define spvidSpecificClearRegion(x,y,w,h,a) \
  105. \
  106. VideoFunctionVector->ClearRegionRoutine((x),(y),(w),(h),(a))
  107. #define spvidSpecificDisplayString(s,a,x,y) \
  108. \
  109. VideoFunctionVector->DisplayStringRoutine((s),(a),(x),(y))
  110. #define spvidSpecificInitPalette() \
  111. \
  112. VideoFunctionVector->SpecificInitPaletteRoutine()
  113. #define spvidSpecificScrollUp(t,b,c,a) \
  114. \
  115. VideoFunctionVector->SpecificScrollUpRoutine((t),(b),(c),(a))
  116. //
  117. // Frame buffer routines (spvidfb.c).
  118. //
  119. VOID
  120. FrameBufferDisplayString(
  121. IN PSTR String,
  122. IN UCHAR Attribute,
  123. IN ULONG X, // 0-based coordinates (character units)
  124. IN ULONG Y
  125. );
  126. VOID
  127. FrameBufferClearRegion(
  128. IN ULONG X,
  129. IN ULONG Y,
  130. IN ULONG W,
  131. IN ULONG H,
  132. IN UCHAR Attribute
  133. );
  134. VOID
  135. FrameBufferSpecificInit(
  136. IN PVIDEO_MODE_INFORMATION VideoModes,
  137. IN ULONG NumberOfModes,
  138. IN ULONG ModeSize
  139. );
  140. VOID
  141. FrameBufferSpecificReInit(
  142. VOID
  143. );
  144. VOID
  145. FrameBufferSpecificTerminate(
  146. VOID
  147. );
  148. BOOLEAN
  149. FrameBufferSpecificInitPalette(
  150. VOID
  151. );
  152. BOOLEAN
  153. FrameBufferSpecificScrollUp(
  154. IN ULONG TopLine,
  155. IN ULONG BottomLine,
  156. IN ULONG LineCount,
  157. IN UCHAR FillAttribute
  158. );
  159. extern VIDEO_FUNCTION_VECTOR FrameBufferVideoVector;
  160. PVIDEO_MODE_INFORMATION
  161. pFrameBufferDetermineModeToUse(
  162. IN PVIDEO_MODE_INFORMATION VideoModes,
  163. IN ULONG NumberOfModes,
  164. IN ULONG ModeSize
  165. );
  166. //
  167. // Textmode display routines (spvidvga.c).
  168. //
  169. VOID
  170. VgaDisplayString(
  171. IN PSTR String,
  172. IN UCHAR Attribute,
  173. IN ULONG X, // 0-based coordinates (character units)
  174. IN ULONG Y
  175. );
  176. VOID
  177. VgaClearRegion(
  178. IN ULONG X,
  179. IN ULONG Y,
  180. IN ULONG W,
  181. IN ULONG H,
  182. IN UCHAR Attribute
  183. );
  184. VOID
  185. VgaSpecificInit(
  186. IN PVIDEO_MODE_INFORMATION VideoModes,
  187. IN ULONG NumberOfModes,
  188. IN ULONG ModeSize
  189. );
  190. VOID
  191. VgaSpecificReInit(
  192. VOID
  193. );
  194. VOID
  195. VgaSpecificTerminate(
  196. VOID
  197. );
  198. BOOLEAN
  199. VgaSpecificInitPalette(
  200. VOID
  201. );
  202. BOOLEAN
  203. VgaSpecificScrollUp(
  204. IN ULONG TopLine,
  205. IN ULONG BottomLine,
  206. IN ULONG LineCount,
  207. IN UCHAR FillAttribute
  208. );
  209. extern VIDEO_FUNCTION_VECTOR VgaVideoVector;
  210. #endif // ndef _SPVIDP_DEFN_
  211.