]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Fonts.c
clean up for IPF ICC tool chain.
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / FrameworkHiiToUefiHiiThunk / Fonts.c
index 236029671b98e9c0a32707585803ab997ca163dc..27b5d95fbd798123938d432b94f9cbe3e8b39957 100644 (file)
@@ -22,20 +22,31 @@ EFI_GRAPHICS_OUTPUT_BLT_PIXEL   mSysFGColor = {0};
 \r
 \r
 /**\r
-  This function is only called by Graphics Console module and GraphicsLib. \r
-  EDK II provides a UEFI Graphics Console module. ECP provides a GraphicsLib \r
-  complying to UEFI HII.\r
+  Translates a Unicode character into the corresponding font glyph.\r
   \r
-  This function will ASSERT and return EFI_UNSUPPORTED.\r
-\r
-  @param This            N.A.\r
-  @param Source          N.A.\r
-  @param Index           N.A.\r
-  @param GlyphBuffer     N.A.\r
-  @param BitWidth        N.A.\r
-  @param InternalStatus  N.A.\r
-\r
-  @return EFI_UNSUPPORTED N.A.\r
+  Notes:\r
+    This function is only called by Graphics Console module and GraphicsLib. \r
+    Wrap the Framework HII GetGlyph function to UEFI Font Protocol.\r
+    \r
+    EDK II provides a UEFI Graphics Console module. ECP provides a GraphicsLib \r
+    complying to UEFI HII.\r
+  \r
+  @param This            A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param Source          A pointer to a Unicode string.\r
+  @param Index           On input, the offset into the string from which to fetch the character. On successful completion, the \r
+                         index is updated to the first character past the character(s) making up the just extracted glyph. \r
+  @param GlyphBuffer     Pointer to an array where the glyphs corresponding to the characters in the source may be stored. \r
+                         GlyphBuffer is assumed to be wide enough to accept a wide glyph character.\r
+  @param BitWidth        If EFI_SUCCESS was returned, the UINT16 pointed to by this value is filled with the length of the glyph in pixels. \r
+                         It is unchanged if the call was unsuccessful.\r
+  @param InternalStatus  To save the time required to read the string from the beginning on each glyph extraction \r
+                         (for example, to ensure that the narrow versus wide glyph mode is correct), this value is \r
+                         updated each time the function is called with the status that is local to the call. The cell pointed \r
+                         to by this parameter must be initialized to zero prior to invoking the call the first time for any string.\r
+\r
+  @retval EFI_SUCCESS     It worked.\r
+  @retval EFI_NOT_FOUND   A glyph for a character was not found.\r
\r
 \r
 **/\r
 EFI_STATUS\r
@@ -98,7 +109,7 @@ HiiGetGlyph (
       for (Ypos = 0; Ypos < EFI_GLYPH_HEIGHT; Ypos++) {\r
         for (Xpos = 0; Xpos < EFI_GLYPH_WIDTH; Xpos++) {\r
           if (CompareMem (&Blt->Image.Bitmap[Ypos * EFI_GLYPH_WIDTH + Xpos], &mSysFGColor, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)) == 0) {\r
-            mNarrowGlyphBuffer.GlyphCol1[Ypos] |= 1 << (EFI_GLYPH_WIDTH - 1 - Xpos);\r
+            mNarrowGlyphBuffer.GlyphCol1[Ypos] = (UINT8) (mNarrowGlyphBuffer.GlyphCol1[Ypos] | (1 << (EFI_GLYPH_WIDTH - 1 - Xpos)));\r
           }\r
         }\r
       }\r
@@ -122,22 +133,25 @@ HiiGetGlyph (
 }\r
 \r
 /**\r
+  Translates a glyph into the format required for input to the Universal Graphics Adapter (UGA) Block Transfer (BLT) routines.\r
+  \r
+  Notes:\r
   This function is only called by Graphics Console module and GraphicsLib. \r
   EDK II provides a UEFI Graphics Console module. ECP provides a GraphicsLib \r
   complying to UEFI HII.\r
   \r
-  This function will ASSERT and return EFI_UNSUPPORTED.\r
-\r
-  @param This            N.A.\r
-  @param GlyphBuffer     N.A.\r
-  @param Foreground      N.A.\r
-  @param Background      N.A.\r
-  @param Count           N.A.\r
-  @param Width           N.A.\r
-  @param Height          N.A.\r
-  @param BltBuffer       N.A.\r
-\r
-  @return EFI_UNSUPPORTED N.A.\r
+  @param This         A pointer to the EFI_HII_PROTOCOL instance.\r
+  @param GlyphBuffer  A pointer to the buffer that contains glyph data. \r
+  @param Foreground   The foreground setting requested to be used for the generated BltBuffer data. Type EFI_UGA_PIXEL is defined in "Related Definitions" below.\r
+  @param Background   The background setting requested to be used for the generated BltBuffer data. \r
+  @param Count        The entry in the BltBuffer upon which to act.\r
+  @param Width        The width in bits of the glyph being converted.\r
+  @param Height       The height in bits of the glyph being converted\r
+  @param BltBuffer    A pointer to the buffer that contains the data that is ready to be used by the UGA BLT routines. \r
+\r
+  @retval EFI_SUCCESS  It worked.\r
+  @retval EFI_NOT_FOUND A glyph for a character was not found.\r
\r
 \r
 **/\r
 EFI_STATUS\r