]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
Add the missing PI capsule architecture protocol.
[mirror_edk2.git] / MdeModulePkg / Universal / Console / GraphicsConsoleDxe / GraphicsConsole.h
CommitLineData
fb0b259e 1/** @file\r
2 Header file for GraphicsConsole driver.\r
95276127 3\r
6dcf9abc 4Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
8541adab 5All rights reserved. This program and the accompanying materials\r
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
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 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
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
52typedef 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
62typedef 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
74typedef 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
131EFI_STATUS\r
132EFIAPI\r
133GraphicsConsoleComponentNameGetDriverName (\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
208EFI_STATUS\r
209EFIAPI\r
210GraphicsConsoleComponentNameGetControllerName (\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
6dcf9abc 219/**\r
7601dbe7 220 Reset the text output device hardware and optionally run diagnostics.\r
221 \r
6dcf9abc 222 Implements SIMPLE_TEXT_OUTPUT.Reset().\r
223 If ExtendeVerification is TRUE, then perform dependent Graphics Console\r
224 device reset, and set display mode to mode 0.\r
225 If ExtendedVerification is FALSE, only set display mode to mode 0.\r
226\r
7601dbe7 227 @param This Protocol instance pointer.\r
6dcf9abc 228 @param ExtendedVerification Indicates that the driver may perform a more\r
229 exhaustive verification operation of the device\r
230 during reset.\r
231\r
7601dbe7 232 @retval EFI_SUCCESS The text output device was reset.\r
233 @retval EFI_DEVICE_ERROR The text output device is not functioning correctly and\r
234 could not be reset.\r
95276127 235\r
6dcf9abc 236**/\r
95276127 237EFI_STATUS\r
238EFIAPI\r
239GraphicsConsoleConOutReset (\r
240 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
241 IN BOOLEAN ExtendedVerification\r
242 );\r
243\r
6dcf9abc 244/**\r
24248368 245 Write a Unicode string to the output device.\r
246\r
247 Implements SIMPLE_TEXT_OUTPUT.OutputString(). \r
6dcf9abc 248 The Unicode string will be converted to Glyphs and will be\r
249 sent to the Graphics Console.\r
250\r
24248368 251 @param This Protocol instance pointer.\r
252 @param WString The NULL-terminated Unicode string to be displayed\r
253 on the output device(s). All output devices must\r
254 also support the Unicode drawing defined in this file.\r
6dcf9abc 255\r
24248368 256 @retval EFI_SUCCESS The string was output to the device.\r
257 @retval EFI_DEVICE_ERROR The device reported an error while attempting to output\r
258 the text.\r
259 @retval EFI_UNSUPPORTED The output device's mode is not currently in a\r
260 defined text mode.\r
261 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the\r
262 characters in the Unicode string could not be\r
263 rendered and were skipped.\r
6dcf9abc 264\r
265**/\r
95276127 266EFI_STATUS\r
267EFIAPI\r
268GraphicsConsoleConOutOutputString (\r
269 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
270 IN CHAR16 *WString\r
271 );\r
272\r
6dcf9abc 273/**\r
5c03ed0a 274 Verifies that all characters in a Unicode string can be output to the \r
275 target device.\r
276\r
6dcf9abc 277 Implements SIMPLE_TEXT_OUTPUT.TestString().\r
5c03ed0a 278 If one of the characters in the *Wstring is neither valid valid Unicode\r
279 drawing characters, not ASCII code, then this function will return\r
280 EFI_UNSUPPORTED\r
6dcf9abc 281\r
5c03ed0a 282 @param This Protocol instance pointer.\r
283 @param WString The NULL-terminated Unicode string to be examined for the output\r
284 device(s).\r
6dcf9abc 285\r
5c03ed0a 286 @retval EFI_SUCCESS The device(s) are capable of rendering the output string.\r
287 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string cannot be\r
288 rendered by one or more of the output devices mapped\r
289 by the EFI handle.\r
6dcf9abc 290\r
291**/\r
95276127 292EFI_STATUS\r
293EFIAPI\r
294GraphicsConsoleConOutTestString (\r
295 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
296 IN CHAR16 *WString\r
297 );\r
298\r
6dcf9abc 299/**\r
24248368 300 Returns information for an available text mode that the output device(s)\r
301 supports\r
302\r
6dcf9abc 303 Implements SIMPLE_TEXT_OUTPUT.QueryMode().\r
24248368 304 It returnes information for an available text mode that the Graphics Console supports.\r
305 In this driver,we only support text mode 80x25, which is defined as mode 0.\r
6dcf9abc 306\r
24248368 307 @param This Protocol instance pointer.\r
6dcf9abc 308 @param ModeNumber The mode number to return information on.\r
309 @param Columns The returned columns of the requested mode.\r
310 @param Rows The returned rows of the requested mode.\r
311\r
24248368 312 @retval EFI_SUCCESS The requested mode information is returned.\r
313 @retval EFI_UNSUPPORTED The mode number is not valid.\r
6dcf9abc 314\r
315**/\r
95276127 316EFI_STATUS\r
317EFIAPI\r
318GraphicsConsoleConOutQueryMode (\r
319 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
320 IN UINTN ModeNumber,\r
321 OUT UINTN *Columns,\r
322 OUT UINTN *Rows\r
323 );\r
324\r
24248368 325\r
6dcf9abc 326/**\r
24248368 327 Sets the output device(s) to a specified mode.\r
328 \r
6dcf9abc 329 Implements SIMPLE_TEXT_OUTPUT.SetMode().\r
24248368 330 Set the Graphics Console to a specified mode. In this driver, we only support mode 0.\r
6dcf9abc 331\r
24248368 332 @param This Protocol instance pointer.\r
6dcf9abc 333 @param ModeNumber The text mode to set.\r
334\r
24248368 335 @retval EFI_SUCCESS The requested text mode is set.\r
336 @retval EFI_DEVICE_ERROR The requested text mode cannot be set because of \r
337 Graphics Console device error.\r
338 @retval EFI_UNSUPPORTED The text mode number is not valid.\r
6dcf9abc 339\r
340**/\r
95276127 341EFI_STATUS\r
342EFIAPI\r
343GraphicsConsoleConOutSetMode (\r
344 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
345 IN UINTN ModeNumber\r
346 );\r
347\r
6dcf9abc 348/**\r
5c03ed0a 349 Sets the background and foreground colors for the OutputString () and\r
350 ClearScreen () functions.\r
351\r
6dcf9abc 352 Implements SIMPLE_TEXT_OUTPUT.SetAttribute().\r
353\r
5c03ed0a 354 @param This Protocol instance pointer.\r
355 @param Attribute The attribute to set. Bits 0..3 are the foreground\r
356 color, and bits 4..6 are the background color. \r
357 All other bits are undefined and must be zero.\r
6dcf9abc 358\r
5c03ed0a 359 @retval EFI_SUCCESS The requested attribute is set.\r
360 @retval EFI_DEVICE_ERROR The requested attribute cannot be set due to Graphics Console port error.\r
361 @retval EFI_UNSUPPORTED The attribute requested is not defined.\r
6dcf9abc 362\r
363**/\r
95276127 364EFI_STATUS\r
365EFIAPI\r
366GraphicsConsoleConOutSetAttribute (\r
367 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
368 IN UINTN Attribute\r
369 );\r
370\r
6dcf9abc 371/**\r
24248368 372 Clears the output device(s) display to the currently selected background \r
373 color.\r
374\r
6dcf9abc 375 Implements SIMPLE_TEXT_OUTPUT.ClearScreen().\r
6dcf9abc 376\r
24248368 377 @param This Protocol instance pointer.\r
6dcf9abc 378\r
24248368 379 @retval EFI_SUCCESS The operation completed successfully.\r
380 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.\r
381 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.\r
6dcf9abc 382\r
383**/\r
95276127 384EFI_STATUS\r
385EFIAPI\r
386GraphicsConsoleConOutClearScreen (\r
387 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This\r
388 );\r
389\r
6dcf9abc 390/**\r
5c03ed0a 391 Sets the current coordinates of the cursor position.\r
392\r
6dcf9abc 393 Implements SIMPLE_TEXT_OUTPUT.SetCursorPosition().\r
394\r
5c03ed0a 395 @param This Protocol instance pointer.\r
396 @param Column The position to set the cursor to. Must be greater than or\r
397 equal to zero and less than the number of columns and rows\r
398 by QueryMode ().\r
399 @param Row The position to set the cursor to. Must be greater than or\r
400 equal to zero and less than the number of columns and rows\r
401 by QueryMode ().\r
6dcf9abc 402\r
5c03ed0a 403 @retval EFI_SUCCESS The operation completed successfully.\r
404 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.\r
405 @retval EFI_UNSUPPORTED The output device is not in a valid text mode, or the\r
406 cursor position is invalid for the current mode.\r
6dcf9abc 407\r
408**/\r
95276127 409EFI_STATUS\r
410EFIAPI\r
411GraphicsConsoleConOutSetCursorPosition (\r
412 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
413 IN UINTN Column,\r
414 IN UINTN Row\r
415 );\r
416\r
24248368 417\r
6dcf9abc 418/**\r
24248368 419 Makes the cursor visible or invisible.\r
420\r
6dcf9abc 421 Implements SIMPLE_TEXT_OUTPUT.EnableCursor().\r
6dcf9abc 422\r
24248368 423 @param This Protocol instance pointer.\r
6dcf9abc 424 @param Visible If TRUE, the cursor is set to be visible, If FALSE,\r
425 the cursor is set to be invisible.\r
426\r
24248368 427 @retval EFI_SUCCESS The operation completed successfully.\r
6dcf9abc 428\r
429**/\r
95276127 430EFI_STATUS\r
431EFIAPI\r
432GraphicsConsoleConOutEnableCursor (\r
433 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
434 IN BOOLEAN Visible\r
435 );\r
436\r
24248368 437/**\r
8595bdaf 438 Test to see if Graphics Console could be supported on the Controller.\r
24248368 439\r
440 Graphics Console could be supported if Graphics Output Protocol or UGA Draw\r
8595bdaf 441 Protocol exists on the Controller. (UGA Draw Protocol could be skipped\r
24248368 442 if PcdUgaConsumeSupport is set to FALSE.)\r
443\r
444 @param This Protocol instance pointer.\r
8595bdaf 445 @param Controller Handle of device to test.\r
24248368 446 @param RemainingDevicePath Optional parameter use to pick a specific child\r
447 device to start.\r
448\r
8595bdaf 449 @retval EFI_SUCCESS This driver supports this device.\r
450 @retval other This driver does not support this device.\r
24248368 451\r
452**/\r
95276127 453EFI_STATUS\r
454EFIAPI\r
455GraphicsConsoleControllerDriverSupported (\r
456 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
457 IN EFI_HANDLE Controller,\r
458 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
459 );\r
460\r
8595bdaf 461\r
24248368 462/**\r
8595bdaf 463 Start this driver on Controller by opening Graphics Output protocol or \r
464 UGA Draw protocol, and installing Simple Text Out protocol on Controller.\r
878670ea 465 (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)\r
24248368 466 \r
467 @param This Protocol instance pointer.\r
8595bdaf 468 @param Controller Handle of device to bind driver to\r
24248368 469 @param RemainingDevicePath Optional parameter use to pick a specific child\r
470 device to start.\r
471\r
8595bdaf 472 @retval EFI_SUCCESS This driver is added to Controller.\r
473 @retval other This driver does not support this device.\r
24248368 474\r
475**/\r
95276127 476EFI_STATUS\r
477EFIAPI\r
478GraphicsConsoleControllerDriverStart (\r
479 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
480 IN EFI_HANDLE Controller,\r
481 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
482 );\r
483\r
24248368 484/**\r
8595bdaf 485 Stop this driver on Controller by removing Simple Text Out protocol \r
486 and closing the Graphics Output Protocol or UGA Draw protocol on Controller.\r
878670ea 487 (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)\r
24248368 488 \r
489\r
490 @param This Protocol instance pointer.\r
8595bdaf 491 @param Controller Handle of device to stop driver on\r
24248368 492 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
493 children is zero stop the entire bus driver.\r
494 @param ChildHandleBuffer List of Child Handles to Stop.\r
495\r
8595bdaf 496 @retval EFI_SUCCESS This driver is removed Controller.\r
24248368 497 @retval EFI_NOT_STARTED Simple Text Out protocol could not be found the \r
8595bdaf 498 Controller.\r
24248368 499 @retval other This driver was not removed from this device.\r
500\r
501**/\r
95276127 502EFI_STATUS\r
503EFIAPI\r
504GraphicsConsoleControllerDriverStop (\r
505 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
506 IN EFI_HANDLE Controller,\r
507 IN UINTN NumberOfChildren,\r
508 IN EFI_HANDLE *ChildHandleBuffer\r
509 );\r
510\r
6dcf9abc 511\r
24248368 512/**\r
513 Locate HII Database protocol and HII Font protocol.\r
514\r
515 @retval EFI_SUCCESS HII Database protocol and HII Font protocol \r
516 are located successfully.\r
517 @return other Failed to locate HII Database protocol or \r
518 HII Font protocol.\r
519\r
520**/\r
93e3992d 521EFI_STATUS\r
522EfiLocateHiiProtocol (\r
523 VOID\r
ed66e1bc 524 );\r
93e3992d 525\r
526\r
5c03ed0a 527/**\r
528 Gets Graphics Console devcie's foreground color and background color.\r
529\r
530 @param This Protocol instance pointer.\r
531 @param Foreground Returned text foreground color.\r
532 @param Background Returned text background color.\r
533\r
534 @retval EFI_SUCCESS It returned always.\r
535\r
536**/\r
537EFI_STATUS\r
538GetTextColors (\r
539 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
540 OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground,\r
541 OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background\r
542 );\r
543\r
544/**\r
545 Draw Unicode string on the Graphics Console device's screen.\r
546\r
547 @param This Protocol instance pointer.\r
548 @param UnicodeWeight One Unicode string to be displayed.\r
549 @param Count The count of Unicode string.\r
550\r
551 @retval EFI_OUT_OF_RESOURCES If no memory resource to use.\r
552 @retval EFI_UNSUPPORTED If no Graphics Output protocol and UGA Draw\r
553 protocol exist.\r
554 @retval EFI_SUCCESS Drawing Unicode string implemented successfully.\r
555\r
556**/\r
557EFI_STATUS\r
558DrawUnicodeWeightAtCursorN (\r
559 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
560 IN CHAR16 *UnicodeWeight,\r
561 IN UINTN Count\r
562 );\r
563\r
564/**\r
565 Erase the cursor on the screen.\r
566\r
567 @param This Protocol instance pointer.\r
568\r
569 @retval EFI_SUCCESS The cursor is erased successfully.\r
570\r
571**/\r
572EFI_STATUS\r
573EraseCursor (\r
574 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This\r
575 );\r
576\r
577/**\r
578 Check if the current specific mode supported the user defined resolution\r
579 for the Graphics Console device based on Graphics Output Protocol.\r
580\r
581 If yes, set the graphic device's current mode to this specific mode.\r
582 \r
583 @param GraphicsOutput Graphics Output Protocol instance pointer.\r
584 @param HorizontalResolution User defined horizontal resolution\r
585 @param VerticalResolution User defined vertical resolution.\r
586 @param CurrentModeNumber Current specific mode to be check.\r
587\r
588 @retval EFI_SUCCESS The mode is supported.\r
589 @retval EFI_UNSUPPORTED The specific mode is out of range of graphics \r
590 device supported.\r
591 @retval other The specific mode does not support user defined \r
592 resolution or failed to set the current mode to the \r
593 specific mode on graphics device.\r
594\r
595**/\r
596EFI_STATUS\r
597CheckModeSupported (\r
598 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,\r
599 IN UINT32 HorizontalResolution,\r
600 IN UINT32 VerticalResolution,\r
601 OUT UINT32 *CurrentModeNumber\r
602 );\r
603\r
95276127 604#endif\r