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