]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/HiiFont.h
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Include / Protocol / HiiFont.h
index ca2d454465e6ab0e2b707e831d226bc13acd2565..596e1011b33557d23b2db854c8c2544deaea9120 100644 (file)
@@ -1,14 +1,11 @@
 /** @file\r
   The file provides services to retrieve font information.\r
-  \r
-Copyright (c) 2006 - 2010, Intel Corporation.  All rights reserved<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
-The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+  @par Revision Reference:\r
+  This Protocol was introduced in UEFI Specification 2.1.\r
 \r
 **/\r
 \r
@@ -23,21 +20,21 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 typedef struct _EFI_HII_FONT_PROTOCOL EFI_HII_FONT_PROTOCOL;\r
 \r
-typedef VOID    *EFI_FONT_HANDLE;\r
+typedef VOID *EFI_FONT_HANDLE;\r
 \r
 ///\r
 /// EFI_HII_OUT_FLAGS.\r
-/// \r
-typedef UINT32  EFI_HII_OUT_FLAGS;\r
-\r
-#define EFI_HII_OUT_FLAG_CLIP         0x00000001\r
-#define EFI_HII_OUT_FLAG_WRAP         0x00000002\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
-#define EFI_HII_DIRECT_TO_SCREEN      0x00000080\r
+///\r
+typedef UINT32 EFI_HII_OUT_FLAGS;\r
+\r
+#define EFI_HII_OUT_FLAG_CLIP          0x00000001\r
+#define EFI_HII_OUT_FLAG_WRAP          0x00000002\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
+#define EFI_HII_DIRECT_TO_SCREEN       0x00000080\r
 \r
 /**\r
   Definition of EFI_HII_ROW_INFO.\r
@@ -46,26 +43,26 @@ typedef struct _EFI_HII_ROW_INFO {
   ///\r
   /// The index of the first character in the string which is displayed on the line.\r
   ///\r
-  UINTN   StartIndex;\r
+  UINTN    StartIndex;\r
   ///\r
   /// The index of the last character in the string which is displayed on the line.\r
-  /// If this is the same as StartIndex, then no characters are displayed.  \r
+  /// If this is the same as StartIndex, then no characters are displayed.\r
   ///\r
-  UINTN   EndIndex;\r
-  UINTN   LineHeight; ///< The height of the line, in pixels.\r
-  UINTN   LineWidth;  ///< The width of the text on the line, in pixels.\r
-  \r
+  UINTN    EndIndex;\r
+  UINTN    LineHeight; ///< The height of the line, in pixels.\r
+  UINTN    LineWidth;  ///< The width of the text on the line, in pixels.\r
+\r
   ///\r
-  /// The number of pixels above the bottom of the row of the font baseline or 0 if none.  \r
+  /// The font baseline offset in pixels from the bottom of the row, or 0 if none.\r
   ///\r
-  UINTN   BaselineOffset;\r
+  UINTN    BaselineOffset;\r
 } EFI_HII_ROW_INFO;\r
 \r
 ///\r
 /// Font info flag. All flags (FONT, SIZE, STYLE, and COLOR) are defined.\r
 /// They are defined as EFI_FONT_INFO_***\r
 ///\r
-typedef UINT32  EFI_FONT_INFO_MASK;\r
+typedef UINT32 EFI_FONT_INFO_MASK;\r
 \r
 #define EFI_FONT_INFO_SYS_FONT        0x00000001\r
 #define EFI_FONT_INFO_SYS_SIZE        0x00000002\r
@@ -80,11 +77,11 @@ typedef UINT32  EFI_FONT_INFO_MASK;
 \r
 //\r
 // EFI_FONT_INFO\r
-// \r
+//\r
 typedef struct {\r
-  EFI_HII_FONT_STYLE FontStyle;\r
-  UINT16             FontSize;      ///< character cell height in pixels\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
@@ -100,10 +97,10 @@ typedef struct {
   font requested and the font available.\r
 **/\r
 typedef struct _EFI_FONT_DISPLAY_INFO {\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_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
@@ -155,7 +152,7 @@ typedef struct _EFI_FONT_DISPLAY_INFO {
 \r
   @param Flags            Describes how the string is to be drawn.\r
 \r
-  @param String           Points to the null-terminated string to be \r
+  @param String           Points to the null-terminated string to be\r
 \r
   @param StringInfo       Points to the string output information,\r
                           including the color and font. If NULL, then\r
@@ -203,9 +200,9 @@ typedef struct _EFI_FONT_DISPLAY_INFO {
                           overlap.\r
 \r
   @retval EFI_SUCCESS           The string was successfully updated.\r
-  \r
+\r
   @retval EFI_OUT_OF_RESOURCES  Unable to allocate an output buffer for RowInfoArray or Blt.\r
-  \r
+\r
   @retval EFI_INVALID_PARAMETER The String or Blt was NULL.\r
 \r
   @retval EFI_INVALID_PARAMETER Flags were invalid combination.\r
@@ -223,9 +220,7 @@ EFI_STATUS
   OUT       EFI_HII_ROW_INFO      **RowInfoArray OPTIONAL,\r
   OUT       UINTN                 *RowInfoArraySize OPTIONAL,\r
   OUT       UINTN                 *ColumnInfoArray OPTIONAL\r
-);\r
-\r
-\r
+  );\r
 \r
 /**\r
 \r
@@ -276,7 +271,7 @@ EFI_STATUS
 \r
   @param Flags      Describes how the string is to be drawn.\r
 \r
-  @param PackageList  \r
+  @param PackageList\r
                     The package list in the HII database to\r
                     search for the specified string.\r
 \r
@@ -342,8 +337,8 @@ EFI_STATUS
                                 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, \r
-                                or the stringid is not in the specified PackageList. \r
+  @retval EFI_NOT_FOUND         The specified PackageList is not in the Database,\r
+                                or the stringid is not in the specified PackageList.\r
 \r
 **/\r
 typedef\r
@@ -361,8 +356,7 @@ EFI_STATUS
   OUT       EFI_HII_ROW_INFO      **RowInfoArray    OPTIONAL,\r
   OUT       UINTN                 *RowInfoArraySize OPTIONAL,\r
   OUT       UINTN                 *ColumnInfoArray  OPTIONAL\r
-);\r
-\r
+  );\r
 \r
 /**\r
 \r
@@ -406,7 +400,7 @@ EFI_STATUS
   IN CONST  EFI_FONT_DISPLAY_INFO *StringInfo,\r
   OUT       EFI_IMAGE_OUTPUT      **Blt,\r
   OUT       UINTN                 *Baseline OPTIONAL\r
-);\r
+  );\r
 \r
 /**\r
 \r
@@ -424,46 +418,47 @@ 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. If NULL, then the information \r
+                        information about. If NULL, then the information\r
                         about the system default font will be returned.\r
 \r
-  @param StringInfoOut  Upon return, contains the matching\r
-                        font's information. If NULL, then no\r
-                        information is returned.\r
+  @param  StringInfoOut Upon return, contains the matching font's information.\r
+                        If NULL, then no information is returned. This buffer\r
+                        is allocated with a call to the Boot Service AllocatePool().\r
+                        It is the caller's responsibility to call the Boot\r
+                        Service FreePool() when the caller no longer requires\r
+                        the contents of StringInfoOut.\r
 \r
   @param String         Points to the string which will be tested to\r
                         determine if all characters are available. If\r
                         NULL, then any font is acceptable.\r
-  \r
+\r
   @retval EFI_SUCCESS            Matching font returned successfully.\r
-  \r
+\r
   @retval EFI_NOT_FOUND          No matching font was found.\r
 \r
   @retval EFI_OUT_OF_RESOURCES   There were insufficient resources to complete the request.\r
-  \r
+\r
 **/\r
 typedef\r
 EFI_STATUS\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, 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
 ///\r
 /// The protocol provides the service to retrieve the font informations.\r
 ///\r
 struct _EFI_HII_FONT_PROTOCOL {\r
-  EFI_HII_STRING_TO_IMAGE     StringToImage;\r
-  EFI_HII_STRING_ID_TO_IMAGE  StringIdToImage;\r
-  EFI_HII_GET_GLYPH           GetGlyph;\r
-  EFI_HII_GET_FONT_INFO       GetFontInfo;\r
+  EFI_HII_STRING_TO_IMAGE       StringToImage;\r
+  EFI_HII_STRING_ID_TO_IMAGE    StringIdToImage;\r
+  EFI_HII_GET_GLYPH             GetGlyph;\r
+  EFI_HII_GET_FONT_INFO         GetFontInfo;\r
 };\r
 \r
-extern EFI_GUID gEfiHiiFontProtocolGuid;\r
-\r
+extern EFI_GUID  gEfiHiiFontProtocolGuid;\r
 \r
 #endif\r
-\r