]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Setting cursor position to (0, 0) and flushing cursor directly instead of calling...
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 27 May 2011 05:30:30 +0000 (05:30 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 27 May 2011 05:30:30 +0000 (05:30 +0000)
2. Rename the internal function name EraseCursor() to FlushCursor() to remove the confusion on this function name. And add detailed function description for it.

Signed-off-by: vanjeff
Reviewed-by: rsun3
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11710 6f19259b-4bc3-4df7-8a09-765794883524

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

index bed16ac4fa1f46c5d79bbe51fcff6244ec3364e5..bb279f985027e1cdc5c37b485b11ea604cce86da 100644 (file)
@@ -815,7 +815,7 @@ GraphicsConsoleConOutOutputString (
   //\r
   GetTextColors (This, &Foreground, &Background);\r
 \r
-  EraseCursor (This);\r
+  FlushCursor (This);\r
 \r
   Warning = FALSE;\r
 \r
@@ -835,7 +835,7 @@ GraphicsConsoleConOutOutputString (
         This->Mode->CursorRow--;\r
         This->Mode->CursorColumn = (INT32) (MaxColumn - 1);\r
         This->OutputString (This, SpaceStr);\r
-        EraseCursor (This);\r
+        FlushCursor (This);\r
         This->Mode->CursorRow--;\r
         This->Mode->CursorColumn = (INT32) (MaxColumn - 1);\r
       } else if (This->Mode->CursorColumn > 0) {\r
@@ -845,7 +845,7 @@ GraphicsConsoleConOutOutputString (
         //\r
         This->Mode->CursorColumn--;\r
         This->OutputString (This, SpaceStr);\r
-        EraseCursor (This);\r
+        FlushCursor (This);\r
         This->Mode->CursorColumn--;\r
       }\r
 \r
@@ -1004,16 +1004,16 @@ GraphicsConsoleConOutOutputString (
       }\r
 \r
       if (This->Mode->CursorColumn >= (INT32) MaxColumn) {\r
-        EraseCursor (This);\r
+        FlushCursor (This);\r
         This->OutputString (This, mCrLfString);\r
-        EraseCursor (This);\r
+        FlushCursor (This);\r
       }\r
     }\r
   }\r
 \r
   This->Mode->Attribute = OriginAttribute;\r
 \r
-  EraseCursor (This);\r
+  FlushCursor (This);\r
 \r
   if (Warning) {\r
     Status = EFI_WARN_UNKNOWN_GLYPH;\r
@@ -1222,7 +1222,7 @@ GraphicsConsoleConOutSetMode (
     // Otherwise, the size of the text console and/or the GOP/UGA mode will be changed,\r
     // so erase the cursor, and free the LineBuffer for the current mode\r
     //\r
-    EraseCursor (This);\r
+    FlushCursor (This);\r
 \r
     FreePool (Private->LineBuffer);\r
   }\r
@@ -1313,9 +1313,12 @@ GraphicsConsoleConOutSetMode (
   This->Mode->Mode = (INT32) ModeNumber;\r
 \r
   //\r
-  // Move the text cursor to the upper left hand corner of the display and enable it\r
+  // Move the text cursor to the upper left hand corner of the display and flush it\r
   //\r
-  This->SetCursorPosition (This, 0, 0);\r
+  This->Mode->CursorColumn  = 0;\r
+  This->Mode->CursorRow     = 0;\r
+\r
+  FlushCursor (This);  \r
 \r
   Status = EFI_SUCCESS;\r
 \r
@@ -1360,11 +1363,11 @@ GraphicsConsoleConOutSetAttribute (
 \r
   OldTpl = gBS->RaiseTPL (TPL_NOTIFY);\r
 \r
-  EraseCursor (This);\r
+  FlushCursor (This);\r
 \r
   This->Mode->Attribute = (INT32) Attribute;\r
 \r
-  EraseCursor (This);\r
+  FlushCursor (This);\r
 \r
   gBS->RestoreTPL (OldTpl);\r
 \r
@@ -1441,7 +1444,7 @@ GraphicsConsoleConOutClearScreen (
   This->Mode->CursorColumn  = 0;\r
   This->Mode->CursorRow     = 0;\r
 \r
-  EraseCursor (This);\r
+  FlushCursor (This);\r
 \r
   gBS->RestoreTPL (OldTpl);\r
 \r
@@ -1498,12 +1501,12 @@ GraphicsConsoleConOutSetCursorPosition (
     goto Done;\r
   }\r
 \r
-  EraseCursor (This);\r
+  FlushCursor (This);\r
 \r
   This->Mode->CursorColumn  = (INT32) Column;\r
   This->Mode->CursorRow     = (INT32) Row;\r
 \r
-  EraseCursor (This);\r
+  FlushCursor (This);\r
 \r
 Done:\r
   gBS->RestoreTPL (OldTpl);\r
@@ -1535,11 +1538,11 @@ GraphicsConsoleConOutEnableCursor (
 \r
   OldTpl = gBS->RaiseTPL (TPL_NOTIFY);\r
 \r
-  EraseCursor (This);\r
+  FlushCursor (This);\r
 \r
   This->Mode->CursorVisible = Visible;\r
 \r
-  EraseCursor (This);\r
+  FlushCursor (This);\r
 \r
   gBS->RestoreTPL (OldTpl);\r
   return EFI_SUCCESS;\r
@@ -1724,7 +1727,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
@@ -1732,7 +1740,7 @@ DrawUnicodeWeightAtCursorN (
 \r
 **/\r
 EFI_STATUS\r
-EraseCursor (\r
+FlushCursor (\r
   IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This\r
   )\r
 {\r
index 24285a9adbba6834c4d455f0491842f6e601c257..7c8ea9116c66d1eda7037b7593b923b15364ee26 100644 (file)
@@ -561,7 +561,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
@@ -569,7 +574,7 @@ DrawUnicodeWeightAtCursorN (
 \r
 **/\r
 EFI_STATUS\r
-EraseCursor (\r
+FlushCursor (\r
   IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This\r
   );\r
 \r