]>
Commit | Line | Data |
---|---|---|
2c40a813 | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2007, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | HiiFont.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | EFI_HII_FONT_PROTOCOL from UEFI 2.1 specification.\r | |
19 | \r | |
20 | This protocol provides interfaces to retrieve font information.\r | |
21 | \r | |
22 | Revision History\r | |
23 | \r | |
24 | --*/\r | |
25 | \r | |
26 | #ifndef __EFI_HII_FONT_PROTOCOL_H__\r | |
27 | #define __EFI_HII_FONT_PROTOCOL_H__\r | |
28 | \r | |
29 | #include EFI_PROTOCOL_DEFINITION (GraphicsOutput)\r | |
30 | #include EFI_PROTOCOL_DEFINITION (HiiImage)\r | |
31 | \r | |
32 | //\r | |
33 | // Global ID for the Hii Font Protocol.\r | |
34 | //\r | |
35 | \r | |
36 | #define EFI_HII_FONT_PROTOCOL_GUID \\r | |
37 | { \\r | |
38 | 0xe9ca4775, 0x8657, 0x47fc, 0x97, 0xe7, 0x7e, 0xd6, 0x5a, 0x8, 0x43, 0x24 \\r | |
39 | }\r | |
40 | \r | |
41 | EFI_FORWARD_DECLARATION (EFI_HII_FONT_PROTOCOL);\r | |
42 | \r | |
43 | typedef UINT32 EFI_HII_OUT_FLAGS;\r | |
44 | typedef UINT32 EFI_FONT_INFO_MASK;\r | |
45 | typedef VOID* EFI_FONT_HANDLE;\r | |
46 | \r | |
47 | typedef struct _EFI_HII_ROW_INFO {\r | |
48 | UINTN StartIndex;\r | |
49 | UINTN EndIndex;\r | |
50 | UINTN LineHeight;\r | |
51 | UINTN LineWidth;\r | |
52 | UINTN BaselineOffset;\r | |
53 | } EFI_HII_ROW_INFO;\r | |
54 | \r | |
55 | typedef struct {\r | |
56 | UINT32 FontStyle;\r | |
57 | UINT16 FontSize; // character cell size in pixels\r | |
58 | CHAR16 FontName[1];\r | |
59 | } EFI_FONT_INFO;\r | |
60 | \r | |
61 | typedef struct _EFI_FONT_DISPLAY_INFO {\r | |
62 | EFI_GRAPHICS_OUTPUT_BLT_PIXEL ForegroundColor;\r | |
63 | EFI_GRAPHICS_OUTPUT_BLT_PIXEL BackgroundColor;\r | |
64 | EFI_FONT_INFO_MASK FontInfoMask;\r | |
65 | EFI_FONT_INFO FontInfo; \r | |
66 | } EFI_FONT_DISPLAY_INFO;\r | |
67 | \r | |
68 | #define EFI_HII_OUT_FLAG_CLIP 0x00000001\r | |
69 | #define EFI_HII_OUT_FLAG_WRAP 0x00000002\r | |
70 | #define EFI_HII_OUT_FLAG_CLEAN_Y 0x00000004\r | |
71 | #define EFI_HII_OUT_FLAG_CLEAN_X 0x00000008\r | |
72 | #define EFI_HII_OUT_FLAG_TRANSPARENT 0x00000010\r | |
73 | #define EFI_HII_IGNORE_IF_NO_GLYPH 0x00000020\r | |
74 | #define EFI_HII_IGNORE_LINE_BREAK 0x00000040\r | |
75 | #define EFI_HII_DIRECT_TO_SCREEN 0x00000080\r | |
76 | \r | |
77 | #define EFI_FONT_INFO_SYS_FONT 0x00000001\r | |
78 | #define EFI_FONT_INFO_SYS_SIZE 0x00000002\r | |
79 | #define EFI_FONT_INFO_SYS_STYLE 0x00000004\r | |
80 | #define EFI_FONT_INFO_SYS_FORE_COLOR 0x00000010\r | |
81 | #define EFI_FONT_INFO_SYS_BACK_COLOR 0x00000020\r | |
82 | #define EFI_FONT_INFO_RESIZE 0x00001000\r | |
83 | #define EFI_FONT_INFO_RESTYLE 0x00002000\r | |
84 | #define EFI_FONT_INFO_ANY_FONT 0x00010000\r | |
85 | #define EFI_FONT_INFO_ANY_SIZE 0x00020000\r | |
86 | #define EFI_FONT_INFO_ANY_STYLE 0x00040000\r | |
87 | \r | |
88 | typedef\r | |
89 | EFI_STATUS\r | |
90 | (EFIAPI *EFI_HII_STRING_TO_IMAGE) (\r | |
91 | IN CONST EFI_HII_FONT_PROTOCOL *This,\r | |
92 | IN EFI_HII_OUT_FLAGS Flags,\r | |
93 | IN CONST EFI_STRING String,\r | |
94 | IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,\r | |
95 | IN OUT EFI_IMAGE_OUTPUT **Blt,\r | |
96 | IN UINTN BltX,\r | |
97 | IN UINTN BltY,\r | |
98 | OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,\r | |
99 | OUT UINTN *RowInfoArraySize OPTIONAL,\r | |
100 | OUT UINTN *ColumnInfoArray OPTIONAL\r | |
101 | )\r | |
102 | /*++\r | |
103 | \r | |
104 | Routine Description:\r | |
105 | Renders a string to a bitmap or to the display.\r | |
106 | \r | |
107 | Arguments: \r | |
108 | This - A pointer to the EFI_HII_FONT_PROTOCOL instance.\r | |
109 | Flags - Describes how the string is to be drawn. \r | |
110 | String - Points to the null-terminated string to be displayed.\r | |
111 | StringInfo - Points to the string output information, including the color and font. \r | |
112 | If NULL, then the string will be output in the default system font and color. \r | |
113 | Blt - If this points to a non-NULL on entry, this points to the image, which is Width pixels \r | |
114 | wide and Height pixels high. The string will be drawn onto this image and \r | |
115 | EFI_HII_OUT_FLAG_CLIP is implied. If this points to a NULL on entry, then a \r | |
116 | buffer will be allocated to hold the generated image and the pointer updated on exit. It\r | |
117 |