]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
Check comments, format and fix some typo.
[mirror_edk2.git] / MdeModulePkg / Universal / Console / GraphicsConsoleDxe / GraphicsConsole.h
index 1b7ad6cff4817fed3651400e2b0188e247eb7a24..342fff8f2146ef01ae9898d0f3cddf564bb83898 100644 (file)
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef _GRAPHICS_CONSOLE_H_\r
 #define _GRAPHICS_CONSOLE_H_\r
 \r
 #ifndef _GRAPHICS_CONSOLE_H_\r
 #define _GRAPHICS_CONSOLE_H_\r
 \r
-#include <PiDxe.h>\r
+#include <Uefi.h>\r
 #include <Protocol/SimpleTextOut.h>\r
 #include <Protocol/GraphicsOutput.h>\r
 #include <Protocol/UgaDraw.h>\r
 #include <Protocol/SimpleTextOut.h>\r
 #include <Protocol/GraphicsOutput.h>\r
 #include <Protocol/UgaDraw.h>\r
@@ -38,6 +38,53 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 extern EFI_COMPONENT_NAME_PROTOCOL   gGraphicsConsoleComponentName;\r
 extern EFI_COMPONENT_NAME2_PROTOCOL  gGraphicsConsoleComponentName2;\r
 \r
 extern EFI_COMPONENT_NAME_PROTOCOL   gGraphicsConsoleComponentName;\r
 extern EFI_COMPONENT_NAME2_PROTOCOL  gGraphicsConsoleComponentName2;\r
+extern EFI_DRIVER_BINDING_PROTOCOL   gGraphicsConsoleDriverBinding;\r
+extern EFI_NARROW_GLYPH              gUsStdNarrowGlyphData[];\r
+\r
+\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
+  EFI_WIDE_GLYPH    WideGlyph;\r
+} GLYPH_UNION;\r
+\r
+//\r
+// Device Structure\r
+//\r
+#define GRAPHICS_CONSOLE_DEV_SIGNATURE  SIGNATURE_32 ('g', 's', 't', 'o')\r
+\r
+typedef struct {\r
+  UINTN   Columns;\r
+  UINTN   Rows;\r
+  INTN    DeltaX;\r
+  INTN    DeltaY;\r
+  UINT32  GopWidth;\r
+  UINT32  GopHeight;\r
+  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
+  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
+  CR (a, GRAPHICS_CONSOLE_DEV, SimpleTextOutput, GRAPHICS_CONSOLE_DEV_SIGNATURE)\r
+\r
 \r
 //\r
 // EFI Component Name Functions\r
 \r
 //\r
 // EFI Component Name Functions\r
@@ -169,84 +216,35 @@ GraphicsConsoleComponentNameGetControllerName (
   );\r
 \r
 \r
   );\r
 \r
 \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
-  EFI_WIDE_GLYPH    WideGlyph;\r
-} GLYPH_UNION;\r
-\r
-extern EFI_NARROW_GLYPH  UsStdNarrowGlyphData[];\r
-extern EFI_WIDE_GLYPH    UsStdWideGlyphData[];\r
-\r
-//\r
-// Device Structure\r
-//\r
-#define GRAPHICS_CONSOLE_DEV_SIGNATURE  EFI_SIGNATURE_32 ('g', 's', 't', 'o')\r
-\r
-typedef struct {\r
-  UINTN   Columns;\r
-  UINTN   Rows;\r
-  INTN    DeltaX;\r
-  INTN    DeltaY;\r
-  UINT32  GopWidth;\r
-  UINT32  GopHeight;\r
-  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
-  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
-  CR (a, GRAPHICS_CONSOLE_DEV, SimpleTextOutput, GRAPHICS_CONSOLE_DEV_SIGNATURE)\r
-\r
-//\r
-// Global Variables\r
-//\r
-extern EFI_DRIVER_BINDING_PROTOCOL   gGraphicsConsoleDriverBinding;\r
 \r
 \r
 /**\r
   Returns available Unicode glyphs narrow fonts(8*19 pixels) size.\r
 \r
 \r
 \r
 /**\r
   Returns available Unicode glyphs narrow fonts(8*19 pixels) size.\r
 \r
-  @return Narrow foun size.\r
+  @return Narrow font size.\r
 \r
 **/\r
 \r
 **/\r
-UINTN\r
+UINT32\r
 ReturnNarrowFontSize (\r
   VOID\r
   );\r
 \r
 /**\r
 ReturnNarrowFontSize (\r
   VOID\r
   );\r
 \r
 /**\r
+  Reset the text output device hardware and optionally run diagnostics.\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
   If ExtendedVerification is FALSE, only set display mode to mode 0.\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
   If ExtendedVerification is FALSE, only set display mode to mode 0.\r
 \r
-  @param  This                  Indicates the calling context.\r
+  @param  This                  Protocol instance pointer.\r
   @param  ExtendedVerification  Indicates that the driver may perform a more\r
                                 exhaustive verification operation of the device\r
                                 during reset.\r
 \r
   @param  ExtendedVerification  Indicates that the driver may perform a more\r
                                 exhaustive verification operation of the device\r
                                 during reset.\r
 \r
-  @return EFI_SUCCESS\r
-  @return The reset operation succeeds.\r
-  @return EFI_DEVICE_ERROR\r
-  @return The Graphics Console is not functioning correctly\r
+  @retval EFI_SUCCESS          The text output device was reset.\r
+  @retval EFI_DEVICE_ERROR     The text output device is not functioning correctly and\r
+                               could not be reset.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -440,19 +438,19 @@ GraphicsConsoleConOutEnableCursor (
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  Test to see if Graphics Console could be supported on the ControllerHandle.\r
+  Test to see if Graphics Console could be supported on the Controller.\r
 \r
   Graphics Console could be supported if Graphics Output Protocol or UGA Draw\r
 \r
   Graphics Console could be supported if Graphics Output Protocol or UGA Draw\r
-  Protocol exists on the ControllerHandle. (UGA Draw Protocol could be shipped\r
+  Protocol exists on the Controller. (UGA Draw Protocol could be skipped\r
   if PcdUgaConsumeSupport is set to FALSE.)\r
 \r
   @param  This                Protocol instance pointer.\r
   if PcdUgaConsumeSupport is set to FALSE.)\r
 \r
   @param  This                Protocol instance pointer.\r
-  @param  ControllerHandle    Handle of device to test.\r
+  @param  Controller          Handle of device to test.\r
   @param  RemainingDevicePath Optional parameter use to pick a specific child\r
                               device to start.\r
 \r
   @param  RemainingDevicePath Optional parameter use to pick a specific child\r
                               device to start.\r
 \r
-  @retval EFI_SUCCESS         This driver supports this device\r
-  @retval other               This driver does not support this device\r
+  @retval EFI_SUCCESS         This driver supports this device.\r
+  @retval other               This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -463,18 +461,19 @@ GraphicsConsoleControllerDriverSupported (
   IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
   );\r
 \r
   IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
   );\r
 \r
+\r
 /**\r
 /**\r
-  Start this driver on ControllerHandle by opening Graphics Output protocol or \r
-  UGA Draw protocol, and installing Simple Text Out protocol on ControllerHandle.\r
-  (UGA Draw protocol could be shkipped if PcdUgaConsumeSupport is set to FALSE.)\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
   @param  This                 Protocol instance pointer.\r
   \r
   @param  This                 Protocol instance pointer.\r
-  @param  ControllerHandle     Handle of device to bind driver to\r
+  @param  Controller           Handle of device to bind driver to\r
   @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
                                device to start.\r
 \r
   @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
                                device to start.\r
 \r
-  @retval EFI_SUCCESS          This driver is added to ControllerHandle\r
-  @retval other                This driver does not support this device\r
+  @retval EFI_SUCCESS          This driver is added to Controller.\r
+  @retval other                This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -486,20 +485,20 @@ GraphicsConsoleControllerDriverStart (
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  Stop this driver on ControllerHandle by removing Simple Text Out protocol \r
-  and closing the Graphics Output Protocol or UGA Draw protocol on ControllerHandle.\r
-  (UGA Draw protocol could be shkipped if PcdUgaConsumeSupport is set to FALSE.)\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
   @param  This              Protocol instance pointer.\r
   \r
 \r
   @param  This              Protocol instance pointer.\r
-  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  Controller        Handle of device to stop driver on\r
   @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
                             children is zero stop the entire bus driver.\r
   @param  ChildHandleBuffer List of Child Handles to Stop.\r
 \r
   @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
                             children is zero stop the entire bus driver.\r
   @param  ChildHandleBuffer List of Child Handles to Stop.\r
 \r
-  @retval EFI_SUCCESS       This driver is removed ControllerHandle.\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
-                            ControllerHandle.\r
+                            Controller.\r
   @retval other             This driver was not removed from this device.\r
 \r
 **/\r
   @retval other             This driver was not removed from this device.\r
 \r
 **/\r
@@ -525,8 +524,7 @@ GraphicsConsoleControllerDriverStop (
 EFI_STATUS\r
 EfiLocateHiiProtocol (\r
   VOID\r
 EFI_STATUS\r
 EfiLocateHiiProtocol (\r
   VOID\r
-  )\r
-;\r
+  );\r
 \r
 \r
 #endif\r
 \r
 \r
 #endif\r