]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
Clean codes per ECC for GraphicsConsoleDxe module.
[mirror_edk2.git] / MdeModulePkg / Universal / Console / GraphicsConsoleDxe / GraphicsConsole.h
index 84ca770c671e3ef9d5b97833d129f55bad247f07..00157e94920de65b99e5485e6d85f2d2a3c2cdc6 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for GraphicsConsole driver.\r
 \r
-Copyright (c) 2006, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
 All rights reserved. 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
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#ifndef _GRAPHICS_CONSOLE_H\r
-#define _GRAPHICS_CONSOLE_H\r
+#ifndef _GRAPHICS_CONSOLE_H_\r
+#define _GRAPHICS_CONSOLE_H_\r
 \r
 #include <PiDxe.h>\r
 #include <Protocol/SimpleTextOut.h>\r
@@ -228,11 +228,23 @@ ReturnNarrowFontSize (
   VOID\r
   );\r
 \r
-UINTN\r
-ReturnWideFontSize (\r
-  VOID\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
+  If ExtendedVerification is FALSE, only set display mode to mode 0.\r
+\r
+  @param  This                  Indicates the calling context.\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
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleConOutReset (\r
@@ -240,6 +252,24 @@ GraphicsConsoleConOutReset (
   IN  BOOLEAN                            ExtendedVerification\r
   );\r
 \r
+/**\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
+  @param  This                  Indicates the calling context.\r
+  @param  WString               The Null-terminated Unicode string to be displayed\r
+                                on the Graphics Console.\r
+\r
+  @return EFI_SUCCESS\r
+  @return The string is output successfully.\r
+  @return EFI_DEVICE_ERROR\r
+  @return The Graphics Console failed to send the string out.\r
+  @return EFI_WARN_UNKNOWN_GLYPH\r
+  @return Indicates that some of the characters in the Unicode string could not\r
+  @return be rendered and are skipped.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleConOutOutputString (\r
@@ -247,6 +277,22 @@ GraphicsConsoleConOutOutputString (
   IN  CHAR16                           *WString\r
   );\r
 \r
+/**\r
+  Implements SIMPLE_TEXT_OUTPUT.TestString().\r
+  If one of the characters in the *Wstring is\r
+  neither valid valid Unicode drawing characters,\r
+  not ASCII code, then this function will return\r
+  EFI_UNSUPPORTED.\r
+\r
+  @param  This                  Indicates the calling context.\r
+  @param  WString               The Null-terminated Unicode string to be tested.\r
+\r
+  @return EFI_SUCCESS\r
+  @return The Graphics Console is capable of rendering the output string.\r
+  @return EFI_UNSUPPORTED\r
+  @return Some of the characters in the Unicode string cannot be rendered.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleConOutTestString (\r
@@ -254,6 +300,24 @@ GraphicsConsoleConOutTestString (
   IN  CHAR16                           *WString\r
   );\r
 \r
+/**\r
+  Implements SIMPLE_TEXT_OUTPUT.QueryMode().\r
+  It returnes information for an available text mode\r
+  that the Graphics Console supports.\r
+  In this driver,we only support text mode 80x25, which is\r
+  defined as mode 0.\r
+\r
+  @param  This                  Indicates the calling context.\r
+  @param  ModeNumber            The mode number to return information on.\r
+  @param  Columns               The returned columns of the requested mode.\r
+  @param  Rows                  The returned rows of the requested mode.\r
+\r
+  @return EFI_SUCCESS\r
+  @return The requested mode information is returned.\r
+  @return EFI_UNSUPPORTED\r
+  @return The mode number is not valid.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleConOutQueryMode (\r
@@ -263,6 +327,22 @@ GraphicsConsoleConOutQueryMode (
   OUT UINTN                            *Rows\r
   );\r
 \r
+/**\r
+  Implements SIMPLE_TEXT_OUTPUT.SetMode().\r
+  Set the Graphics Console to a specified mode.\r
+  In this driver, we only support mode 0.\r
+\r
+  @param  This                  Indicates the calling context.\r
+  @param  ModeNumber            The text mode to set.\r
+\r
+  @return EFI_SUCCESS\r
+  @return The requested text mode is set.\r
+  @return EFI_DEVICE_ERROR\r
+  @return The requested text mode cannot be set because of Graphics Console device error.\r
+  @return EFI_UNSUPPORTED\r
+  @return The text mode number is not valid.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleConOutSetMode (\r
@@ -270,6 +350,18 @@ GraphicsConsoleConOutSetMode (
   IN  UINTN                            ModeNumber\r
   );\r
 \r
+/**\r
+  Implements SIMPLE_TEXT_OUTPUT.SetAttribute().\r
+\r
+  @param  This                  Indicates the calling context.\r
+  @param  Attribute             The attribute to set. Only bit0..6 are valid, all\r
+                                other bits are undefined and must be zero.\r
+\r
+  @return EFI_SUCCESS           The requested attribute is set.\r
+  @return EFI_DEVICE_ERROR      The requested attribute cannot be set due to Graphics Console port error.\r
+  @return EFI_UNSUPPORTED       The attribute requested is not defined by EFI spec.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleConOutSetAttribute (\r
@@ -277,12 +369,43 @@ GraphicsConsoleConOutSetAttribute (
   IN  UINTN                            Attribute\r
   );\r
 \r
+/**\r
+  Implements SIMPLE_TEXT_OUTPUT.ClearScreen().\r
+  It clears the Graphics Console's display to the\r
+  currently selected background color.\r
+\r
+  @param  This                  Indicates the calling context.\r
+\r
+  @return EFI_SUCCESS\r
+  @return The operation completed successfully.\r
+  @return EFI_DEVICE_ERROR\r
+  @return The Graphics Console cannot be cleared due to Graphics Console device error.\r
+  @return EFI_UNSUPPORTED\r
+  @return The Graphics Console is not in a valid text mode.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleConOutClearScreen (\r
   IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This\r
   );\r
 \r
+/**\r
+  Implements SIMPLE_TEXT_OUTPUT.SetCursorPosition().\r
+\r
+  @param  This                  Indicates the calling context.\r
+  @param  Column                The row to set cursor to.\r
+  @param  Row                   The column to set cursor to.\r
+\r
+  @return EFI_SUCCESS\r
+  @return The operation completed successfully.\r
+  @return EFI_DEVICE_ERROR\r
+  @return The request fails due to Graphics Console device error.\r
+  @return EFI_UNSUPPORTED\r
+  @return The Graphics Console is not in a valid text mode, or the cursor position\r
+  @return is invalid for current mode.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleConOutSetCursorPosition (\r
@@ -291,6 +414,20 @@ GraphicsConsoleConOutSetCursorPosition (
   IN  UINTN                            Row\r
   );\r
 \r
+/**\r
+  Implements SIMPLE_TEXT_OUTPUT.EnableCursor().\r
+  In this driver, the cursor cannot be hidden.\r
+\r
+  @param  This                  Indicates the calling context.\r
+  @param  Visible               If TRUE, the cursor is set to be visible, If FALSE,\r
+                                the cursor is set to be invisible.\r
+\r
+  @return EFI_SUCCESS\r
+  @return The request is valid.\r
+  @return EFI_UNSUPPORTED\r
+  @return The Graphics Console does not support a hidden cursor.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleConOutEnableCursor (\r
@@ -323,6 +460,7 @@ GraphicsConsoleControllerDriverStop (
   IN  EFI_HANDLE                     *ChildHandleBuffer\r
   );\r
 \r
+\r
 EFI_STATUS\r
 EfiLocateHiiProtocol (\r
   VOID\r