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.

283 lines
7.1 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. spvideo.h
  5. Abstract:
  6. Public header file for text setup display utilitiy functions.
  7. Author:
  8. Ted Miller (tedm) 29-July-1993
  9. Revision History:
  10. --*/
  11. #ifndef _SPDSPUTL_DEFN_
  12. #define _SPDSPUTL_DEFN_
  13. #define HEADER_HEIGHT 3
  14. #define STATUS_HEIGHT 1
  15. #define CLIENT_HEIGHT (VideoVars.ScreenHeight - (HEADER_HEIGHT+STATUS_HEIGHT))
  16. #define CLIENT_TOP HEADER_HEIGHT
  17. #define CLEAR_ENTIRE_SCREEN() \
  18. \
  19. SpvidClearScreenRegion( \
  20. 0, \
  21. 0, \
  22. 0, \
  23. 0, \
  24. DEFAULT_BACKGROUND \
  25. )
  26. #define CLEAR_CLIENT_SCREEN() \
  27. \
  28. SpvidClearScreenRegion( \
  29. 0, \
  30. HEADER_HEIGHT, \
  31. VideoVars.ScreenWidth, \
  32. VideoVars.ScreenHeight-(HEADER_HEIGHT+STATUS_HEIGHT), \
  33. DEFAULT_BACKGROUND \
  34. )
  35. #define CLEAR_HEADER_SCREEN() \
  36. \
  37. SpvidClearScreenRegion( \
  38. 0, \
  39. 0, \
  40. VideoVars.ScreenWidth, \
  41. HEADER_HEIGHT, \
  42. DEFAULT_BACKGROUND \
  43. )
  44. ULONG
  45. SpDisplayText(
  46. IN PWCHAR Message,
  47. IN ULONG MsgLen,
  48. IN BOOLEAN CenterHorizontally,
  49. IN BOOLEAN CenterVertically,
  50. IN UCHAR Attribute,
  51. IN ULONG X,
  52. IN ULONG Y
  53. );
  54. ULONG
  55. vSpDisplayFormattedMessage(
  56. IN ULONG MessageId,
  57. IN BOOLEAN CenterHorizontally,
  58. IN BOOLEAN CenterVertically,
  59. IN UCHAR Attribute,
  60. IN ULONG X,
  61. IN ULONG Y,
  62. IN va_list arglist
  63. );
  64. ULONG
  65. SpDisplayFormattedMessage(
  66. IN ULONG MessageId,
  67. IN BOOLEAN CenterHorizontally,
  68. IN BOOLEAN CenterVertically,
  69. IN UCHAR Attribute,
  70. IN ULONG X,
  71. IN ULONG Y,
  72. ...
  73. );
  74. VOID
  75. SpStartScreen(
  76. IN ULONG MessageId,
  77. IN ULONG LeftMargin,
  78. IN ULONG TopLine,
  79. IN BOOLEAN CenterHorizontally,
  80. IN BOOLEAN CenterVertically,
  81. IN UCHAR Attribute,
  82. ...
  83. );
  84. VOID
  85. SpContinueScreen(
  86. IN ULONG MessageId,
  87. IN ULONG LeftMargin,
  88. IN ULONG SpacingLines,
  89. IN BOOLEAN CenterHorizontally,
  90. IN UCHAR Attribute,
  91. ...
  92. );
  93. VOID
  94. SpBugCheck(
  95. IN ULONG BugCode,
  96. IN ULONG Param1,
  97. IN ULONG Param2,
  98. IN ULONG Param3
  99. );
  100. VOID
  101. SpDisplayRawMessage(
  102. IN ULONG MessageId,
  103. IN ULONG SpacingLines,
  104. ...
  105. );
  106. #define SpDisplayScreen(MessageId,LeftMargin,TopLine) \
  107. \
  108. SpStartScreen( \
  109. MessageId, \
  110. LeftMargin, \
  111. TopLine, \
  112. FALSE, \
  113. FALSE, \
  114. DEFAULT_ATTRIBUTE \
  115. )
  116. //
  117. // As messages are built on on-screen, with SpStartScreen and
  118. // SpContinueScreen, this value remembers where
  119. // the next message in the screen should be placed.
  120. //
  121. extern ULONG NextMessageTopLine;
  122. VOID
  123. SpDisplayHeaderText(
  124. IN ULONG MessageId,
  125. IN UCHAR Attribute
  126. );
  127. VOID
  128. SpDisplayStatusText(
  129. IN ULONG MessageId,
  130. IN UCHAR Attribute,
  131. ...
  132. );
  133. VOID
  134. SpCmdConsEnableStatusText(
  135. IN BOOLEAN EnableStatusText
  136. );
  137. VOID
  138. SpDisplayStatusOptions(
  139. IN UCHAR Attribute,
  140. ...
  141. );
  142. VOID
  143. SpDisplayStatusActionLabel(
  144. IN ULONG ActionMessageId, OPTIONAL
  145. IN ULONG FieldWidth
  146. );
  147. VOID
  148. SpDisplayStatusActionObject(
  149. IN PWSTR ObjectText
  150. );
  151. VOID
  152. SpDrawFrame(
  153. IN ULONG LeftX,
  154. IN ULONG Width,
  155. IN ULONG TopY,
  156. IN ULONG Height,
  157. IN UCHAR Attribute,
  158. IN BOOLEAN DoubleLines
  159. );
  160. //
  161. // There are places where the user has to press C for custom setup, etc.
  162. // These keystrokes are referred to as the nmemonic keys, and they must be
  163. // localizable. To accomplish this, the enum below indexes the SP_MNEMONICS
  164. // message.
  165. //
  166. typedef enum {
  167. MnemonicUnused = 0,
  168. MnemonicCustom, // as in "C=Custom Setup"
  169. MnemonicCreatePartition, // as in "C=Create Partition"
  170. MnemonicDeletePartition, // as in "D=Delete Partition"
  171. MnemonicContinueSetup, // as in "C=Continue Setup"
  172. MnemonicFormat, // as in "F=Format"
  173. MnemonicConvert, // as in "C=Convert"
  174. MnemonicRemoveFiles, // as in "R=Remove Files"
  175. MnemonicNewPath, // as in "N=Different Directory"
  176. MnemonicSkipDetection, // as in "S=Skip Detection"
  177. MnemonicScsiAdapters, // as in "S=Specify Additional SCSI Adapter"
  178. MnemonicDeletePartition2, // as in "L=Delete"
  179. MnemonicOverwrite, // as in "O=Overwrite"
  180. MnemonicRepair, // as in "R=Repair"
  181. MnemonicRepairAll, // as in "A=Repair All"
  182. MnemonicUpgrade, // as in "U=Upgrade"
  183. MnemonicAutomatedSystemRecovery, // as in "A=ASR"
  184. MnemonicInitializeDisk, // as in "I=Initialize Disk"
  185. MnemonicLocate, // as in "L=Locate"
  186. MnemonicFastRepair, // as in "F=Fast Repair"
  187. MnemonicManualRepair, // as in "M=Manual Repair"
  188. MnemonicConsole, // as in "C=Console"
  189. MnemonicChangeDiskStyle, // as in "S=Change Disk Style"
  190. MnemonicMakeSystemPartition,// as in "M=Make System Partition"
  191. MnemonicMax
  192. } MNEMONIC_KEYS;
  193. #define KEY_MNEMONIC 0x80000000
  194. extern PWCHAR MnemonicValues;
  195. ULONG
  196. SpWaitValidKey(
  197. IN const ULONG *ValidKeys1,
  198. IN const ULONG *ValidKeys2, OPTIONAL
  199. IN const ULONG *MnemonicKeys OPTIONAL
  200. );
  201. //
  202. // Enum for values that can be retuned by a KEYRESS_CALLBACK routine.
  203. //
  204. typedef enum {
  205. ValidateAccept,
  206. ValidateReject,
  207. ValidateIgnore,
  208. ValidateTerminate,
  209. ValidateRepaint
  210. } ValidationValue;
  211. //
  212. // Type for routine to be passed as ValidateKey parameter to SpGetInput().
  213. //
  214. typedef
  215. ValidationValue
  216. (*PKEYPRESS_CALLBACK) (
  217. IN ULONG Key
  218. );
  219. BOOLEAN
  220. SpGetInput(
  221. IN PKEYPRESS_CALLBACK ValidateKey,
  222. IN ULONG X,
  223. IN ULONG Y,
  224. IN ULONG MaxLength,
  225. IN OUT PWCHAR Buffer,
  226. IN BOOLEAN ValidateEscape,
  227. IN WCHAR CoverCharacter
  228. );
  229. #endif // ndef _SPDSPUTL_DEFN_
  230.