]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / Console / GraphicsConsoleDxe / GraphicsConsole.h
index 2922e174870213aac88562f713ed78240201914c..be43f2afc8e3c1d19f17ba6d81d06512ff828065 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Header file for GraphicsConsole driver.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -42,12 +42,6 @@ extern EFI_DRIVER_BINDING_PROTOCOL   gGraphicsConsoleDriverBinding;
 extern EFI_NARROW_GLYPH              gUsStdNarrowGlyphData[];\r
 \r
 extern UINT32 mNarrowFontSize;\r
-//\r
-// User can define valid graphic resolution here\r
-// e.g. 640x480, 800x600, 1024x768...\r
-//\r
-#define CURRENT_HORIZONTAL_RESOLUTION  800\r
-#define CURRENT_VERTICAL_RESOLUTION    600\r
 \r
 typedef union {\r
   EFI_NARROW_GLYPH  NarrowGlyph;\r
@@ -69,17 +63,14 @@ typedef struct {
   UINT32  GopModeNumber;\r
 } GRAPHICS_CONSOLE_MODE_DATA;\r
 \r
-#define GRAPHICS_MAX_MODE 4\r
-\r
 typedef struct {\r
   UINTN                            Signature;\r
   EFI_GRAPHICS_OUTPUT_PROTOCOL     *GraphicsOutput;\r
   EFI_UGA_DRAW_PROTOCOL            *UgaDraw;\r
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  SimpleTextOutput;\r
   EFI_SIMPLE_TEXT_OUTPUT_MODE      SimpleTextOutputMode;\r
-  GRAPHICS_CONSOLE_MODE_DATA       ModeData[GRAPHICS_MAX_MODE];\r
+  GRAPHICS_CONSOLE_MODE_DATA       *ModeData;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *LineBuffer;\r
-  EFI_HII_HANDLE                   HiiHandle;\r
 } GRAPHICS_CONSOLE_DEV;\r
 \r
 #define GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS(a) \\r
@@ -109,7 +100,7 @@ typedef struct {
                                 languages specified in SupportedLanguages. The\r
                                 number of languages supported by a driver is up\r
                                 to the driver writer. Language is specified\r
-                                in RFC 3066 or ISO 639-2 language code format.\r
+                                in RFC 4646 or ISO 639-2 language code format.\r
 \r
   @param  DriverName[out]       A pointer to the Unicode string to return.\r
                                 This Unicode string is the name of the\r
@@ -174,7 +165,7 @@ GraphicsConsoleComponentNameGetDriverName (
                                 languages specified in SupportedLanguages. The\r
                                 number of languages supported by a driver is up\r
                                 to the driver writer. Language is specified in\r
-                                RFC 3066 or ISO 639-2 language code format.\r
+                                RFC 4646 or ISO 639-2 language code format.\r
 \r
   @param  ControllerName[out]   A pointer to the Unicode string to return.\r
                                 This Unicode string is the name of the\r
@@ -188,7 +179,7 @@ GraphicsConsoleComponentNameGetDriverName (
                                 driver specified by This was returned in\r
                                 DriverName.\r
 \r
-  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
 \r
   @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
                                 EFI_HANDLE.\r
@@ -218,7 +209,7 @@ GraphicsConsoleComponentNameGetControllerName (
 \r
 /**\r
   Reset the text output device hardware and optionally run diagnostics.\r
-  \r
+\r
   Implements SIMPLE_TEXT_OUTPUT.Reset().\r
   If ExtendeVerification is TRUE, then perform dependent Graphics Console\r
   device reset, and set display mode to mode 0.\r
@@ -244,7 +235,7 @@ GraphicsConsoleConOutReset (
 /**\r
   Write a Unicode string to the output device.\r
 \r
-  Implements SIMPLE_TEXT_OUTPUT.OutputString(). \r
+  Implements SIMPLE_TEXT_OUTPUT.OutputString().\r
   The Unicode string will be converted to Glyphs and will be\r
   sent to the Graphics Console.\r
 \r
@@ -271,7 +262,7 @@ GraphicsConsoleConOutOutputString (
   );\r
 \r
 /**\r
-  Verifies that all characters in a Unicode string can be output to the \r
+  Verifies that all characters in a Unicode string can be output to the\r
   target device.\r
 \r
   Implements SIMPLE_TEXT_OUTPUT.TestString().\r
@@ -325,7 +316,7 @@ GraphicsConsoleConOutQueryMode (
 \r
 /**\r
   Sets the output device(s) to a specified mode.\r
-  \r
+\r
   Implements SIMPLE_TEXT_OUTPUT.SetMode().\r
   Set the Graphics Console to a specified mode. In this driver, we only support mode 0.\r
 \r
@@ -333,7 +324,7 @@ GraphicsConsoleConOutQueryMode (
   @param  ModeNumber            The text mode to set.\r
 \r
   @retval EFI_SUCCESS           The requested text mode is set.\r
-  @retval EFI_DEVICE_ERROR      The requested text mode cannot be set because of \r
+  @retval EFI_DEVICE_ERROR      The requested text mode cannot be set because of\r
                                 Graphics Console device error.\r
   @retval EFI_UNSUPPORTED       The text mode number is not valid.\r
 \r
@@ -353,7 +344,7 @@ GraphicsConsoleConOutSetMode (
 \r
   @param  This                  Protocol instance pointer.\r
   @param  Attribute             The attribute to set. Bits 0..3 are the foreground\r
-                                color, and bits 4..6 are the background color. \r
+                                color, and bits 4..6 are the background color.\r
                                 All other bits are undefined and must be zero.\r
 \r
   @retval EFI_SUCCESS           The requested attribute is set.\r
@@ -369,7 +360,7 @@ GraphicsConsoleConOutSetAttribute (
   );\r
 \r
 /**\r
-  Clears the output device(s) display to the currently selected background \r
+  Clears the output device(s) display to the currently selected background\r
   color.\r
 \r
   Implements SIMPLE_TEXT_OUTPUT.ClearScreen().\r
@@ -460,10 +451,10 @@ GraphicsConsoleControllerDriverSupported (
 \r
 \r
 /**\r
-  Start this driver on Controller by opening Graphics Output protocol or \r
+  Start this driver on Controller by opening Graphics Output protocol or\r
   UGA Draw protocol, and installing Simple Text Out protocol on Controller.\r
   (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)\r
-  \r
+\r
   @param  This                 Protocol instance pointer.\r
   @param  Controller           Handle of device to bind driver to\r
   @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
@@ -482,10 +473,10 @@ GraphicsConsoleControllerDriverStart (
   );\r
 \r
 /**\r
-  Stop this driver on Controller by removing Simple Text Out protocol \r
+  Stop this driver on Controller by removing Simple Text Out protocol\r
   and closing the Graphics Output Protocol or UGA Draw protocol on Controller.\r
   (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)\r
-  \r
+\r
 \r
   @param  This              Protocol instance pointer.\r
   @param  Controller        Handle of device to stop driver on\r
@@ -494,7 +485,7 @@ GraphicsConsoleControllerDriverStart (
   @param  ChildHandleBuffer List of Child Handles to Stop.\r
 \r
   @retval EFI_SUCCESS       This driver is removed Controller.\r
-  @retval EFI_NOT_STARTED   Simple Text Out protocol could not be found the \r
+  @retval EFI_NOT_STARTED   Simple Text Out protocol could not be found the\r
                             Controller.\r
   @retval other             This driver was not removed from this device.\r
 \r
@@ -512,9 +503,9 @@ GraphicsConsoleControllerDriverStop (
 /**\r
   Locate HII Database protocol and HII Font protocol.\r
 \r
-  @retval  EFI_SUCCESS     HII Database protocol and HII Font protocol \r
+  @retval  EFI_SUCCESS     HII Database protocol and HII Font protocol\r
                            are located successfully.\r
-  @return  other           Failed to locate HII Database protocol or \r
+  @return  other           Failed to locate HII Database protocol or\r
                            HII Font protocol.\r
 \r
 **/\r
@@ -562,7 +553,12 @@ DrawUnicodeWeightAtCursorN (
   );\r
 \r
 /**\r
-  Erase the cursor on the screen.\r
+  Flush the cursor on the screen.\r
+\r
+  If CursorVisible is FALSE, nothing to do and return directly.\r
+  If CursorVisible is TRUE,\r
+     i) If the cursor shows on screen, it will be erased.\r
+    ii) If the cursor does not show on screen, it will be shown.\r
 \r
   @param  This                  Protocol instance pointer.\r
 \r
@@ -570,7 +566,7 @@ DrawUnicodeWeightAtCursorN (
 \r
 **/\r
 EFI_STATUS\r
-EraseCursor (\r
+FlushCursor (\r
   IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This\r
   );\r
 \r
@@ -579,17 +575,17 @@ EraseCursor (
   for the Graphics Console device based on Graphics Output Protocol.\r
 \r
   If yes, set the graphic device's current mode to this specific mode.\r
-  \r
+\r
   @param  GraphicsOutput        Graphics Output Protocol instance pointer.\r
   @param  HorizontalResolution  User defined horizontal resolution\r
   @param  VerticalResolution    User defined vertical resolution.\r
   @param  CurrentModeNumber     Current specific mode to be check.\r
 \r
   @retval EFI_SUCCESS       The mode is supported.\r
-  @retval EFI_UNSUPPORTED   The specific mode is out of range of graphics \r
+  @retval EFI_UNSUPPORTED   The specific mode is out of range of graphics\r
                             device supported.\r
-  @retval other             The specific mode does not support user defined \r
-                            resolution or failed to set the current mode to the \r
+  @retval other             The specific mode does not support user defined\r
+                            resolution or failed to set the current mode to the\r
                             specific mode on graphics device.\r
 \r
 **/\r