]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Code scrub for GraphicConsoleDxe Module.
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 4 Jan 2009 09:36:31 +0000 (09:36 +0000)
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 4 Jan 2009 09:36:31 +0000 (09:36 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7179 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h

index 2fe6dc02dae7578fd8aebe115c5ad272bd27025d..dc06160067fc03fd91c5d2670d9ab32fb982f96c 100644 (file)
@@ -98,84 +98,6 @@ EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding = {
   NULL\r
 };\r
 \r
-/**\r
-  Gets Graphics Console devcie's foreground color and background color.\r
-\r
-  @param  This                  Protocol instance pointer.\r
-  @param  Foreground            Returned text foreground color.\r
-  @param  Background            Returned text background color.\r
-\r
-  @retval EFI_SUCCESS           It returned always.\r
-\r
-**/\r
-EFI_STATUS\r
-GetTextColors (\r
-  IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This,\r
-  OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Foreground,\r
-  OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Background\r
-  );\r
-\r
-/**\r
-  Draw Unicode string on the Graphics Console device's screen.\r
-\r
-  @param  This                  Protocol instance pointer.\r
-  @param  UnicodeWeight         One Unicode string to be displayed.\r
-  @param  Count                 The count of Unicode string.\r
-\r
-  @retval EFI_OUT_OF_RESOURCES  If no memory resource to use.\r
-  @retval EFI_UNSUPPORTED       If no Graphics Output protocol and UGA Draw\r
-                                protocol exist.\r
-  @retval EFI_SUCCESS           Drawing Unicode string implemented successfully.\r
-\r
-**/\r
-EFI_STATUS\r
-DrawUnicodeWeightAtCursorN (\r
-  IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This,\r
-  IN  CHAR16                           *UnicodeWeight,\r
-  IN  UINTN                            Count\r
-  );\r
-\r
-/**\r
-  Erase the cursor on the screen.\r
-\r
-  @param  This                  Protocol instance pointer.\r
-\r
-  @retval EFI_SUCCESS           The cursor is erased successfully.\r
-\r
-**/\r
-EFI_STATUS\r
-EraseCursor (\r
-  IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This\r
-  );\r
-\r
-/**\r
-  Check if the current specific mode supported the user defined resolution\r
-  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
-  @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
-                            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
-                            specific mode on graphics device.\r
-\r
-**/\r
-EFI_STATUS\r
-CheckModeSupported (\r
-  EFI_GRAPHICS_OUTPUT_PROTOCOL  *GraphicsOutput,\r
-  IN  UINT32  HorizontalResolution,\r
-  IN  UINT32  VerticalResolution,\r
-  OUT UINT32  *CurrentModeNumber\r
-  );\r
-\r
-\r
 /**\r
   Test to see if Graphics Console could be supported on the Controller.\r
 \r
@@ -1170,7 +1092,7 @@ GraphicsConsoleConOutOutputString (
   Verifies that all characters in a Unicode string can be output to the \r
   target device.\r
 \r
-  Implements SIMPLE_TEXT_OUTPUT.QueryMode().\r
+  Implements SIMPLE_TEXT_OUTPUT.TestString().\r
   If one of the characters in the *Wstring is neither valid valid Unicode\r
   drawing characters, not ASCII code, then this function will return\r
   EFI_UNSUPPORTED\r
index 342fff8f2146ef01ae9898d0f3cddf564bb83898..6306a2b7bb105e13767400db9a04634cc12c9ce4 100644 (file)
@@ -284,19 +284,22 @@ GraphicsConsoleConOutOutputString (
   );\r
 \r
 /**\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
-  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
+  If one of the characters in the *Wstring is neither valid valid Unicode\r
+  drawing characters, 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
+  @param  This    Protocol instance pointer.\r
+  @param  WString The NULL-terminated Unicode string to be examined for the output\r
+                  device(s).\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
+  @retval EFI_SUCCESS      The device(s) are capable of rendering the output string.\r
+  @retval EFI_UNSUPPORTED  Some of the characters in the Unicode string cannot be\r
+                           rendered by one or more of the output devices mapped\r
+                           by the EFI handle.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -356,15 +359,19 @@ GraphicsConsoleConOutSetMode (
   );\r
 \r
 /**\r
+  Sets the background and foreground colors for the OutputString () and\r
+  ClearScreen () functions.\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
+  @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
+                                All 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
+  @retval EFI_SUCCESS           The requested attribute is set.\r
+  @retval EFI_DEVICE_ERROR      The requested attribute cannot be set due to Graphics Console port error.\r
+  @retval EFI_UNSUPPORTED       The attribute requested is not defined.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -394,19 +401,22 @@ GraphicsConsoleConOutClearScreen (
   );\r
 \r
 /**\r
+  Sets the current coordinates of the cursor position.\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
+  @param  This        Protocol instance pointer.\r
+  @param  Column      The position to set the cursor to. Must be greater than or\r
+                      equal to zero and less than the number of columns and rows\r
+                      by QueryMode ().\r
+  @param  Row         The position to set the cursor to. Must be greater than or\r
+                      equal to zero and less than the number of columns and rows\r
+                      by QueryMode ().\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
+  @retval EFI_SUCCESS      The operation completed successfully.\r
+  @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.\r
+  @retval EFI_UNSUPPORTED  The output device is not in a valid text mode, or the\r
+                           cursor position is invalid for the current mode.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -527,4 +537,81 @@ EfiLocateHiiProtocol (
   );\r
 \r
 \r
+/**\r
+  Gets Graphics Console devcie's foreground color and background color.\r
+\r
+  @param  This                  Protocol instance pointer.\r
+  @param  Foreground            Returned text foreground color.\r
+  @param  Background            Returned text background color.\r
+\r
+  @retval EFI_SUCCESS           It returned always.\r
+\r
+**/\r
+EFI_STATUS\r
+GetTextColors (\r
+  IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This,\r
+  OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Foreground,\r
+  OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Background\r
+  );\r
+\r
+/**\r
+  Draw Unicode string on the Graphics Console device's screen.\r
+\r
+  @param  This                  Protocol instance pointer.\r
+  @param  UnicodeWeight         One Unicode string to be displayed.\r
+  @param  Count                 The count of Unicode string.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES  If no memory resource to use.\r
+  @retval EFI_UNSUPPORTED       If no Graphics Output protocol and UGA Draw\r
+                                protocol exist.\r
+  @retval EFI_SUCCESS           Drawing Unicode string implemented successfully.\r
+\r
+**/\r
+EFI_STATUS\r
+DrawUnicodeWeightAtCursorN (\r
+  IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This,\r
+  IN  CHAR16                           *UnicodeWeight,\r
+  IN  UINTN                            Count\r
+  );\r
+\r
+/**\r
+  Erase the cursor on the screen.\r
+\r
+  @param  This                  Protocol instance pointer.\r
+\r
+  @retval EFI_SUCCESS           The cursor is erased successfully.\r
+\r
+**/\r
+EFI_STATUS\r
+EraseCursor (\r
+  IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This\r
+  );\r
+\r
+/**\r
+  Check if the current specific mode supported the user defined resolution\r
+  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
+  @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
+                            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
+                            specific mode on graphics device.\r
+\r
+**/\r
+EFI_STATUS\r
+CheckModeSupported (\r
+  EFI_GRAPHICS_OUTPUT_PROTOCOL  *GraphicsOutput,\r
+  IN  UINT32  HorizontalResolution,\r
+  IN  UINT32  VerticalResolution,\r
+  OUT UINT32  *CurrentModeNumber\r
+  );\r
+\r
 #endif\r