]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/HiiFont.h
Fix doxygen issue:
[mirror_edk2.git] / MdePkg / Include / Protocol / HiiFont.h
index 629a817240aa23c3204a526a78c73cfab62cc2c8..de2097e744fe775df8b68920d0065cba1370a6a4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The file provides services to retrieve font information.\r
   \r
-  Copyright (c) 2006 - 2007, Intel Corporation\r
+  Copyright (c) 2006 - 2008, Intel Corporation\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
 #ifndef __HII_FONT_H__\r
 #define __HII_FONT_H__\r
 \r
+#include <Protocol/GraphicsOutput.h>\r
 #include <Protocol/HiiImage.h>\r
 \r
-#error "UEFI 2.1 HII is not fully implemented for now, Please don't include this file now."\r
-\r
 #define EFI_HII_FONT_PROTOCOL_GUID \\r
 { 0xe9ca4775, 0x8657, 0x47fc, { 0x97, 0xe7, 0x7e, 0xd6, 0x5a, 0x8, 0x43, 0x24 } }\r
 \r
 typedef struct _EFI_HII_FONT_PROTOCOL EFI_HII_FONT_PROTOCOL;\r
 \r
+typedef VOID    *EFI_FONT_HANDLE;\r
 \r
 //\r
 // EFI_HII_OUT_FLAGS\r
@@ -31,8 +31,8 @@ typedef struct _EFI_HII_FONT_PROTOCOL EFI_HII_FONT_PROTOCOL;
 typedef UINT32  EFI_HII_OUT_FLAGS;\r
 #define EFI_HII_OUT_FLAG_CLIP         0x00000001\r
 #define EFI_HII_OUT_FLAG_WRAP         0x00000002\r
-#define EFI_HII_OUT_FLAG_CLEAN_Y      0x00000004\r
-#define EFI_HII_OUT_FLAG_CLEAN_X      0x00000008\r
+#define EFI_HII_OUT_FLAG_CLIP_CLEAN_Y 0x00000004\r
+#define EFI_HII_OUT_FLAG_CLIP_CLEAN_X 0x00000008\r
 #define EFI_HII_OUT_FLAG_TRANSPARENT  0x00000010\r
 #define EFI_HII_IGNORE_IF_NO_GLYPH    0x00000020\r
 #define EFI_HII_IGNORE_LINE_BREAK     0x00000040\r
@@ -87,9 +87,9 @@ typedef UINT32  EFI_FONT_INFO_MASK;
 // EFI_FONT_INFO\r
 // \r
 typedef struct {\r
-  UINT32  FontStyle;\r
-  UINT16  FontSize;\r
-  CHAR16  FontName[1];\r
+  EFI_HII_FONT_STYLE FontStyle;\r
+  UINT16             FontSize; // character cell height in pixels\r
+  CHAR16             FontName[1];\r
 } EFI_FONT_INFO;\r
 \r
 /**\r
@@ -145,10 +145,10 @@ typedef struct {
   \r
 **/\r
 typedef struct _EFI_FONT_DISPLAY_INFO {\r
-  EFI_FONT_INFO                 FontInfo;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL ForegroundColor;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL BackgroundColor;\r
   EFI_FONT_INFO_MASK            FontInfoMask;\r
+  EFI_FONT_INFO                 FontInfo;  \r
 } EFI_FONT_DISPLAY_INFO;\r
 \r
 /**\r
@@ -253,21 +253,20 @@ typedef struct _EFI_FONT_DISPLAY_INFO {
   @retval EFI_OUT_OF_RESOURCES  Unable to allocate an output\r
                                 buffer for RowInfoArray or Blt.\r
   \r
-  @retval EFI_INVALID_PARAMETER The String or Blt or Height or\r
-                                Width was NULL.\r
+  @retval EFI_INVALID_PARAMETER The String or Blt.\r
+  @retval EFI_INVALID_PARAMETER Flags were invalid combination..\r
 \r
-  \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_HII_STRING_TO_IMAGE) (\r
+(EFIAPI *EFI_HII_STRING_TO_IMAGE)(\r
   IN CONST  EFI_HII_FONT_PROTOCOL *This,\r
-  IN CONST  EFI_HII_OUT_FLAGS     Flags,\r
+  IN        EFI_HII_OUT_FLAGS     Flags,\r
   IN CONST  EFI_STRING            String,\r
   IN CONST  EFI_FONT_DISPLAY_INFO *StringInfo,\r
   IN OUT    EFI_IMAGE_OUTPUT      **Blt,\r
-  IN CONST  UINTN                 BltX,\r
-  IN CONST  UINTN                 BltY,\r
+  IN        UINTN                 BltX,\r
+  IN        UINTN                 BltY,\r
   OUT       EFI_HII_ROW_INFO      **RowInfoArray OPTIONAL,\r
   OUT       UINTN                 *RowInfoArraySize OPTIONAL,\r
   OUT       UINTN                 *ColumnInfoArray OPTIONAL\r
@@ -308,7 +307,7 @@ EFI_STATUS
   EFI_HII_OUT_FLAG_CLIP_CLEAN_X is set. This flag cannot be used\r
   with EFI_HII_OUT_FLAG_CLIP_CLEAN_X. If\r
   EFI_HII_OUT_FLAG_TRANSPARENT is set, then BackgroundColor is\r
-  ignored and all off¡± pixels in the character¡¯s glyph will\r
+  ignored and all off" pixels in the character's glyph will\r
   use the pixel value from Blt. This flag cannot be used if Blt\r
   is NULL upon entry. If EFI_HII_IGNORE_IF_NO_GLYPH is set, then\r
   characters which have no glyphs are not drawn. Otherwise, they\r
@@ -388,20 +387,24 @@ EFI_STATUS
 \r
   @retval EFI_INVALID_PARAMETER The String or Blt or Height or\r
                                 Width was NULL.\r
+  @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.\r
+  @retval EFI_INVALID_PARAMETER  Flags were invalid combination.\r
+  @retval EFI_NOT_FOUND   The specified PackageList is not in the Database or the stringid is not \r
+                        in the specified PackageList. \r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_HII_STRING_ID_TO_IMAGE) (\r
+(EFIAPI *EFI_HII_STRING_ID_TO_IMAGE)(\r
   IN CONST  EFI_HII_FONT_PROTOCOL *This,\r
-  IN CONST  EFI_HII_OUT_FLAGS     Flags,\r
-  IN CONST  EFI_HII_HANDLE        PackageList,\r
-  IN CONST  EFI_STRING_ID         StringId,\r
+  IN        EFI_HII_OUT_FLAGS     Flags,\r
+  IN        EFI_HII_HANDLE        PackageList,\r
+  IN        EFI_STRING_ID         StringId,\r
   IN CONST  CHAR8                 *Language,\r
   IN CONST  EFI_FONT_DISPLAY_INFO *StringInfo       OPTIONAL,\r
   IN OUT    EFI_IMAGE_OUTPUT      **Blt,\r
-  IN CONST  UINTN                 BltX,\r
-  IN CONST  UINTN                 BltY,\r
+  IN        UINTN                 BltX,\r
+  IN        UINTN                 BltY,\r
   OUT       EFI_HII_ROW_INFO      **RowInfoArray    OPTIONAL,\r
   OUT       UINTN                 *RowInfoArraySize OPTIONAL,\r
   OUT       UINTN                 *ColumnInfoArray  OPTIONAL\r
@@ -445,7 +448,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_HII_GET_GLYPH) (\r
+(EFIAPI *EFI_HII_GET_GLYPH)(\r
   IN CONST  EFI_HII_FONT_PROTOCOL *This,\r
   IN CONST  CHAR16                Char,\r
   IN CONST  EFI_FONT_DISPLAY_INFO *StringInfo,\r
@@ -469,7 +472,8 @@ EFI_STATUS
                     to NULL if there are no more matching fonts.\r
 \r
   @param StringInfoIn Upon entry, points to the font to return\r
-                      information about.\r
+                      information about. If NULL, then the information about the system default \r
+                      font will be returned.\r
 \r
   @param StringInfoOut  Upon return, contains the matching\r
                         font's information. If NULL, then no\r
@@ -483,18 +487,19 @@ EFI_STATUS
   \r
   @retval EFI_NOT_FOUND No matching font was found.\r
   \r
-  @retval EFI_INVALID_PARAMETER FontHandle is NULL or\r
-                                StringInfoIn is NULL\r
+  @retval EFI_INVALID_PARAMETER  StringInfoIn->FontInfoMask is an invalid combination.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES   There were insufficient resources to complete the request.\r
   \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_HII_GET_FONT_INFO) (\r
+(EFIAPI *EFI_HII_GET_FONT_INFO)(\r
   IN CONST  EFI_HII_FONT_PROTOCOL *This,\r
   IN OUT    EFI_FONT_HANDLE       *FontHandle,\r
-  IN CONST  EFI_FONT_DISPLAY_INFO *StringInfoIn,\r
-  OUT       EFI_FONT_DISPLAY_INFO *StringInfoOut,\r
-  IN CONST  EFI_STRING            *String OPTIONAL\r
+  IN CONST  EFI_FONT_DISPLAY_INFO *StringInfoIn, OPTIONAL\r
+  OUT       EFI_FONT_DISPLAY_INFO **StringInfoOut,\r
+  IN CONST  EFI_STRING            String OPTIONAL\r
 );\r
 \r
 /**\r