X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FHiiFont.h;h=de2097e744fe775df8b68920d0065cba1370a6a4;hp=d581d5312d688b60f5239536c8701a1d949ae493;hb=8b13229b469f05ec22d76098b052bd6e943fecee;hpb=d1f950002362305fcd4c30f108ef7b76679f5843 diff --git a/MdePkg/Include/Protocol/HiiFont.h b/MdePkg/Include/Protocol/HiiFont.h index d581d5312d..de2097e744 100644 --- a/MdePkg/Include/Protocol/HiiFont.h +++ b/MdePkg/Include/Protocol/HiiFont.h @@ -1,7 +1,7 @@ /** @file The file provides services to retrieve font information. - Copyright (c) 2006 - 2007, Intel Corporation + Copyright (c) 2006 - 2008, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -10,13 +10,12 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - Module Name: HiiFont.h - **/ #ifndef __HII_FONT_H__ #define __HII_FONT_H__ +#include #include #define EFI_HII_FONT_PROTOCOL_GUID \ @@ -24,6 +23,7 @@ typedef struct _EFI_HII_FONT_PROTOCOL EFI_HII_FONT_PROTOCOL; +typedef VOID *EFI_FONT_HANDLE; // // EFI_HII_OUT_FLAGS @@ -31,8 +31,8 @@ typedef struct _EFI_HII_FONT_PROTOCOL EFI_HII_FONT_PROTOCOL; typedef UINT32 EFI_HII_OUT_FLAGS; #define EFI_HII_OUT_FLAG_CLIP 0x00000001 #define EFI_HII_OUT_FLAG_WRAP 0x00000002 -#define EFI_HII_OUT_FLAG_CLEAN_Y 0x00000004 -#define EFI_HII_OUT_FLAG_CLEAN_X 0x00000008 +#define EFI_HII_OUT_FLAG_CLIP_CLEAN_Y 0x00000004 +#define EFI_HII_OUT_FLAG_CLIP_CLEAN_X 0x00000008 #define EFI_HII_OUT_FLAG_TRANSPARENT 0x00000010 #define EFI_HII_IGNORE_IF_NO_GLYPH 0x00000020 #define EFI_HII_IGNORE_LINE_BREAK 0x00000040 @@ -87,9 +87,9 @@ typedef UINT32 EFI_FONT_INFO_MASK; // EFI_FONT_INFO // typedef struct { - UINT32 FontStyle; - UINT16 FontSize; - CHAR16 FontName[1]; + EFI_HII_FONT_STYLE FontStyle; + UINT16 FontSize; // character cell height in pixels + CHAR16 FontName[1]; } EFI_FONT_INFO; /** @@ -145,10 +145,10 @@ typedef struct { **/ typedef struct _EFI_FONT_DISPLAY_INFO { - EFI_FONT_INFO FontInfo; EFI_GRAPHICS_OUTPUT_BLT_PIXEL ForegroundColor; EFI_GRAPHICS_OUTPUT_BLT_PIXEL BackgroundColor; EFI_FONT_INFO_MASK FontInfoMask; + EFI_FONT_INFO FontInfo; } EFI_FONT_DISPLAY_INFO; /** @@ -253,21 +253,20 @@ typedef struct _EFI_FONT_DISPLAY_INFO { @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for RowInfoArray or Blt. - @retval EFI_INVALID_PARAMETER The String or Blt or Height or - Width was NULL. + @retval EFI_INVALID_PARAMETER The String or Blt. + @retval EFI_INVALID_PARAMETER Flags were invalid combination.. - **/ typedef EFI_STATUS -(EFIAPI *EFI_HII_STRING_TO_IMAGE) ( +(EFIAPI *EFI_HII_STRING_TO_IMAGE)( IN CONST EFI_HII_FONT_PROTOCOL *This, - IN CONST EFI_HII_OUT_FLAGS Flags, + IN EFI_HII_OUT_FLAGS Flags, IN CONST EFI_STRING String, IN CONST EFI_FONT_DISPLAY_INFO *StringInfo, IN OUT EFI_IMAGE_OUTPUT **Blt, - IN CONST UINTN BltX, - IN CONST UINTN BltY, + IN UINTN BltX, + IN UINTN BltY, OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL, OUT UINTN *RowInfoArraySize OPTIONAL, OUT UINTN *ColumnInfoArray OPTIONAL @@ -308,7 +307,7 @@ EFI_STATUS EFI_HII_OUT_FLAG_CLIP_CLEAN_X is set. This flag cannot be used with EFI_HII_OUT_FLAG_CLIP_CLEAN_X. If EFI_HII_OUT_FLAG_TRANSPARENT is set, then BackgroundColor is - ignored and all off¡± pixels in the character¡¯s glyph will + ignored and all off" pixels in the character's glyph will use the pixel value from Blt. This flag cannot be used if Blt is NULL upon entry. If EFI_HII_IGNORE_IF_NO_GLYPH is set, then characters which have no glyphs are not drawn. Otherwise, they @@ -388,20 +387,24 @@ EFI_STATUS @retval EFI_INVALID_PARAMETER The String or Blt or Height or Width was NULL. + @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL. + @retval EFI_INVALID_PARAMETER Flags were invalid combination. + @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not + in the specified PackageList. **/ typedef EFI_STATUS -(EFIAPI *EFI_HII_STRING_ID_TO_IMAGE) ( +(EFIAPI *EFI_HII_STRING_ID_TO_IMAGE)( IN CONST EFI_HII_FONT_PROTOCOL *This, - IN CONST EFI_HII_OUT_FLAGS Flags, - IN CONST EFI_HII_HANDLE PackageList, - IN CONST EFI_STRING_ID StringId, + IN EFI_HII_OUT_FLAGS Flags, + IN EFI_HII_HANDLE PackageList, + IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language, IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL, IN OUT EFI_IMAGE_OUTPUT **Blt, - IN CONST UINTN BltX, - IN CONST UINTN BltY, + IN UINTN BltX, + IN UINTN BltY, OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL, OUT UINTN *RowInfoArraySize OPTIONAL, OUT UINTN *ColumnInfoArray OPTIONAL @@ -445,7 +448,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_HII_GET_GLYPH) ( +(EFIAPI *EFI_HII_GET_GLYPH)( IN CONST EFI_HII_FONT_PROTOCOL *This, IN CONST CHAR16 Char, IN CONST EFI_FONT_DISPLAY_INFO *StringInfo, @@ -469,7 +472,8 @@ EFI_STATUS to NULL if there are no more matching fonts. @param StringInfoIn Upon entry, points to the font to return - information about. + information about. If NULL, then the information about the system default + font will be returned. @param StringInfoOut Upon return, contains the matching font's information. If NULL, then no @@ -483,18 +487,19 @@ EFI_STATUS @retval EFI_NOT_FOUND No matching font was found. - @retval EFI_INVALID_PARAMETER FontHandle is NULL or - StringInfoIn is NULL + @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination. + + @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the request. **/ typedef EFI_STATUS -(EFIAPI *EFI_HII_GET_FONT_INFO) ( +(EFIAPI *EFI_HII_GET_FONT_INFO)( IN CONST EFI_HII_FONT_PROTOCOL *This, IN OUT EFI_FONT_HANDLE *FontHandle, - IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn, - OUT EFI_FONT_DISPLAY_INFO *StringInfoOut, - IN CONST EFI_STRING *String OPTIONAL + IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn, OPTIONAL + OUT EFI_FONT_DISPLAY_INFO **StringInfoOut, + IN CONST EFI_STRING String OPTIONAL ); /**