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