]>
Commit | Line | Data |
---|---|---|
fb0b259e | 1 | /** @file\r |
2 | Header file for GraphicsConsole driver.\r | |
95276127 | 3 | \r |
6dcf9abc | 4 | Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r |
8541adab | 5 | All rights reserved. This program and the accompanying materials\r |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
95276127 | 12 | \r |
fb0b259e | 13 | **/\r |
95276127 | 14 | \r |
6dcf9abc | 15 | #ifndef _GRAPHICS_CONSOLE_H_\r |
16 | #define _GRAPHICS_CONSOLE_H_\r | |
95276127 | 17 | \r |
60c93673 | 18 | #include <Uefi.h>\r |
97a079ed A |
19 | #include <Protocol/SimpleTextOut.h>\r |
20 | #include <Protocol/GraphicsOutput.h>\r | |
21 | #include <Protocol/UgaDraw.h>\r | |
22 | #include <Protocol/DevicePath.h>\r | |
23 | #include <Library/DebugLib.h>\r | |
24 | #include <Library/UefiDriverEntryPoint.h>\r | |
25 | #include <Library/UefiLib.h>\r | |
97a079ed A |
26 | #include <Library/BaseMemoryLib.h>\r |
27 | #include <Library/MemoryAllocationLib.h>\r | |
28 | #include <Library/UefiBootServicesTableLib.h>\r | |
93e3992d | 29 | #include <Library/HiiLib.h>\r |
30 | #include <Library/BaseLib.h>\r | |
8541adab | 31 | #include <Library/PcdLib.h>\r |
93e3992d | 32 | \r |
33 | #include <MdeModuleHii.h>\r | |
34 | \r | |
35 | #include <Protocol/HiiFont.h>\r | |
36 | #include <Protocol/HiiDatabase.h>\r | |
97a079ed A |
37 | \r |
38 | \r | |
5bca971e | 39 | extern EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName;\r |
40 | extern EFI_COMPONENT_NAME2_PROTOCOL gGraphicsConsoleComponentName2;\r | |
878670ea | 41 | extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding;\r |
42 | extern EFI_NARROW_GLYPH gUsStdNarrowGlyphData[];\r | |
43 | \r | |
44 | \r | |
45 | //\r | |
46 | // User can define valid graphic resolution here\r | |
47 | // e.g. 640x480, 800x600, 1024x768...\r | |
48 | //\r | |
49 | #define CURRENT_HORIZONTAL_RESOLUTION 800\r | |
50 | #define CURRENT_VERTICAL_RESOLUTION 600\r | |
51 | \r | |
52 | typedef union {\r | |
53 | EFI_NARROW_GLYPH NarrowGlyph;\r | |
54 | EFI_WIDE_GLYPH WideGlyph;\r | |
55 | } GLYPH_UNION;\r | |
56 | \r | |
57 | //\r | |
58 | // Device Structure\r | |
59 | //\r | |
60 | #define GRAPHICS_CONSOLE_DEV_SIGNATURE SIGNATURE_32 ('g', 's', 't', 'o')\r | |
61 | \r | |
62 | typedef struct {\r | |
63 | UINTN Columns;\r | |
64 | UINTN Rows;\r | |
65 | INTN DeltaX;\r | |
66 | INTN DeltaY;\r | |
67 | UINT32 GopWidth;\r | |
68 | UINT32 GopHeight;\r | |
69 | UINT32 GopModeNumber;\r | |
70 | } GRAPHICS_CONSOLE_MODE_DATA;\r | |
71 | \r | |
72 | #define GRAPHICS_MAX_MODE 4\r | |
73 | \r | |
74 | typedef struct {\r | |
75 | UINTN Signature;\r | |
76 | EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;\r | |
77 | EFI_UGA_DRAW_PROTOCOL *UgaDraw;\r | |
78 | EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOutput;\r | |
79 | EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutputMode;\r | |
80 | GRAPHICS_CONSOLE_MODE_DATA ModeData[GRAPHICS_MAX_MODE];\r | |
81 | EFI_GRAPHICS_OUTPUT_BLT_PIXEL *LineBuffer;\r | |
82 | EFI_HII_HANDLE HiiHandle;\r | |
83 | } GRAPHICS_CONSOLE_DEV;\r | |
84 | \r | |
85 | #define GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS(a) \\r | |
86 | CR (a, GRAPHICS_CONSOLE_DEV, SimpleTextOutput, GRAPHICS_CONSOLE_DEV_SIGNATURE)\r | |
87 | \r | |
95276127 | 88 | \r |
89 | //\r | |
97a079ed | 90 | // EFI Component Name Functions\r |
95276127 | 91 | //\r |
5bca971e | 92 | /**\r |
93 | Retrieves a Unicode string that is the user readable name of the driver.\r | |
94 | \r | |
95 | This function retrieves the user readable name of a driver in the form of a\r | |
96 | Unicode string. If the driver specified by This has a user readable name in\r | |
97 | the language specified by Language, then a pointer to the driver name is\r | |
98 | returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r | |
99 | by This does not support the language specified by Language,\r | |
100 | then EFI_UNSUPPORTED is returned.\r | |
101 | \r | |
102 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
103 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
104 | \r | |
105 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
106 | array indicating the language. This is the\r | |
107 | language of the driver name that the caller is\r | |
108 | requesting, and it must match one of the\r | |
109 | languages specified in SupportedLanguages. The\r | |
110 | number of languages supported by a driver is up\r | |
111 | to the driver writer. Language is specified\r | |
112 | in RFC 3066 or ISO 639-2 language code format.\r | |
113 | \r | |
114 | @param DriverName[out] A pointer to the Unicode string to return.\r | |
115 | This Unicode string is the name of the\r | |
116 | driver specified by This in the language\r | |
117 | specified by Language.\r | |
118 | \r | |
119 | @retval EFI_SUCCESS The Unicode string for the Driver specified by\r | |
120 | This and the language specified by Language was\r | |
121 | returned in DriverName.\r | |
122 | \r | |
123 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
124 | \r | |
125 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r | |
126 | \r | |
127 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
128 | the language specified by Language.\r | |
129 | \r | |
130 | **/\r | |
97a079ed A |
131 | EFI_STATUS\r |
132 | EFIAPI\r | |
133 | GraphicsConsoleComponentNameGetDriverName (\r | |
134 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
135 | IN CHAR8 *Language,\r | |
136 | OUT CHAR16 **DriverName\r | |
137 | );\r | |
138 | \r | |
5bca971e | 139 | \r |
140 | /**\r | |
141 | Retrieves a Unicode string that is the user readable name of the controller\r | |
142 | that is being managed by a driver.\r | |
143 | \r | |
144 | This function retrieves the user readable name of the controller specified by\r | |
145 | ControllerHandle and ChildHandle in the form of a Unicode string. If the\r | |
146 | driver specified by This has a user readable name in the language specified by\r | |
147 | Language, then a pointer to the controller name is returned in ControllerName,\r | |
148 | and EFI_SUCCESS is returned. If the driver specified by This is not currently\r | |
149 | managing the controller specified by ControllerHandle and ChildHandle,\r | |
150 | then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r | |
151 | support the language specified by Language, then EFI_UNSUPPORTED is returned.\r | |
152 | \r | |
153 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
154 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
155 | \r | |
156 | @param ControllerHandle[in] The handle of a controller that the driver\r | |
157 | specified by This is managing. This handle\r | |
158 | specifies the controller whose name is to be\r | |
159 | returned.\r | |
160 | \r | |
161 | @param ChildHandle[in] The handle of the child controller to retrieve\r | |
162 | the name of. This is an optional parameter that\r | |
163 | may be NULL. It will be NULL for device\r | |
164 | drivers. It will also be NULL for a bus drivers\r | |
165 | that wish to retrieve the name of the bus\r | |
166 | controller. It will not be NULL for a bus\r | |
167 | driver that wishes to retrieve the name of a\r | |
168 | child controller.\r | |
169 | \r | |
170 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
171 | array indicating the language. This is the\r | |
172 | language of the driver name that the caller is\r | |
173 | requesting, and it must match one of the\r | |
174 | languages specified in SupportedLanguages. The\r | |
175 | number of languages supported by a driver is up\r | |
176 | to the driver writer. Language is specified in\r | |
177 | RFC 3066 or ISO 639-2 language code format.\r | |
178 | \r | |
179 | @param ControllerName[out] A pointer to the Unicode string to return.\r | |
180 | This Unicode string is the name of the\r | |
181 | controller specified by ControllerHandle and\r | |
182 | ChildHandle in the language specified by\r | |
183 | Language from the point of view of the driver\r | |
184 | specified by This.\r | |
185 | \r | |
186 | @retval EFI_SUCCESS The Unicode string for the user readable name in\r | |
187 | the language specified by Language for the\r | |
188 | driver specified by This was returned in\r | |
189 | DriverName.\r | |
190 | \r | |
191 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
192 | \r | |
193 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r | |
194 | EFI_HANDLE.\r | |
195 | \r | |
196 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
197 | \r | |
198 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
199 | \r | |
200 | @retval EFI_UNSUPPORTED The driver specified by This is not currently\r | |
201 | managing the controller specified by\r | |
202 | ControllerHandle and ChildHandle.\r | |
203 | \r | |
204 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
205 | the language specified by Language.\r | |
206 | \r | |
207 | **/\r | |
97a079ed A |
208 | EFI_STATUS\r |
209 | EFIAPI\r | |
210 | GraphicsConsoleComponentNameGetControllerName (\r | |
211 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
212 | IN EFI_HANDLE ControllerHandle,\r | |
213 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
214 | IN CHAR8 *Language,\r | |
215 | OUT CHAR16 **ControllerName\r | |
216 | );\r | |
95276127 | 217 | \r |
5bca971e | 218 | \r |
95276127 | 219 | \r |
24248368 | 220 | \r |
221 | /**\r | |
222 | Returns available Unicode glyphs narrow fonts(8*19 pixels) size.\r | |
223 | \r | |
878670ea | 224 | @return Narrow font size.\r |
24248368 | 225 | \r |
226 | **/\r | |
878670ea | 227 | UINT32\r |
95276127 | 228 | ReturnNarrowFontSize (\r |
229 | VOID\r | |
230 | );\r | |
231 | \r | |
6dcf9abc | 232 | /**\r |
7601dbe7 | 233 | Reset the text output device hardware and optionally run diagnostics.\r |
234 | \r | |
6dcf9abc | 235 | Implements SIMPLE_TEXT_OUTPUT.Reset().\r |
236 | If ExtendeVerification is TRUE, then perform dependent Graphics Console\r | |
237 | device reset, and set display mode to mode 0.\r | |
238 | If ExtendedVerification is FALSE, only set display mode to mode 0.\r | |
239 | \r | |
7601dbe7 | 240 | @param This Protocol instance pointer.\r |
6dcf9abc | 241 | @param ExtendedVerification Indicates that the driver may perform a more\r |
242 | exhaustive verification operation of the device\r | |
243 | during reset.\r | |
244 | \r | |
7601dbe7 | 245 | @retval EFI_SUCCESS The text output device was reset.\r |
246 | @retval EFI_DEVICE_ERROR The text output device is not functioning correctly and\r | |
247 | could not be reset.\r | |
95276127 | 248 | \r |
6dcf9abc | 249 | **/\r |
95276127 | 250 | EFI_STATUS\r |
251 | EFIAPI\r | |
252 | GraphicsConsoleConOutReset (\r | |
253 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r | |
254 | IN BOOLEAN ExtendedVerification\r | |
255 | );\r | |
256 | \r | |
6dcf9abc | 257 | /**\r |
24248368 | 258 | Write a Unicode string to the output device.\r |
259 | \r | |
260 | Implements SIMPLE_TEXT_OUTPUT.OutputString(). \r | |
6dcf9abc | 261 | The Unicode string will be converted to Glyphs and will be\r |
262 | sent to the Graphics Console.\r | |
263 | \r | |
24248368 | 264 | @param This Protocol instance pointer.\r |
265 | @param WString The NULL-terminated Unicode string to be displayed\r | |
266 | on the output device(s). All output devices must\r | |
267 | also support the Unicode drawing defined in this file.\r | |
6dcf9abc | 268 | \r |
24248368 | 269 | @retval EFI_SUCCESS The string was output to the device.\r |
270 | @retval EFI_DEVICE_ERROR The device reported an error while attempting to output\r | |
271 | the text.\r | |
272 | @retval EFI_UNSUPPORTED The output device's mode is not currently in a\r | |
273 | defined text mode.\r | |
274 | @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the\r | |
275 | characters in the Unicode string could not be\r | |
276 | rendered and were skipped.\r | |
6dcf9abc | 277 | \r |
278 | **/\r | |
95276127 | 279 | EFI_STATUS\r |
280 | EFIAPI\r | |
281 | GraphicsConsoleConOutOutputString (\r | |
282 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r | |
283 | IN CHAR16 *WString\r | |
284 | );\r | |
285 | \r | |
6dcf9abc | 286 | /**\r |
5c03ed0a | 287 | Verifies that all characters in a Unicode string can be output to the \r |
288 | target device.\r | |
289 | \r | |
6dcf9abc | 290 | Implements SIMPLE_TEXT_OUTPUT.TestString().\r |
5c03ed0a | 291 | If one of the characters in the *Wstring is neither valid valid Unicode\r |
292 | drawing characters, not ASCII code, then this function will return\r | |
293 | EFI_UNSUPPORTED\r | |
6dcf9abc | 294 | \r |
5c03ed0a | 295 | @param This Protocol instance pointer.\r |
296 | @param WString The NULL-terminated Unicode string to be examined for the output\r | |
297 | device(s).\r | |
6dcf9abc | 298 | \r |
5c03ed0a | 299 | @retval EFI_SUCCESS The device(s) are capable of rendering the output string.\r |
300 | @retval EFI_UNSUPPORTED Some of the characters in the Unicode string cannot be\r | |
301 | rendered by one or more of the output devices mapped\r | |
302 | by the EFI handle.\r | |
6dcf9abc | 303 | \r |
304 | **/\r | |
95276127 | 305 | EFI_STATUS\r |
306 | EFIAPI\r | |
307 | GraphicsConsoleConOutTestString (\r | |
308 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r | |
309 | IN CHAR16 *WString\r | |
310 | );\r | |
311 | \r | |
6dcf9abc | 312 | /**\r |
24248368 | 313 | Returns information for an available text mode that the output device(s)\r |
314 | supports\r | |
315 | \r | |
6dcf9abc | 316 | Implements SIMPLE_TEXT_OUTPUT.QueryMode().\r |
24248368 | 317 | It returnes information for an available text mode that the Graphics Console supports.\r |
318 | In this driver,we only support text mode 80x25, which is defined as mode 0.\r | |
6dcf9abc | 319 | \r |
24248368 | 320 | @param This Protocol instance pointer.\r |
6dcf9abc | 321 | @param ModeNumber The mode number to return information on.\r |
322 | @param Columns The returned columns of the requested mode.\r | |
323 | @param Rows The returned rows of the requested mode.\r | |
324 | \r | |
24248368 | 325 | @retval EFI_SUCCESS The requested mode information is returned.\r |
326 | @retval EFI_UNSUPPORTED The mode number is not valid.\r | |
6dcf9abc | 327 | \r |
328 | **/\r | |
95276127 | 329 | EFI_STATUS\r |
330 | EFIAPI\r | |
331 | GraphicsConsoleConOutQueryMode (\r | |
332 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r | |
333 | IN UINTN ModeNumber,\r | |
334 | OUT UINTN *Columns,\r | |
335 | OUT UINTN *Rows\r | |
336 | );\r | |
337 | \r | |
24248368 | 338 | \r |
6dcf9abc | 339 | /**\r |
24248368 | 340 | Sets the output device(s) to a specified mode.\r |
341 | \r | |
6dcf9abc | 342 | Implements SIMPLE_TEXT_OUTPUT.SetMode().\r |
24248368 | 343 | Set the Graphics Console to a specified mode. In this driver, we only support mode 0.\r |
6dcf9abc | 344 | \r |
24248368 | 345 | @param This Protocol instance pointer.\r |
6dcf9abc | 346 | @param ModeNumber The text mode to set.\r |
347 | \r | |
24248368 | 348 | @retval EFI_SUCCESS The requested text mode is set.\r |
349 | @retval EFI_DEVICE_ERROR The requested text mode cannot be set because of \r | |
350 | Graphics Console device error.\r | |
351 | @retval EFI_UNSUPPORTED The text mode number is not valid.\r | |
6dcf9abc | 352 | \r |
353 | **/\r | |
95276127 | 354 | EFI_STATUS\r |
355 | EFIAPI\r | |
356 | GraphicsConsoleConOutSetMode (\r | |
357 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r | |
358 | IN UINTN ModeNumber\r | |
359 | );\r | |
360 | \r | |
6dcf9abc | 361 | /**\r |
5c03ed0a | 362 | Sets the background and foreground colors for the OutputString () and\r |
363 | ClearScreen () functions.\r | |
364 | \r | |
6dcf9abc | 365 | Implements SIMPLE_TEXT_OUTPUT.SetAttribute().\r |
366 | \r | |
5c03ed0a | 367 | @param This Protocol instance pointer.\r |
368 | @param Attribute The attribute to set. Bits 0..3 are the foreground\r | |
369 | color, and bits 4..6 are the background color. \r | |
370 | All other bits are undefined and must be zero.\r | |
6dcf9abc | 371 | \r |
5c03ed0a | 372 | @retval EFI_SUCCESS The requested attribute is set.\r |
373 | @retval EFI_DEVICE_ERROR The requested attribute cannot be set due to Graphics Console port error.\r | |
374 | @retval EFI_UNSUPPORTED The attribute requested is not defined.\r | |
6dcf9abc | 375 | \r |
376 | **/\r | |
95276127 | 377 | EFI_STATUS\r |
378 | EFIAPI\r | |
379 | GraphicsConsoleConOutSetAttribute (\r | |
380 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r | |
381 | IN UINTN Attribute\r | |
382 | );\r | |
383 | \r | |
6dcf9abc | 384 | /**\r |
24248368 | 385 | Clears the output device(s) display to the currently selected background \r |
386 | color.\r | |
387 | \r | |
6dcf9abc | 388 | Implements SIMPLE_TEXT_OUTPUT.ClearScreen().\r |
6dcf9abc | 389 | \r |
24248368 | 390 | @param This Protocol instance pointer.\r |
6dcf9abc | 391 | \r |
24248368 | 392 | @retval EFI_SUCCESS The operation completed successfully.\r |
393 | @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.\r | |
394 | @retval EFI_UNSUPPORTED The output device is not in a valid text mode.\r | |
6dcf9abc | 395 | \r |
396 | **/\r | |
95276127 | 397 | EFI_STATUS\r |
398 | EFIAPI\r | |
399 | GraphicsConsoleConOutClearScreen (\r | |
400 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This\r | |
401 | );\r | |
402 | \r | |
6dcf9abc | 403 | /**\r |
5c03ed0a | 404 | Sets the current coordinates of the cursor position.\r |
405 | \r | |
6dcf9abc | 406 | Implements SIMPLE_TEXT_OUTPUT.SetCursorPosition().\r |
407 | \r | |
5c03ed0a | 408 | @param This Protocol instance pointer.\r |
409 | @param Column The position to set the cursor to. Must be greater than or\r | |
410 | equal to zero and less than the number of columns and rows\r | |
411 | by QueryMode ().\r | |
412 | @param Row The position to set the cursor to. Must be greater than or\r | |
413 | equal to zero and less than the number of columns and rows\r | |
414 | by QueryMode ().\r | |
6dcf9abc | 415 | \r |
5c03ed0a | 416 | @retval EFI_SUCCESS The operation completed successfully.\r |
417 | @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.\r | |
418 | @retval EFI_UNSUPPORTED The output device is not in a valid text mode, or the\r | |
419 | cursor position is invalid for the current mode.\r | |
6dcf9abc | 420 | \r |
421 | **/\r | |
95276127 | 422 | EFI_STATUS\r |
423 | EFIAPI\r | |
424 | GraphicsConsoleConOutSetCursorPosition (\r | |
425 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r | |
426 | IN UINTN Column,\r | |
427 | IN UINTN Row\r | |
428 | );\r | |
429 | \r | |
24248368 | 430 | \r |
6dcf9abc | 431 | /**\r |
24248368 | 432 | Makes the cursor visible or invisible.\r |
433 | \r | |
6dcf9abc | 434 | Implements SIMPLE_TEXT_OUTPUT.EnableCursor().\r |
6dcf9abc | 435 | \r |
24248368 | 436 | @param This Protocol instance pointer.\r |
6dcf9abc | 437 | @param Visible If TRUE, the cursor is set to be visible, If FALSE,\r |
438 | the cursor is set to be invisible.\r | |
439 | \r | |
24248368 | 440 | @retval EFI_SUCCESS The operation completed successfully.\r |
6dcf9abc | 441 | \r |
442 | **/\r | |
95276127 | 443 | EFI_STATUS\r |
444 | EFIAPI\r | |
445 | GraphicsConsoleConOutEnableCursor (\r | |
446 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r | |
447 | IN BOOLEAN Visible\r | |
448 | );\r | |
449 | \r | |
24248368 | 450 | /**\r |
8595bdaf | 451 | Test to see if Graphics Console could be supported on the Controller.\r |
24248368 | 452 | \r |
453 | Graphics Console could be supported if Graphics Output Protocol or UGA Draw\r | |
8595bdaf | 454 | Protocol exists on the Controller. (UGA Draw Protocol could be skipped\r |
24248368 | 455 | if PcdUgaConsumeSupport is set to FALSE.)\r |
456 | \r | |
457 | @param This Protocol instance pointer.\r | |
8595bdaf | 458 | @param Controller Handle of device to test.\r |
24248368 | 459 | @param RemainingDevicePath Optional parameter use to pick a specific child\r |
460 | device to start.\r | |
461 | \r | |
8595bdaf | 462 | @retval EFI_SUCCESS This driver supports this device.\r |
463 | @retval other This driver does not support this device.\r | |
24248368 | 464 | \r |
465 | **/\r | |
95276127 | 466 | EFI_STATUS\r |
467 | EFIAPI\r | |
468 | GraphicsConsoleControllerDriverSupported (\r | |
469 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
470 | IN EFI_HANDLE Controller,\r | |
471 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
472 | );\r | |
473 | \r | |
8595bdaf | 474 | \r |
24248368 | 475 | /**\r |
8595bdaf | 476 | Start this driver on Controller by opening Graphics Output protocol or \r |
477 | UGA Draw protocol, and installing Simple Text Out protocol on Controller.\r | |
878670ea | 478 | (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)\r |
24248368 | 479 | \r |
480 | @param This Protocol instance pointer.\r | |
8595bdaf | 481 | @param Controller Handle of device to bind driver to\r |
24248368 | 482 | @param RemainingDevicePath Optional parameter use to pick a specific child\r |
483 | device to start.\r | |
484 | \r | |
8595bdaf | 485 | @retval EFI_SUCCESS This driver is added to Controller.\r |
486 | @retval other This driver does not support this device.\r | |
24248368 | 487 | \r |
488 | **/\r | |
95276127 | 489 | EFI_STATUS\r |
490 | EFIAPI\r | |
491 | GraphicsConsoleControllerDriverStart (\r | |
492 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
493 | IN EFI_HANDLE Controller,\r | |
494 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
495 | );\r | |
496 | \r | |
24248368 | 497 | /**\r |
8595bdaf | 498 | Stop this driver on Controller by removing Simple Text Out protocol \r |
499 | and closing the Graphics Output Protocol or UGA Draw protocol on Controller.\r | |
878670ea | 500 | (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)\r |
24248368 | 501 | \r |
502 | \r | |
503 | @param This Protocol instance pointer.\r | |
8595bdaf | 504 | @param Controller Handle of device to stop driver on\r |
24248368 | 505 | @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r |
506 | children is zero stop the entire bus driver.\r | |
507 | @param ChildHandleBuffer List of Child Handles to Stop.\r | |
508 | \r | |
8595bdaf | 509 | @retval EFI_SUCCESS This driver is removed Controller.\r |
24248368 | 510 | @retval EFI_NOT_STARTED Simple Text Out protocol could not be found the \r |
8595bdaf | 511 | Controller.\r |
24248368 | 512 | @retval other This driver was not removed from this device.\r |
513 | \r | |
514 | **/\r | |
95276127 | 515 | EFI_STATUS\r |
516 | EFIAPI\r | |
517 | GraphicsConsoleControllerDriverStop (\r | |
518 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
519 | IN EFI_HANDLE Controller,\r | |
520 | IN UINTN NumberOfChildren,\r | |
521 | IN EFI_HANDLE *ChildHandleBuffer\r | |
522 | );\r | |
523 | \r | |
6dcf9abc | 524 | \r |
24248368 | 525 | /**\r |
526 | Locate HII Database protocol and HII Font protocol.\r | |
527 | \r | |
528 | @retval EFI_SUCCESS HII Database protocol and HII Font protocol \r | |
529 | are located successfully.\r | |
530 | @return other Failed to locate HII Database protocol or \r | |
531 | HII Font protocol.\r | |
532 | \r | |
533 | **/\r | |
93e3992d | 534 | EFI_STATUS\r |
535 | EfiLocateHiiProtocol (\r | |
536 | VOID\r | |
ed66e1bc | 537 | );\r |
93e3992d | 538 | \r |
539 | \r | |
5c03ed0a | 540 | /**\r |
541 | Gets Graphics Console devcie's foreground color and background color.\r | |
542 | \r | |
543 | @param This Protocol instance pointer.\r | |
544 | @param Foreground Returned text foreground color.\r | |
545 | @param Background Returned text background color.\r | |
546 | \r | |
547 | @retval EFI_SUCCESS It returned always.\r | |
548 | \r | |
549 | **/\r | |
550 | EFI_STATUS\r | |
551 | GetTextColors (\r | |
552 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r | |
553 | OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground,\r | |
554 | OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background\r | |
555 | );\r | |
556 | \r | |
557 | /**\r | |
558 | Draw Unicode string on the Graphics Console device's screen.\r | |
559 | \r | |
560 | @param This Protocol instance pointer.\r | |
561 | @param UnicodeWeight One Unicode string to be displayed.\r | |
562 | @param Count The count of Unicode string.\r | |
563 | \r | |
564 | @retval EFI_OUT_OF_RESOURCES If no memory resource to use.\r | |
565 | @retval EFI_UNSUPPORTED If no Graphics Output protocol and UGA Draw\r | |
566 | protocol exist.\r | |
567 | @retval EFI_SUCCESS Drawing Unicode string implemented successfully.\r | |
568 | \r | |
569 | **/\r | |
570 | EFI_STATUS\r | |
571 | DrawUnicodeWeightAtCursorN (\r | |
572 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r | |
573 | IN CHAR16 *UnicodeWeight,\r | |
574 | IN UINTN Count\r | |
575 | );\r | |
576 | \r | |
577 | /**\r | |
578 | Erase the cursor on the screen.\r | |
579 | \r | |
580 | @param This Protocol instance pointer.\r | |
581 | \r | |
582 | @retval EFI_SUCCESS The cursor is erased successfully.\r | |
583 | \r | |
584 | **/\r | |
585 | EFI_STATUS\r | |
586 | EraseCursor (\r | |
587 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This\r | |
588 | );\r | |
589 | \r | |
590 | /**\r | |
591 | Check if the current specific mode supported the user defined resolution\r | |
592 | for the Graphics Console device based on Graphics Output Protocol.\r | |
593 | \r | |
594 | If yes, set the graphic device's current mode to this specific mode.\r | |
595 | \r | |
596 | @param GraphicsOutput Graphics Output Protocol instance pointer.\r | |
597 | @param HorizontalResolution User defined horizontal resolution\r | |
598 | @param VerticalResolution User defined vertical resolution.\r | |
599 | @param CurrentModeNumber Current specific mode to be check.\r | |
600 | \r | |
601 | @retval EFI_SUCCESS The mode is supported.\r | |
602 | @retval EFI_UNSUPPORTED The specific mode is out of range of graphics \r | |
603 | device supported.\r | |
604 | @retval other The specific mode does not support user defined \r | |
605 | resolution or failed to set the current mode to the \r | |
606 | specific mode on graphics device.\r | |
607 | \r | |
608 | **/\r | |
609 | EFI_STATUS\r | |
610 | CheckModeSupported (\r | |
611 | EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,\r | |
612 | IN UINT32 HorizontalResolution,\r | |
613 | IN UINT32 VerticalResolution,\r | |
614 | OUT UINT32 *CurrentModeNumber\r | |
615 | );\r | |
616 | \r | |
95276127 | 617 | #endif\r |