aboutsummaryrefslogtreecommitdiff
path: root/src/include/ipxe/efi/Protocol/HiiFont.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ipxe/efi/Protocol/HiiFont.h')
-rw-r--r--src/include/ipxe/efi/Protocol/HiiFont.h84
1 files changed, 38 insertions, 46 deletions
diff --git a/src/include/ipxe/efi/Protocol/HiiFont.h b/src/include/ipxe/efi/Protocol/HiiFont.h
index f2b72dc..248f13e 100644
--- a/src/include/ipxe/efi/Protocol/HiiFont.h
+++ b/src/include/ipxe/efi/Protocol/HiiFont.h
@@ -1,21 +1,18 @@
/** @file
The file provides services to retrieve font information.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License that accompanies this distribution.
-The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ @par Revision Reference:
+ This Protocol was introduced in UEFI Specification 2.1.
**/
#ifndef __HII_FONT_H__
#define __HII_FONT_H__
-FILE_LICENCE ( BSD3 );
+FILE_LICENCE ( BSD2_PATENT );
#include <ipxe/efi/Protocol/GraphicsOutput.h>
#include <ipxe/efi/Protocol/HiiImage.h>
@@ -25,21 +22,21 @@ FILE_LICENCE ( BSD3 );
typedef struct _EFI_HII_FONT_PROTOCOL EFI_HII_FONT_PROTOCOL;
-typedef VOID *EFI_FONT_HANDLE;
+typedef VOID *EFI_FONT_HANDLE;
///
/// EFI_HII_OUT_FLAGS.
///
-typedef UINT32 EFI_HII_OUT_FLAGS;
+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_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
-#define EFI_HII_DIRECT_TO_SCREEN 0x00000080
+#define EFI_HII_OUT_FLAG_CLIP 0x00000001
+#define EFI_HII_OUT_FLAG_WRAP 0x00000002
+#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
+#define EFI_HII_DIRECT_TO_SCREEN 0x00000080
/**
Definition of EFI_HII_ROW_INFO.
@@ -48,26 +45,26 @@ typedef struct _EFI_HII_ROW_INFO {
///
/// The index of the first character in the string which is displayed on the line.
///
- UINTN StartIndex;
+ UINTN StartIndex;
///
/// The index of the last character in the string which is displayed on the line.
/// If this is the same as StartIndex, then no characters are displayed.
///
- UINTN EndIndex;
- UINTN LineHeight; ///< The height of the line, in pixels.
- UINTN LineWidth; ///< The width of the text on the line, in pixels.
+ UINTN EndIndex;
+ UINTN LineHeight; ///< The height of the line, in pixels.
+ UINTN LineWidth; ///< The width of the text on the line, in pixels.
///
/// The font baseline offset in pixels from the bottom of the row, or 0 if none.
///
- UINTN BaselineOffset;
+ UINTN BaselineOffset;
} EFI_HII_ROW_INFO;
///
/// Font info flag. All flags (FONT, SIZE, STYLE, and COLOR) are defined.
/// They are defined as EFI_FONT_INFO_***
///
-typedef UINT32 EFI_FONT_INFO_MASK;
+typedef UINT32 EFI_FONT_INFO_MASK;
#define EFI_FONT_INFO_SYS_FONT 0x00000001
#define EFI_FONT_INFO_SYS_SIZE 0x00000002
@@ -84,9 +81,9 @@ typedef UINT32 EFI_FONT_INFO_MASK;
// EFI_FONT_INFO
//
typedef struct {
- EFI_HII_FONT_STYLE FontStyle;
- UINT16 FontSize; ///< character cell height in pixels
- CHAR16 FontName[1];
+ EFI_HII_FONT_STYLE FontStyle;
+ UINT16 FontSize; ///< character cell height in pixels
+ CHAR16 FontName[1];
} EFI_FONT_INFO;
/**
@@ -102,10 +99,10 @@ typedef struct {
font requested and the font available.
**/
typedef struct _EFI_FONT_DISPLAY_INFO {
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL ForegroundColor;
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL BackgroundColor;
- EFI_FONT_INFO_MASK FontInfoMask;
- 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;
/**
@@ -225,9 +222,7 @@ EFI_STATUS
OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
OUT UINTN *RowInfoArraySize OPTIONAL,
OUT UINTN *ColumnInfoArray OPTIONAL
-);
-
-
+ );
/**
@@ -363,8 +358,7 @@ EFI_STATUS
OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
OUT UINTN *RowInfoArraySize OPTIONAL,
OUT UINTN *ColumnInfoArray OPTIONAL
-);
-
+ );
/**
@@ -408,7 +402,7 @@ EFI_STATUS
IN CONST EFI_FONT_DISPLAY_INFO *StringInfo,
OUT EFI_IMAGE_OUTPUT **Blt,
OUT UINTN *Baseline OPTIONAL
-);
+ );
/**
@@ -452,23 +446,21 @@ EFI_STATUS
(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, OPTIONAL
+ IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn OPTIONAL,
OUT EFI_FONT_DISPLAY_INFO **StringInfoOut,
IN CONST EFI_STRING String OPTIONAL
-);
+ );
///
/// The protocol provides the service to retrieve the font informations.
///
struct _EFI_HII_FONT_PROTOCOL {
- EFI_HII_STRING_TO_IMAGE StringToImage;
- EFI_HII_STRING_ID_TO_IMAGE StringIdToImage;
- EFI_HII_GET_GLYPH GetGlyph;
- EFI_HII_GET_FONT_INFO GetFontInfo;
+ EFI_HII_STRING_TO_IMAGE StringToImage;
+ EFI_HII_STRING_ID_TO_IMAGE StringIdToImage;
+ EFI_HII_GET_GLYPH GetGlyph;
+ EFI_HII_GET_FONT_INFO GetFontInfo;
};
-extern EFI_GUID gEfiHiiFontProtocolGuid;
-
+extern EFI_GUID gEfiHiiFontProtocolGuid;
#endif
-