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