]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
2 | The file provides Database manager for HII-related data\r | |
3 | structures.\r | |
4 | \r | |
5 | Copyright (c) 2006 - 2007, Intel Corporation\r | |
6 | All rights reserved. This program and the accompanying materials \r | |
7 | are licensed and made available under the terms and conditions of the BSD License \r | |
8 | which accompanies this distribution. The full text of the license may be found at \r | |
9 | http://opensource.org/licenses/bsd-license.php \r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
13 | \r | |
d1f95000 | 14 | **/\r |
15 | \r | |
16 | #ifndef __HII_DATABASE_H__\r | |
17 | #define __HII_DATABASE_H__\r | |
18 | \r | |
1528fae8 | 19 | #error "UEFI 2.1 HII is not fully implemented for now, Please don't include this file now."\r |
20 | \r | |
d1f95000 | 21 | #define EFI_HII_DATABASE_PROTOCOL_GUID \\r |
22 | { 0xef9fc172, 0xa1b2, 0x4693, { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } }\r | |
23 | \r | |
24 | \r | |
25 | typedef struct _EFI_HII_DATABASE_PROTOCOL EFI_HII_DATABASE_PROTOCOL;\r | |
26 | \r | |
27 | //\r | |
28 | // ConfigurationS of HII.\r | |
29 | // \r | |
30 | #define GLYPH_WIDTH 8\r | |
31 | #define GLYPH_HEIGHT 19\r | |
32 | \r | |
33 | /**\r | |
34 | \r | |
35 | Each package starts with a header, as defined above, which \r | |
36 | indicates the size and type of the package. When added to a \r | |
37 | pointer pointing to the start of the header, Length points at \r | |
38 | the next package. The package lists form a package list when \r | |
39 | concatenated together and terminated with an \r | |
40 | EFI_HII_PACKAGE_HEADER with a Type of EFI_HII_PACKAGE_END. The \r | |
41 | type EFI_HII_PACKAGE_TYPE_GUID is used for vendor-defined HII \r | |
42 | packages, whose contents are determined by the Guid. The range \r | |
43 | of package types starting with EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN \r | |
44 | through EFI_HII_PACKAGE_TYPE_SYSTEM_END are reserved for system \r | |
45 | firmware implementers. \r | |
46 | \r | |
47 | @param Length The size of the package in bytes.\r | |
48 | \r | |
49 | @param Type The package type. See EFI_HII_PACKAGE_TYPE_x,\r | |
50 | below.\r | |
51 | \r | |
52 | @param Data The package data, the format of which is\r | |
53 | determined by Type.\r | |
54 | \r | |
55 | **/\r | |
56 | typedef struct {\r | |
57 | UINT32 Length:24;\r | |
58 | UINT32 Type:8;\r | |
59 | // UINT8 Data[...];\r | |
60 | } EFI_HII_PACKAGE_HEADER;\r | |
61 | \r | |
62 | //\r | |
63 | // EFI_HII_PACKAGE_TYPE_x.\r | |
64 | // \r | |
65 | #define EFI_HII_PACKAGE_TYPE_ALL 0x00\r | |
66 | #define EFI_HII_PACKAGE_TYPE_GUID 0x01\r | |
67 | #define EFI_HII_PACKAGE_FORM_CONFIG 0x02\r | |
68 | #define EFI_HII_PACKAGE_FORM_APP 0x03\r | |
69 | #define EFI_HII_PACKAGE_STRINGS 0x04\r | |
70 | #define EFI_HII_PACKAGE_FONTS 0x05\r | |
71 | #define EFI_HII_PACKAGE_IMAGES 0x06\r | |
72 | #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07\r | |
73 | #define EFI_HII_PACKAGE_DEVICE_PATH 0x08\r | |
74 | #define EFI_HII_PACKAGE_END 0x09\r | |
75 | #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0\r | |
76 | #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF\r | |
77 | \r | |
78 | \r | |
79 | /**\r | |
80 | \r | |
81 | This header uniquely identifies the package list.and is placed \r | |
82 | in front of a list of packages. Package lists with the same \r | |
83 | PackageListGuid value should contain the same data set. Updated \r | |
84 | versions should have updated GUIDs. \r | |
85 | \r | |
86 | @param PackageListGuid The unique identifier applied to the\r | |
87 | list of packages which follows.\r | |
88 | \r | |
89 | \r | |
90 | @param PackageLength The size of the package list (in\r | |
91 | bytes), including the header.\r | |
92 | \r | |
93 | **/\r | |
94 | typedef struct {\r | |
95 | EFI_GUID PackageListGuid;\r | |
96 | UINT32 PackagLength;\r | |
97 | } EFI_HII_PACKAGE_LIST_HEADER;\r | |
98 | \r | |
99 | /**\r | |
100 | \r | |
101 | The fonts must be presented in Unicode sort order. That is,\r | |
102 | the primary sort key is the UnicodeWeight and the secondary\r | |
103 | sort key is the SurrogateWeight. It is up to developers who\r | |
104 | manage fonts to choose efficient mechanisms for accessing\r | |
105 | fonts. The contiguous presentation can easily be used because\r | |
106 | narrow and wide glyphs are not intermixed, so a binary search\r | |
107 | is possible (hence the requirement that the glyphs be sorted\r | |
108 | by weight).\r | |
109 | \r | |
110 | @param Header The header contains a Length and Type field.\r | |
111 | In the case of a font package, the type will\r | |
112 | be EFI_HII_PACKAGE_SIMPLE_FONTS and the length\r | |
113 | will be the total size of the font package\r | |
114 | including the size of the narrow and wide\r | |
115 | glyphs. See EFI_HII_PACKAGE_HEADER.\r | |
116 | \r | |
117 | @param NumberOfNarrowGlyphs The number of NarrowGlyphs that\r | |
118 | are included in the font package.\r | |
119 | \r | |
120 | @param NumberOfWideGlyphs The number of WideGlyphs that are\r | |
121 | included in the font package.\r | |
122 | \r | |
123 | @param NarrowGlyphs An array of EFI_NARROW_GLYPH entries.\r | |
124 | The number of entries is specified by\r | |
125 | NumberOfNarrowGlyphs.\r | |
126 | \r | |
127 | @param WideGlyphs An array of EFI_WIDE_GLYPH entries. The\r | |
128 | number of entries is specified by\r | |
129 | NumberOfWideGlyphs. To calculate the\r | |
130 | offset of WideGlyphs, use the offset of\r | |
131 | NarrowGlyphs and add the size of\r | |
132 | EFI_NARROW_GLYPH multiplied by the\r | |
133 | NumberOfNarrowGlyphs.\r | |
134 | \r | |
135 | */\r | |
136 | typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {\r | |
137 | EFI_HII_PACKAGE_HEADER Header;\r | |
138 | UINT16 NumberOfNarrowGlyphs;\r | |
139 | UINT16 NumberOfWideGlyphs;\r | |
140 | // EFI_NARROW_GLYPH NarrowGlyphs[];\r | |
141 | // EFI_WIDE_GLYPH WideGlyphs[];\r | |
142 | } EFI_HII_SIMPLE_FONT_PACKAGE_HDR;\r | |
143 | \r | |
144 | //\r | |
145 | // Contents of EFI_NARROW_GLYPH.Attributes\r | |
146 | //\r | |
147 | #define EFI_GLYPH_NON_SPACING 0x01\r | |
148 | #define EFI_GLYPH_WIDE 0x02\r | |
149 | \r | |
150 | /**\r | |
151 | \r | |
152 | Glyphs are represented by two structures, one each for the two\r | |
153 | sizes of glyphs. The narrow glyph (EFI_NARROW_GLYPH) is the\r | |
154 | normal glyph used for text display.\r | |
155 | \r | |
156 | @param UnicodeWeight The Unicode representation of the glyph.\r | |
157 | The term weight is the technical term\r | |
158 | for a character value.\r | |
159 | \r | |
160 | @param Attributes The data element containing the glyph\r | |
161 | definitions; see Related Definitions\r | |
162 | below.\r | |
163 | \r | |
164 | @param GlyphCol1 The column major glyph representation of the\r | |
165 | character. Bits with values of one\r | |
166 | indicate that the corresponding pixel is to\r | |
167 | be on when normally displayed; those with\r | |
168 | zero are off.\r | |
169 | \r | |
170 | **/\r | |
171 | typedef struct {\r | |
172 | CHAR16 UnicodeWeight;\r | |
173 | UINT8 Attributes;\r | |
174 | UINT8 GlyphCol1[19];\r | |
175 | } EFI_NARROW_GLYPH;\r | |
176 | \r | |
177 | /**\r | |
178 | \r | |
179 | Glyphs are represented via the two structures, one each for the\r | |
180 | two sizes of glyphs. The wide glyph (EFI_WIDE_GLYPH) is large\r | |
181 | enough to display logographic characters.\r | |
182 | \r | |
183 | @param UnicodeWeight The Unicode representation of the glyph.\r | |
184 | The term weight is the technical term\r | |
185 | for a character value.\r | |
186 | \r | |
187 | @param Attributes The data element containing the glyph\r | |
188 | definitions; see Related Definitions in\r | |
189 | EFI_NARROW_GLYPH for attribute values.\r | |
190 | \r | |
191 | @param GlyphCol1, GlyphCol2 The column major glyph\r | |
192 | representation of the character.\r | |
193 | Bits with values of one indicate\r | |
194 | that the corresponding pixel is\r | |
195 | to be on when normally\r | |
196 | displayed; those with zero are\r | |
197 | off.\r | |
198 | \r | |
199 | @param Pad Ensures that sizeof(EFI_WIDE_GLYPH) is twice the\r | |
200 | sizeof(EFI_NARROW_GLYPH). The contents of Pad must\r | |
201 | bezero.\r | |
202 | \r | |
203 | \r | |
204 | **/\r | |
205 | typedef struct {\r | |
206 | CHAR16 UnicodeWeight;\r | |
207 | UINT8 Attributes;\r | |
208 | UINT8 GlyphCol1[GLYPH_HEIGHT];\r | |
209 | UINT8 GlyphCol2[GLYPH_HEIGHT];\r | |
210 | UINT8 Pad[3];\r | |
211 | } EFI_WIDE_GLYPH;\r | |
212 | \r | |
213 | \r | |
214 | //\r | |
215 | // EFI_HII_FONT_STYLE\r | |
216 | // \r | |
217 | typedef UINT32 EFI_HII_FONT_STYLE;\r | |
218 | #define EFI_HII_FONT_STYLE_BOLD 0x00000001\r | |
219 | #define EFI_HII_FONT_STYLE_ITALIC 0x00000002\r | |
220 | #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000\r | |
221 | #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000\r | |
222 | #define EFI_HII_FONT_STYLE_SHADOW 0x00040000\r | |
223 | #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000\r | |
224 | #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000\r | |
225 | \r | |
226 | //\r | |
227 | // EFI_HII_GLYPH_BLOCK.BlockType\r | |
228 | // \r | |
229 | #define EFI_HII_GIBT_END 0x00\r | |
230 | #define EFI_HII_GIBT_GLYPH 0x10\r | |
231 | #define EFI_HII_GIBT_GLYPHS 0x11\r | |
232 | #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12\r | |
233 | #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13\r | |
234 | #define EFI_HII_GIBT_DUPLICATE 0x20\r | |
235 | #define EFI_HII_GIBT_SKIP2 0x21 \r | |
236 | #define EFI_HII_GIBT_SKIP1 0x22\r | |
237 | #define EFI_HII_GIBT_DEFAULTS 0x23\r | |
238 | #define EFI_HII_GIBT_EXT1 0x30\r | |
239 | #define EFI_HII_GIBT_EXT2 0x31\r | |
240 | #define EFI_HII_GIBT_EXT4 0x32\r | |
241 | \r | |
242 | /**\r | |
243 | \r | |
244 | EFI_HII_GIBT_END block is found. When processing the glyph\r | |
245 | blocks, each block refers to the current character value\r | |
246 | (CharValueCurrent), which is initially set to one (1). Glyph\r | |
247 | blocks of an unknown type should be skipped. If they cannot be\r | |
248 | skipped, then processing halts.\r | |
249 | \r | |
250 | **/\r | |
251 | typedef struct _EFI_HII_GLYPH_BLOCK {\r | |
252 | UINT8 BlockType;\r | |
253 | UINT8 BlockBody[1];\r | |
254 | } EFI_HII_GLYPH_BLOCK;\r | |
255 | \r | |
256 | \r | |
257 | /**\r | |
258 | \r | |
259 | @param Width Width of the character or character cell, in\r | |
260 | pixels. For fixed-pitch fonts, this is the same\r | |
261 | as the advance.\r | |
262 | \r | |
263 | @param Height Height of the character or character cell, in\r | |
264 | pixels.\r | |
265 | \r | |
266 | @param OffsetX Offset to the horizontal edge of the character\r | |
267 | cell.\r | |
268 | \r | |
269 | @param OffsetY Offset to the vertical edge of the character\r | |
270 | cell.\r | |
271 | \r | |
272 | @param AdvanceX Number of pixels to advance to the right\r | |
273 | when moving from the origin of the current\r | |
274 | glyph to the origin of the next glyph.\r | |
275 | \r | |
276 | **/\r | |
277 | typedef struct _EFI_HII_GLYPH_INFO {\r | |
278 | UINT16 Width;\r | |
279 | UINT16 Height;\r | |
280 | INT16 OffsetX;\r | |
281 | INT16 OffsetY;\r | |
282 | INT16 AdvanceX;\r | |
283 | } EFI_HII_GLYPH_INFO;\r | |
284 | \r | |
285 | \r | |
286 | /**\r | |
287 | \r | |
288 | Changes the default cell information used for subsequent\r | |
289 | EFI_HII_GIBT_GLYPH_DEFAULT and EFI_HII_GIBT_GLYPHS_DEFAULT glyph\r | |
290 | blocks. The cell information described by Cell remains in effect\r | |
291 | until the next EFI_HII_GIBT_DEFAULTS is found. Prior to the\r | |
292 | first EFI_HII_GIBT_DEFAULTS block, the cell information in the\r | |
293 | fixed header are used.\r | |
294 | \r | |
295 | @param Header Standard glyph block header, where\r | |
296 | Header.BlockType = EFI_HII_GIBT_DEFAULTS.\r | |
297 | \r | |
298 | @param Cell The new default cell information which will be\r | |
299 | applied to all subsequent GLYPH_DEFAULT and\r | |
300 | GLYPHS_DEFAULT blocks.\r | |
301 | \r | |
302 | **/\r | |
303 | typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK {\r | |
304 | EFI_HII_GLYPH_BLOCK Header;\r | |
305 | EFI_HII_GLYPH_INFO Cell;\r | |
306 | } EFI_HII_GIBT_DEFAULTS_BLOCK;\r | |
307 | \r | |
308 | \r | |
309 | /**\r | |
310 | \r | |
311 | Indicates that the glyph with character value CharValueCurrent\r | |
312 | has the same glyph as a previously defined character value and\r | |
313 | increments CharValueCurrent by one.\r | |
314 | \r | |
315 | @param Header Standard glyph block header, where\r | |
316 | Header.BlockType = EFI_HII_GIBT_DUPLICATE.\r | |
317 | \r | |
318 | @param CharValue The previously defined character value with\r | |
319 | the exact same glyph.\r | |
320 | \r | |
321 | **/\r | |
322 | typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK {\r | |
323 | EFI_HII_GLYPH_BLOCK Header;\r | |
324 | CHAR16 CharValue;\r | |
325 | } EFI_HII_GIBT_DUPLICATE_BLOCK;\r | |
326 | \r | |
327 | \r | |
328 | /**\r | |
329 | \r | |
330 | Any glyphs with a character value greater than or equal to\r | |
331 | CharValueCurrent are empty.\r | |
332 | \r | |
333 | @param Header Standard glyph block header, where\r | |
334 | Header.BlockType = EFI_HII_GIBT_END.\r | |
335 | \r | |
336 | **/\r | |
337 | typedef struct _EFI_GLYPH_GIBT_END_BLOCK {\r | |
338 | EFI_HII_GLYPH_BLOCK Header;\r | |
339 | } EFI_GLYPH_GIBT_END_BLOCK;\r | |
340 | \r | |
341 | /**\r | |
342 | \r | |
343 | These are reserved for future expansion, with length bytes\r | |
344 | included so that they can be easily skipped.\r | |
345 | \r | |
346 | @param Header Standard glyph block header, where\r | |
347 | Header.BlockType = EFI_HII_GIBT_EXT1,\r | |
348 | EFI_HII_GIBT_EXT2 or EFI_HII_GIBT_EXT4.\r | |
349 | \r | |
350 | @param Length Size of the glyph block, in bytes.\r | |
351 | \r | |
352 | **/\r | |
353 | typedef struct _EFI_HII_GIBT_EXT1_BLOCK {\r | |
354 | EFI_HII_GLYPH_BLOCK Header;\r | |
355 | UINT8 BlockType2;\r | |
356 | UINT8 Length;\r | |
357 | } EFI_HII_GIBT_EXT1_BLOCK;\r | |
358 | \r | |
359 | \r | |
360 | /**\r | |
361 | \r | |
362 | These are reserved for future expansion, with length bytes\r | |
363 | included so that they can be easily skipped.\r | |
364 | \r | |
365 | @param Header Standard glyph block header, where\r | |
366 | Header.BlockType = EFI_HII_GIBT_EXT1,\r | |
367 | EFI_HII_GIBT_EXT2 or EFI_HII_GIBT_EXT4.\r | |
368 | \r | |
369 | @param Length Size of the glyph block, in bytes.\r | |
370 | \r | |
371 | **/\r | |
372 | typedef struct _EFI_HII_GIBT_EXT2_BLOCK {\r | |
373 | EFI_HII_GLYPH_BLOCK Header;\r | |
374 | UINT8 BlockType2;\r | |
375 | UINT16 Length;\r | |
376 | } EFI_HII_GIBT_EXT2_BLOCK;\r | |
377 | \r | |
378 | /**\r | |
379 | \r | |
380 | These are reserved for future expansion, with length bytes\r | |
381 | included so that they can be easily skipped.\r | |
382 | \r | |
383 | @param Header Standard glyph block header, where\r | |
384 | Header.BlockType = EFI_HII_GIBT_EXT1,\r | |
385 | EFI_HII_GIBT_EXT2 or EFI_HII_GIBT_EXT4.\r | |
386 | \r | |
387 | @param Length Size of the glyph block, in bytes.\r | |
388 | \r | |
389 | **/\r | |
390 | typedef struct _EFI_HII_GIBT_EXT4_BLOCK {\r | |
391 | EFI_HII_GLYPH_BLOCK Header;\r | |
392 | UINT8 BlockType2;\r | |
393 | UINT32 Length;\r | |
394 | } EFI_HII_GIBT_EXT4_BLOCK;\r | |
395 | \r | |
396 | \r | |
397 | /**\r | |
398 | \r | |
399 | This block provides the bitmap for the character with the value\r | |
400 | CharValueCurrent and increments CharValueCurrent by one. Each\r | |
401 | glyph contains a glyph width and height, a drawing offset,\r | |
402 | number of pixels to advance after drawing and then the encoded\r | |
403 | bitmap.\r | |
404 | \r | |
405 | @param Header Standard glyph block header, where\r | |
406 | Header.BlockType = EFI_HII_GIBT_GLYPH.\r | |
407 | \r | |
408 | @param Cell Contains the width and height of the encoded\r | |
409 | bitmap (Cell.Width and Cell.Height), the number\r | |
410 | of pixels (signed) right of the character cell\r | |
411 | origin where the left edge of the bitmap should\r | |
412 | be placed (Cell.OffsetX), the number of pixels\r | |
413 | above the character cell origin where the top\r | |
414 | edge of the bitmap should be placed\r | |
415 | (Cell.OffsetY) and the number of pixels (signed)\r | |
416 | to move right to find the origin for the next\r | |
417 | charactercell (Cell.AdvanceX).\r | |
418 | \r | |
419 | @param GlyphCount The number of glyph bitmaps.\r | |
420 | \r | |
421 | @param BitmapData The bitmap data specifies a series of\r | |
422 | pixels, one bit per pixel, left-to-right,\r | |
423 | top-tobottom. Each glyph bitmap only\r | |
424 | encodes the portion of the bitmap enclosed\r | |
425 | by its character-bounding box, but the\r | |
426 | entire glyph is padded out to the nearest\r | |
427 | byte. The number of bytes per bitmap can\r | |
428 | be calculated as: ((Cell.Width + 7)/8) *\r | |
429 | Cell.Height.\r | |
430 | \r | |
431 | \r | |
432 | **/\r | |
433 | typedef struct _EFI_HII_GIBT_GLYPH_BLOCK {\r | |
434 | EFI_HII_GLYPH_BLOCK Header;\r | |
435 | EFI_HII_GLYPH_INFO Cell;\r | |
436 | UINT16 GlyphCount;\r | |
437 | UINT8 BitmapData[1];\r | |
438 | } EFI_HII_GIBT_GLYPH_BLOCK;\r | |
439 | \r | |
440 | /**\r | |
441 | \r | |
442 | Provides the bitmaps for the characters with the values\r | |
443 | CharValueCurrent through CharValueCurrent + Count -1 and\r | |
444 | increments CharValueCurrent by Count. These glyphs have\r | |
445 | identical cell information and the encoded bitmaps are exactly\r | |
446 | the same number of byes.\r | |
447 | \r | |
448 | @param Header Standard glyph block header, where\r | |
449 | Header.BlockType = EFI_HII_GIBT_GLYPHS.\r | |
450 | \r | |
451 | @param Cell Contains the width and height of the encoded\r | |
452 | bitmap (Cell.Width and Cell.Height), the\r | |
453 | number of pixels (signed) right of the\r | |
454 | character cell origin where the left edge of\r | |
455 | the bitmap should be placed (Cell.OffsetX),\r | |
456 | the number of pixels above the character cell\r | |
457 | origin where the top edge of the bitmap should\r | |
458 | be placed (Cell.OffsetY) and the number of\r | |
459 | pixels(signed) to move right to find the\r | |
460 | origin for the next character cell\r | |
461 | (Cell.AdvanceX).\r | |
462 | \r | |
463 | @param BitmapData The bitmap data specifies a series of\r | |
464 | pixels, one bit per pixel, left-to-right,\r | |
465 | top-tobottom, for each glyph. Each glyph\r | |
466 | bitmap only encodes the portion of the\r | |
467 | bitmap enclosed by its character-bounding\r | |
468 | box. The number of bytes per bitmap can be\r | |
469 | calculated as: ((Cell.Width + 7)/8) *\r | |
470 | Cell.Height.\r | |
471 | \r | |
472 | **/\r | |
473 | typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK {\r | |
474 | EFI_HII_GLYPH_BLOCK Header;\r | |
475 | EFI_HII_GLYPH_INFO Cell;\r | |
476 | UINT8 BitmapData[1];\r | |
477 | } EFI_HII_GIBT_GLYPHS_BLOCK;\r | |
478 | \r | |
479 | /**\r | |
480 | \r | |
481 | Provides the bitmap for the character with the value\r | |
482 | CharValueCurrent and increments CharValueCurrent by 1. This\r | |
483 | glyph uses the default cell information. The default cell\r | |
484 | information is found in the font header or the most recently\r | |
485 | processed EFI_HII_GIBT_DEFAULTS.\r | |
486 | \r | |
487 | @param Header Standard glyph block header, where\r | |
488 | Header.BlockType = EFI_HII_GIBT_GLYPH_DEFAULT.\r | |
489 | \r | |
490 | @param BitmapData The bitmap data specifies a series of\r | |
491 | pixels, one bit per pixel, left-to-right,\r | |
492 | top-tobottom. Each glyph bitmap only\r | |
493 | encodes the portion of the bitmap enclosed\r | |
494 | by its character-bounding box. The number\r | |
495 | of bytes per bitmap can be calculated as:\r | |
496 | ((Global.Cell.Width + 7)/8) *\r | |
497 | Global.Cell.Height.\r | |
498 | \r | |
499 | **/\r | |
500 | typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK {\r | |
501 | EFI_HII_GLYPH_BLOCK Header;\r | |
502 | UINT8 BitmapData[1];\r | |
503 | } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK;\r | |
504 | \r | |
505 | \r | |
506 | \r | |
507 | \r | |
508 | /**\r | |
509 | \r | |
510 | Provides the bitmaps for the characters with the values\r | |
511 | CharValueCurrent through CharValueCurrent + Count -1 and\r | |
512 | increments CharValueCurrent by Count. These glyphs use the\r | |
513 | default cell information and the encoded bitmaps have exactly\r | |
514 | the same number of byes.\r | |
515 | \r | |
516 | @param Header Standard glyph block header, where\r | |
517 | Header.BlockType =\r | |
518 | EFI_HII_GIBT_GLYPHS_DEFAULT.\r | |
519 | \r | |
520 | @param Count Number of glyphs in the glyph block.\r | |
521 | \r | |
522 | @param BitmapData The bitmap data specifies a series of\r | |
523 | pixels, one bit per pixel, left-to-right,\r | |
524 | top-tobottom, for each glyph. Each glyph\r | |
525 | bitmap only encodes the portion of the\r | |
526 | bitmap enclosed by its character-bounding\r | |
527 | box. The number of bytes per bitmap can be\r | |
528 | calculated as: ((Global.Cell.Width + 7)/8)\r | |
529 | Global.Cell.Height.\r | |
530 | \r | |
531 | **/\r | |
532 | typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK {\r | |
533 | EFI_HII_GLYPH_BLOCK Header;\r | |
534 | UINT16 Count;\r | |
535 | UINT8 BitmapData[1];\r | |
536 | } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;\r | |
537 | \r | |
538 | /**\r | |
539 | \r | |
540 | Increments the current character value CharValueCurrent by the\r | |
541 | number specified.\r | |
542 | \r | |
543 | @param Header Standard glyph block header, where BlockType =\r | |
544 | EFI_HII_GIBT_SKIP1 or EFI_HII_GIBT_SKIP2.\r | |
545 | \r | |
546 | @param SkipCount The unsigned 8- or 16-bit value to add to\r | |
547 | CharValueCurrent.\r | |
548 | \r | |
549 | **/\r | |
550 | typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {\r | |
551 | EFI_HII_GLYPH_BLOCK Header;\r | |
552 | UINT16 SkipCount;\r | |
553 | } EFI_HII_GIBT_SKIP2_BLOCK;\r | |
554 | \r | |
555 | \r | |
556 | /**\r | |
557 | \r | |
558 | Increments the current character value CharValueCurrent by the\r | |
559 | number specified.\r | |
560 | \r | |
561 | @param Header Standard glyph block header, where BlockType =\r | |
562 | EFI_HII_GIBT_SKIP1 or EFI_HII_GIBT_SKIP2.\r | |
563 | \r | |
564 | @param SkipCount The unsigned 8- or 16-bit value to add to\r | |
565 | CharValueCurrent.\r | |
566 | \r | |
567 | **/\r | |
568 | typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {\r | |
569 | EFI_HII_GLYPH_BLOCK Header;\r | |
570 | UINT8 SkipCount;\r | |
571 | } EFI_HII_GIBT_SKIP1_BLOCK;\r | |
572 | \r | |
573 | \r | |
574 | /**\r | |
575 | \r | |
576 | This package is created by NewPackageList() when the package\r | |
577 | list is first added to the HII database by locating the\r | |
578 | EFI_DEVICE_PATH_PROTOCOL attached to the driver handle passed in\r | |
579 | to that function.\r | |
580 | \r | |
581 | **/\r | |
582 | typedef EFI_DEVICE_PATH_PROTOCOL EFI_HII_DEVICE_PATH_PACKAGE_HDR;\r | |
583 | \r | |
584 | \r | |
585 | /**\r | |
586 | \r | |
587 | This is a free-form package type designed to allow extensibility\r | |
588 | by allowing the format to be specified using Guid.\r | |
589 | \r | |
590 | @param Guid Identifier which describes the remaining data\r | |
591 | within the package.\r | |
592 | \r | |
593 | **/\r | |
594 | typedef struct _EFI_HII_GUID_PACKAGE_HDR {\r | |
595 | EFI_GUID Guid;\r | |
596 | } EFI_HII_GUID_PACKAGE_HDR;\r | |
597 | \r | |
598 | \r | |
599 | /**\r | |
600 | \r | |
601 | The Strings package record describes the mapping between string\r | |
602 | identifiers and the actual text of the strings themselves. The\r | |
603 | package consists of three parts: a fixed header, the string\r | |
604 | information and the font information.\r | |
605 | \r | |
606 | @param Header The standard package header, where Header.Type\r | |
607 | = EFI_HII_PACKAGE_STRINGS.\r | |
608 | \r | |
609 | @param HdrSize Size of this header.\r | |
610 | \r | |
611 | @param StringInfoOffset Offset, relative to the start of\r | |
612 | this header, of the string information.\r | |
613 | \r | |
614 | @param LanguageWindow Specifies the default values placed in\r | |
615 | the static and dynamic windows before\r | |
616 | processing each SCSU-encoded strings.\r | |
617 | \r | |
618 | \r | |
619 | @param LanguageName String identifier within the current\r | |
620 | string package of the full name of the\r | |
621 | language specified by Language. Language\r | |
622 | Language of the strings, as specified by\r | |
623 | RFC 3066.\r | |
624 | \r | |
625 | **/\r | |
626 | typedef struct _EFI_HII_STRING_PACKAGE_HDR {\r | |
627 | EFI_HII_PACKAGE_HEADER Header;\r | |
628 | UINT32 HdrSize;\r | |
629 | UINT32 StringInfoOffset;\r | |
630 | CHAR16 LanguageWindow[16];\r | |
631 | EFI_STRING_ID LanguageName;\r | |
632 | CHAR8 Language[1];\r | |
633 | } EFI_HII_STRING_PACKAGE_HDR;\r | |
634 | \r | |
635 | \r | |
636 | \r | |
637 | /**\r | |
638 | \r | |
639 | The fixed header consists of a standard record header and then\r | |
640 | the character values in this section, the flags (including the\r | |
641 | encoding method) and the offsets of the glyph information, the\r | |
642 | glyph bitmaps and the character map.\r | |
643 | \r | |
644 | @param Header The standard package header, where Header.Size\r | |
645 | EFI_HII_PACKAGE_FONTS.\r | |
646 | \r | |
647 | @param HdrSize Size of this header.\r | |
648 | \r | |
649 | @param GlyphInfoOffset The offset, relative to the start of\r | |
650 | this header, of a series of\r | |
651 | variable-length glyph blocks, each\r | |
652 | describing information about the\r | |
653 | bitmap associated with a glyph.\r | |
654 | \r | |
655 | @param Cell This contains the measurement of the widest and\r | |
656 | tallest characters in the font (Cell.Width and\r | |
657 | Cell.Height). It also contains the offset to the\r | |
658 | horizontal and vertical origin point of the\r | |
659 | character cell (Cell.OffsetX and Cell.OffsetY).\r | |
660 | Finally, it contains the default AdvanceX. The\r | |
661 | individual glyph's OffsetX and OffsetY value is\r | |
662 | added to this position to determine where to\r | |
663 | draw the top-left pixel of the character's\r | |
664 | glyph. The character glyph's AdvanceX is added\r | |
665 | to this position to determine the origin point\r | |
666 | for the next character.\r | |
667 | \r | |
668 | @param FontStyle The design style of the font, 1 bit per\r | |
669 | style. See EFI_HII_FONT_STYLE.\r | |
670 | \r | |
671 | @param FontFamily The null-terminated string with the name\r | |
672 | of the font family to which the font\r | |
673 | belongs.\r | |
674 | \r | |
675 | **/\r | |
676 | typedef struct _EFI_HII_FONT_PACKAGE_HDR {\r | |
677 | EFI_HII_PACKAGE_HEADER Header;\r | |
678 | UINT32 HdrSize;\r | |
679 | UINT32 GlyphBlockOffset;\r | |
680 | EFI_HII_GLYPH_INFO Cell;\r | |
681 | EFI_HII_FONT_STYLE FontStyle;\r | |
682 | CHAR16 FontFamily[1];\r | |
683 | } EFI_HII_FONT_PACKAGE_HDR;\r | |
684 | \r | |
685 | \r | |
686 | //\r | |
687 | // EFI_HII_STRING_BLOCK.BlockType\r | |
688 | // \r | |
689 | #define FI_HII_SIBT_END 0x00\r | |
690 | #define EFI_HII_SIBT_STRING_SCSU 0x10\r | |
691 | #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11\r | |
692 | #define EFI_HII_SIBT_STRINGS_SCSU 0x12\r | |
693 | #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13\r | |
694 | #define EFI_HII_SIBT_STRING_UCS2 0x14\r | |
695 | #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15\r | |
696 | #define EFI_HII_SIBT_STRINGS_UCS2 0x16\r | |
697 | #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17\r | |
698 | #define EFI_HII_SIBT_DUPLICATE 0x20\r | |
699 | #define EFI_HII_SIBT_SKIP2 0x21\r | |
700 | #define EFI_HII_SIBT_SKIP1 0x22\r | |
701 | #define EFI_HII_SIBT_EXT1 0x30\r | |
702 | #define EFI_HII_SIBT_EXT2 0x31\r | |
703 | #define EFI_HII_SIBT_EXT4 0x32\r | |
704 | #define EFI_HII_SIBT_FONT 0x40\r | |
705 | \r | |
706 | /**\r | |
707 | \r | |
708 | String blocks specify the text and font for the current string\r | |
709 | identifier and increment to the next string identifier.\r | |
710 | **/\r | |
711 | typedef struct {\r | |
712 | UINT8 BlockType;\r | |
713 | UINT8 BlockBody[1];\r | |
714 | } EFI_HII_STRING_BLOCK;\r | |
715 | \r | |
716 | \r | |
717 | /**\r | |
718 | \r | |
719 | Indicates that the string with string identifier\r | |
720 | StringIdCurrent is the same as a previously defined string and\r | |
721 | increments StringIdCurrent by one.\r | |
722 | \r | |
723 | @param Header Standard string block header, where\r | |
724 | Header.BlockType = EFI_HII_SIBT_DUPLICATE.\r | |
725 | \r | |
726 | @param StringId The string identifier of a previously\r | |
727 | defined string with the exact same string\r | |
728 | text. Description\r | |
729 | \r | |
730 | \r | |
731 | **/\r | |
732 | typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK {\r | |
733 | EFI_HII_STRING_BLOCK Header;\r | |
734 | EFI_STRING_ID StringId;\r | |
735 | } EFI_HII_SIBT_DUPLICATE_BLOCK;\r | |
736 | \r | |
737 | /**\r | |
738 | \r | |
739 | Any strings with a string identifier greater than or equal to\r | |
740 | StringIdCurrent are empty.\r | |
741 | \r | |
742 | @param Header Standard string block header, where\r | |
743 | Header.BlockType = EFI_HII_SIBT_END.\r | |
744 | \r | |
745 | **/\r | |
746 | typedef struct _EFI_HII_SIBT_END_BLOCK {\r | |
747 | EFI_HII_STRING_BLOCK Header;\r | |
748 | } EFI_HII_SIBT_END_BLOCK;\r | |
749 | \r | |
750 | \r | |
751 | /**\r | |
752 | \r | |
753 | These are reserved for future expansion, with length bytes\r | |
754 | included so that they can be easily skip\r | |
755 | \r | |
756 | @param Header Standard string block header, where\r | |
757 | Header.BlockType = EFI_HII_SIBT_EXT1,\r | |
758 | EFI_HII_SIBT_EXT2 or EFI_HII_SIBT_EXT4.\r | |
759 | \r | |
760 | @param Length Size of the string block, in bytes.\r | |
761 | \r | |
762 | **/\r | |
763 | typedef struct _EFI_HII_SIBT_EXT1_BLOCK {\r | |
764 | EFI_HII_STRING_BLOCK Header;\r | |
765 | UINT8 BlockType2;\r | |
766 | UINT8 Length;\r | |
767 | } EFI_HII_SIBT_EXT1_BLOCK;\r | |
768 | \r | |
769 | /**\r | |
770 | \r | |
771 | These are reserved for future expansion, with length bytes\r | |
772 | included so that they can be easily skip\r | |
773 | \r | |
774 | @param Header Standard string block header, where\r | |
775 | Header.BlockType = EFI_HII_SIBT_EXT1,\r | |
776 | EFI_HII_SIBT_EXT2 or EFI_HII_SIBT_EXT4.\r | |
777 | \r | |
778 | @param Length Size of the string block, in bytes.\r | |
779 | \r | |
780 | **/\r | |
781 | typedef struct _EFI_HII_SIBT_EXT2_BLOCK {\r | |
782 | EFI_HII_STRING_BLOCK Header;\r | |
783 | UINT8 BlockType2;\r | |
784 | UINT16 Length;\r | |
785 | } EFI_HII_SIBT_EXT2_BLOCK;\r | |
786 | \r | |
787 | /**\r | |
788 | \r | |
789 | These are reserved for future expansion, with length bytes\r | |
790 | included so that they can be easily skip\r | |
791 | \r | |
792 | @param Header Standard string block header, where\r | |
793 | Header.BlockType = EFI_HII_SIBT_EXT1,\r | |
794 | EFI_HII_SIBT_EXT2 or EFI_HII_SIBT_EXT4.\r | |
795 | \r | |
796 | @param Length Size of the string block, in bytes.\r | |
797 | \r | |
798 | **/\r | |
799 | typedef struct _EFI_HII_SIBT_EXT4_BLOCK {\r | |
800 | EFI_HII_STRING_BLOCK Header;\r | |
801 | UINT8 BlockType2;\r | |
802 | UINT32 Length;\r | |
803 | } EFI_HII_SIBT_EXT4_BLOCK;\r | |
804 | \r | |
805 | /**\r | |
806 | \r | |
807 | Associates a font identifier FontId with a font name FontName,\r | |
808 | size FontSize and style FontStyle. This font identifier may be\r | |
809 | used with the string blocks. The font identifier 0 is the\r | |
810 | default font for those string blocks which do not specify a font\r | |
811 | identifier.\r | |
812 | \r | |
813 | @param Header Standard extended header, where\r | |
814 | Header.BlockType = EFI_HII_SIBT_FONT.\r | |
815 | \r | |
816 | @param FontId Font identifier, which must be unique within\r | |
817 | the font package.\r | |
818 | \r | |
819 | @param FontSize Character cell size, in pixels, of the font.\r | |
820 | \r | |
821 | @param FontStyle Font style.\r | |
822 | \r | |
823 | @param FontName Null-terminated font family name.\r | |
824 | \r | |
825 | **/\r | |
826 | typedef struct _EFI_HII_SIBT_FONT_BLOCK {\r | |
827 | EFI_HII_SIBT_EXT2_BLOCK Header;\r | |
828 | UINT8 FontId;\r | |
829 | UINT16 FontSize;\r | |
830 | EFI_HII_FONT_STYLE FontStyle;\r | |
831 | CHAR16 FontName[1];\r | |
832 | } EFI_HII_SIBT_FONT_BLOCK;\r | |
833 | \r | |
834 | /**\r | |
835 | \r | |
836 | Increments the current string identifier StringIdCurrent by the\r | |
837 | number specified.\r | |
838 | \r | |
839 | @param Header Standard string block header, where\r | |
840 | Header.BlockType = EFI_HII_SIBT_SKIP1.\r | |
841 | \r | |
842 | @param SkipCount The unsigned 8-bit value to add to\r | |
843 | StringIdCurrent.\r | |
844 | \r | |
845 | **/\r | |
846 | typedef struct _EFI_HII_SIBT_SKIP1_BLOCK {\r | |
847 | EFI_HII_STRING_BLOCK Header;\r | |
848 | UINT8 SkipCount;\r | |
849 | } EFI_HII_SIBT_SKIP1_BLOCK;\r | |
850 | \r | |
851 | /**\r | |
852 | \r | |
853 | Increments the current string identifier StringIdCurrent by\r | |
854 | the number specified.\r | |
855 | \r | |
856 | @param Header Standard string block header, where\r | |
857 | Header.BlockType = EFI_HII_SIBT_SKIP2.\r | |
858 | \r | |
859 | @param SkipCount The unsigned 16-bit value to add to\r | |
860 | StringIdCurrent.\r | |
861 | \r | |
862 | **/\r | |
863 | typedef struct _EFI_HII_SIBT_SKIP2_BLOCK {\r | |
864 | EFI_HII_STRING_BLOCK Header;\r | |
865 | UINT16 SkipCount;\r | |
866 | } EFI_HII_SIBT_SKIP2_BLOCK;\r | |
867 | \r | |
868 | /**\r | |
869 | \r | |
870 | This string block provides the SCSU-encoded text for the string\r | |
871 | in the default font with string identifier StringIdCurrent and\r | |
872 | increments StringIdCurrent by one.\r | |
873 | \r | |
874 | @param Header Standard header where Header.BlockType =\r | |
875 | EFI_HII_SIBT_STRING_SCSU.\r | |
876 | \r | |
877 | @param StringText The string text is a null-terminated\r | |
878 | string, which is assigned to the string\r | |
879 | identifier StringIdCurrent.\r | |
880 | \r | |
881 | **/\r | |
882 | typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK {\r | |
883 | EFI_HII_STRING_BLOCK Header;\r | |
884 | UINT8 StringText[1];\r | |
885 | } EFI_HII_SIBT_STRING_SCSU_BLOCK;\r | |
886 | \r | |
887 | \r | |
888 | /**\r | |
889 | \r | |
890 | This string block provides the SCSU-encoded text for the string\r | |
891 | in the font specified by FontIdentifier with string identifier\r | |
892 | StringIdCurrent and increments StringIdCurrent by one.\r | |
893 | \r | |
894 | @param Header Standard string block header, where\r | |
895 | Header.BlockType = EFI_HII_SIBT_STRING_SCSU_FONT.\r | |
896 | \r | |
897 | @param FontIdentifier The identifier of the font to be used\r | |
898 | as the starting font for the entire\r | |
899 | string. The identifier must either be\r | |
900 | 0 for the default font or an\r | |
901 | identifier previously specified by an\r | |
902 | EFI_HII_SIBT_FONT block. Any string\r | |
903 | characters that deviates from this\r | |
904 | font family, size or style must\r | |
905 | provide an explicit control character.\r | |
906 | \r | |
907 | @param StringText The string text is a null-terminated\r | |
908 | encoded string, which is assigned to the\r | |
909 | string identifier StringIdCurrent.\r | |
910 | \r | |
911 | \r | |
912 | **/\r | |
913 | typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK {\r | |
914 | EFI_HII_STRING_BLOCK Header;\r | |
915 | UINT8 FontIdentifier;\r | |
916 | UINT8 StringText[1];\r | |
917 | } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK;\r | |
918 | \r | |
919 | \r | |
920 | /**\r | |
921 | \r | |
922 | This string block provides the SCSU-encoded text for StringCount\r | |
923 | strings which have the default font and which have sequential\r | |
924 | string identifiers. The strings are assigned the identifiers,\r | |
925 | starting with StringIdCurrent and continuing through\r | |
926 | StringIdCurrent + StringCount ??C 1. StringIdCurrent is\r | |
927 | incremented by StringCount.\r | |
928 | \r | |
929 | @param Header Standard header where Header.BlockType =\r | |
930 | EFI_HII_SIBT_STRINGS_SCSU.\r | |
931 | \r | |
932 | @param StringCount Number of strings in StringText.\r | |
933 | \r | |
934 | @param StringText The strings, where each string is a\r | |
935 | null-terminated encoded string.\r | |
936 | \r | |
937 | **/\r | |
938 | typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK {\r | |
939 | EFI_HII_STRING_BLOCK Header;\r | |
940 | UINT16 StringCount;\r | |
941 | UINT8 StringText[1];\r | |
942 | } EFI_HII_SIBT_STRINGS_SCSU_BLOCK;\r | |
943 | \r | |
944 | \r | |
945 | /**\r | |
946 | \r | |
947 | This string block provides the SCSU-encoded text for StringCount\r | |
948 | strings which have the font specified by FontIdentifier and\r | |
949 | which have sequential string identifiers. The strings are\r | |
950 | assigned the identifiers, starting with StringIdCurrent and\r | |
951 | continuing through StringIdCurrent + StringCount ??C 1.\r | |
952 | StringIdCurrent is incremented by StringCount.\r | |
953 | \r | |
954 | @param Header Standard header where Header.BlockType =\r | |
955 | EFI_HII_SIBT_STRINGS_SCSU_FONT.\r | |
956 | \r | |
957 | @param StringCount Number of strings in StringText.\r | |
958 | \r | |
959 | @param FontIdentifier The identifier of the font to be used\r | |
960 | as the starting font for the entire\r | |
961 | string. The identifier must either be\r | |
962 | 0 for the default font or an\r | |
963 | identifier previously specified by an\r | |
964 | EFI_HII_SIBT_FONT block. Any string\r | |
965 | characters that deviates from this\r | |
966 | font family, size or style must\r | |
967 | provide an explicit control character.\r | |
968 | \r | |
969 | @param StringText The strings, where each string is a\r | |
970 | null-terminated encoded string.\r | |
971 | \r | |
972 | **/\r | |
973 | typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK {\r | |
974 | EFI_HII_STRING_BLOCK Header;\r | |
975 | UINT16 StringCount;\r | |
976 | UINT8 FontIdentifier;\r | |
977 | UINT8 StringText[1];\r | |
978 | } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK;\r | |
979 | \r | |
980 | \r | |
981 | /**\r | |
982 | \r | |
983 | This string block provides the UCS-2 encoded text for the string\r | |
984 | in the default font with string identifier StringIdCurrent and\r | |
985 | increments StringIdCurrent by one.\r | |
986 | \r | |
987 | @param Header Standard header where Header.BlockType =\r | |
988 | EFI_HII_SIBT_STRING_UCS2.\r | |
989 | \r | |
990 | @param StringText The string text is a null-terminated UCS-2\r | |
991 | string, which is assigned to the string\r | |
992 | identifier StringIdCurrent.\r | |
993 | \r | |
994 | **/\r | |
995 | typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK {\r | |
996 | EFI_HII_STRING_BLOCK Header;\r | |
997 | CHAR16 StringText[1];\r | |
998 | } EFI_HII_SIBT_STRING_UCS2_BLOCK;\r | |
999 | \r | |
1000 | \r | |
1001 | /**\r | |
1002 | \r | |
1003 | This string block provides the UCS-2 encoded text for the string\r | |
1004 | in the font specified by FontIdentifier with string identifier\r | |
1005 | StringIdCurrent and increments StringIdCurrent by one\r | |
1006 | \r | |
1007 | @param Header Standard header where Header.BlockType =\r | |
1008 | EFI_HII_SIBT_STRING_UCS2_FONT.\r | |
1009 | \r | |
1010 | @param FontIdentifier The identifier of the font to be used\r | |
1011 | as the starting font for the entire\r | |
1012 | string. The identifier must either be\r | |
1013 | 0 for the default font or an\r | |
1014 | identifier previously specified by an\r | |
1015 | EFI_HII_SIBT_FONT block. Any string\r | |
1016 | characters that deviates from this\r | |
1017 | font family, size or style must\r | |
1018 | provide an explicit control character.\r | |
1019 | \r | |
1020 | @param StringText The string text is a null-terminated UCS-2\r | |
1021 | string, which is assigned to the string\r | |
1022 | identifier StringIdCurrent.\r | |
1023 | \r | |
1024 | **/\r | |
1025 | typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK {\r | |
1026 | EFI_HII_STRING_BLOCK Header;\r | |
1027 | UINT8 FontIdentifier;\r | |
1028 | CHAR16 StringText[1];\r | |
1029 | } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK;\r | |
1030 | \r | |
1031 | \r | |
1032 | /**\r | |
1033 | \r | |
1034 | This string block provides the UCS-2 encoded text for the\r | |
1035 | strings in the default font with string identifiers\r | |
1036 | StringIdCurrent to StringIdCurrent + StringCount - 1 and\r | |
1037 | increments StringIdCurrent by StringCount.\r | |
1038 | \r | |
1039 | @param Header Standard header where Header.BlockType =\r | |
1040 | EFI_HII_SIBT_STRINGS_UCS2.\r | |
1041 | \r | |
1042 | @param StringCount Number of strings in StringText.\r | |
1043 | \r | |
1044 | @param StringText The string text is a series of\r | |
1045 | null-terminated UCS-2 strings, which are\r | |
1046 | assigned to the string identifiers\r | |
1047 | StringIdCurrent.to StringIdCurrent +\r | |
1048 | StringCount - 1.\r | |
1049 | \r | |
1050 | **/\r | |
1051 | typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK {\r | |
1052 | EFI_HII_STRING_BLOCK Header;\r | |
1053 | UINT16 StringCount;\r | |
1054 | CHAR16 StringText[1];\r | |
1055 | } EFI_HII_SIBT_STRINGS_UCS2_BLOCK;\r | |
1056 | \r | |
1057 | \r | |
1058 | /**\r | |
1059 | \r | |
1060 | The fixed header consists of a standard record header and the\r | |
1061 | offsets of the image and palette information.\r | |
1062 | \r | |
1063 | @param Header Standard package header, where Header.Type =\r | |
1064 | EFI_HII_PACKAGE_IMAGES. ImageInfoOffset\r | |
1065 | Offset, relative to this header, of the image\r | |
1066 | information. If this is zero, then there are\r | |
1067 | no images in the package.\r | |
1068 | \r | |
1069 | @param PaletteInfoOffset Offset, relative to this header, of\r | |
1070 | the palette information. If this is\r | |
1071 | zero, then there are no palettes in\r | |
1072 | the image package.\r | |
1073 | \r | |
1074 | **/\r | |
1075 | typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {\r | |
1076 | EFI_HII_PACKAGE_HEADER Header;\r | |
1077 | UINT32 ImageInfoOffset;\r | |
1078 | UINT32 PaletteInfoOffset;\r | |
1079 | } EFI_HII_IMAGE_PACKAGE_HDR;\r | |
1080 | \r | |
1081 | \r | |
1082 | //\r | |
1083 | // EFI_HII_IMAGE_BLOCK\r | |
1084 | // \r | |
1085 | typedef struct _EFI_HII_IMAGE_BLOCK {\r | |
1086 | UINT8 BlockType;\r | |
1087 | UINT8 BlockBody[1];\r | |
1088 | } EFI_HII_IMAGE_BLOCK;\r | |
1089 | \r | |
1090 | //\r | |
1091 | // EFI_HII_IMAGE_BLOCK.BlockType.\r | |
1092 | // \r | |
1093 | #define EFI_HII_IIBT_END 0x00\r | |
1094 | #define EFI_HII_IIBT_IMAGE_1BIT 0x10\r | |
1095 | #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11\r | |
1096 | #define EFI_HII_IIBT_IMAGE_4BIT 0x12\r | |
1097 | #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13\r | |
1098 | #define EFI_HII_IIBT_IMAGE_8BIT 0x14\r | |
1099 | #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15\r | |
1100 | #define EFI_HII_IIBT_IMAGE_24BIT 0x16\r | |
1101 | #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17\r | |
1102 | #define EFI_HII_IIBT_IMAGE_JPEG 0x18\r | |
1103 | #define EFI_HII_IIBT_DUPLICATE 0x20\r | |
1104 | #define EFI_HII_IIBT_SKIP2 0x21\r | |
1105 | #define EFI_HII_IIBT_SKIP1 0x22\r | |
1106 | #define EFI_HII_IIBT_EXT1 0x30\r | |
1107 | #define EFI_HII_IIBT_EXT2 0x31\r | |
1108 | #define EFI_HII_IIBT_EXT4 0x32\r | |
1109 | \r | |
1110 | \r | |
1111 | /**\r | |
1112 | \r | |
1113 | Any images with an image identifier greater than or equal to\r | |
1114 | ImageIdCurrent are empty.\r | |
1115 | \r | |
1116 | @param Header Standard image block header, where\r | |
1117 | Header.BlockType = EFI_HII_IIBT_END.\r | |
1118 | \r | |
1119 | **/\r | |
1120 | typedef struct _EFI_HII_IIBT_END_BLOCK {\r | |
1121 | EFI_HII_IMAGE_BLOCK Header;\r | |
1122 | } EFI_HII_IIBT_END_BLOCK;\r | |
1123 | \r | |
1124 | \r | |
1125 | /**\r | |
1126 | \r | |
1127 | Future extensions for image records which need a length-byte\r | |
1128 | length use this prefix.\r | |
1129 | \r | |
1130 | @param Header Standard image block header, where\r | |
1131 | Header.BlockType = EFI_HII_IIBT_EXT1,\r | |
1132 | EFI_HII_IIBT_EXT2 or EFI_HII_IIBT_EXT4.\r | |
1133 | \r | |
1134 | @param Length Size of the image block, in bytes, including\r | |
1135 | the image block header.\r | |
1136 | \r | |
1137 | **/\r | |
1138 | typedef struct _EFI_HII_IIBT_EXT1_BLOCK {\r | |
1139 | EFI_HII_IMAGE_BLOCK Header;\r | |
1140 | UINT8 BlockType2;\r | |
1141 | UINT8 Length;\r | |
1142 | } EFI_HII_IIBT_EXT1_BLOCK;\r | |
1143 | \r | |
1144 | /**\r | |
1145 | \r | |
1146 | Future extensions for image records which need a length-byte\r | |
1147 | length use this prefix.\r | |
1148 | \r | |
1149 | @param Header Standard image block header, where\r | |
1150 | Header.BlockType = EFI_HII_IIBT_EXT1,\r | |
1151 | EFI_HII_IIBT_EXT2 or EFI_HII_IIBT_EXT4.\r | |
1152 | \r | |
1153 | @param Length Size of the image block, in bytes, including\r | |
1154 | the image block header.\r | |
1155 | \r | |
1156 | **/\r | |
1157 | typedef struct _EFI_HII_IIBT_EXT2_BLOCK {\r | |
1158 | EFI_HII_IMAGE_BLOCK Header;\r | |
1159 | UINT8 BlockType2;\r | |
1160 | UINT16 Length;\r | |
1161 | } EFI_HII_IIBT_EXT2_BLOCK;\r | |
1162 | \r | |
1163 | /**\r | |
1164 | \r | |
1165 | Future extensions for image records which need a length-byte\r | |
1166 | length use this prefix.\r | |
1167 | \r | |
1168 | @param Header Standard image block header, where\r | |
1169 | Header.BlockType = EFI_HII_IIBT_EXT1,\r | |
1170 | EFI_HII_IIBT_EXT2 or EFI_HII_IIBT_EXT4.\r | |
1171 | \r | |
1172 | @param Length Size of the image block, in bytes, including\r | |
1173 | the image block header.\r | |
1174 | \r | |
1175 | **/\r | |
1176 | typedef struct _EFI_HII_IIBT_EXT4_BLOCK {\r | |
1177 | EFI_HII_IMAGE_BLOCK Header;\r | |
1178 | UINT8 BlockType2;\r | |
1179 | UINT32 Length;\r | |
1180 | } EFI_HII_IIBT_EXT4_BL0CK;\r | |
1181 | \r | |
1182 | //\r | |
1183 | // EFI_HII_IIBT_IMAGE_1BIT_BASE\r | |
1184 | // \r | |
1185 | typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE {\r | |
1186 | UINT16 Width;\r | |
1187 | UINT16 Height;\r | |
1188 | // UINT8 Data[...];\r | |
1189 | } EFI_HII_IIBT_IMAGE_1BIT_BASE;\r | |
1190 | \r | |
1191 | /**\r | |
1192 | \r | |
1193 | This record assigns the 1-bit-per-pixel bitmap data to the\r | |
1194 | ImageIdCurrent identifier and increment ImageIdCurrent by one.\r | |
1195 | The data in the EFI_HII_IMAGE_1BIT_TRANS structure is exactly\r | |
1196 | the same as the EFI_HII_IMAGE_1BIT structure, the difference is\r | |
1197 | how the data is treated. The bitmap pixel value 0 is the\r | |
1198 | transparency value and will not be written to the\r | |
1199 | screen. The bitmap pixel value 1 will be translated to the color\r | |
1200 | specified by Palette.\r | |
1201 | \r | |
1202 | @param Header Standard image header, where Header.BlockType\r | |
1203 | = EFI_HII_IIBT_IMAGE_1BIT_TRANS.\r | |
1204 | \r | |
1205 | @param PaletteIndex Index of the palette in the palette\r | |
1206 | information.\r | |
1207 | \r | |
1208 | @param Bitmap The bitmap specifies a series of pixels, one\r | |
1209 | bit per pixel, left-to-right, top-to-bottom,\r | |
1210 | and is padded out to the nearest byte. The\r | |
1211 | number of bytes per bitmap can be calculated\r | |
1212 | as: ((Width + 7)/8) * Height.\r | |
1213 | \r | |
1214 | **/\r | |
1215 | typedef struct _EFI_HII_IBIT_IMAGE_1BIT_BLOCK {\r | |
1216 | EFI_HII_IMAGE_BLOCK Header;\r | |
1217 | UINT8 PaletteIndex;\r | |
1218 | EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;\r | |
1219 | } EFI_HII_IIBT_IMAGE_1BIT_BLOCK;\r | |
1220 | \r | |
1221 | typedef EFI_HII_IIBT_IMAGE_1BIT_BLOCK EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK;\r | |
1222 | \r | |
1223 | \r | |
1224 | //\r | |
1225 | // EFI_HII_RGB_PIXEL\r | |
1226 | // \r | |
1227 | typedef struct _EFI_HII_RGB_PIXEL {\r | |
1228 | UINT8 b;\r | |
1229 | UINT8 g;\r | |
1230 | UINT8 r;\r | |
1231 | } EFI_HII_RGB_PIXEL;\r | |
1232 | \r | |
1233 | //\r | |
1234 | // FI_HII_IIBT_IMAGE_24BIT_BASE\r | |
1235 | // \r | |
1236 | typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE {\r | |
1237 | UINT16 Width;\r | |
1238 | UINT16 Height;\r | |
1239 | // EFI_HII_RGB_PIXEL Bitmap[...];\r | |
1240 | } EFI_HII_IIBT_IMAGE_24BIT_BASE;\r | |
1241 | \r | |
1242 | /**\r | |
1243 | \r | |
1244 | This record assigns the 24-bit-per-pixel bitmap data to the \r | |
1245 | ImageIdCurrent identifier and increment ImageIdCurrent by one. \r | |
1246 | The image's upper left hand corner pixel is composed of the\r | |
1247 | first three bitmap bytes. The first byte is the pixel????s blue \r | |
1248 | component value, the next byte is the pixel????s green component \r | |
1249 | value, and the third byte is the pixel's red component value\r | |
1250 | (B,G,R). Each color component value can vary from 0x00 (color \r | |
1251 | off) to 0xFF (color full on), allowing 16.8 millions colors that \r | |
1252 | can be specified.\r | |
1253 | \r | |
1254 | @param Header Standard image header, where Header.BlockType\r | |
1255 | = EFI_HII_IIBT_IMAGE_24BIT. Bitmap The bitmap\r | |
1256 | specifies a series of pixels, 24 bits per\r | |
1257 | pixel, left-to-right, top-to-bottom. The\r | |
1258 | number of bytes per bitmap can be calculated\r | |
1259 | as: (Width * 3) * Height.\r | |
1260 | \r | |
1261 | @param Type See EFI_HII_RGB_PIXEL definition.\r | |
1262 | \r | |
1263 | **/\r | |
1264 | typedef struct {\r | |
1265 | EFI_HII_IMAGE_BLOCK Header;\r | |
1266 | EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;\r | |
1267 | } EFI_HII_IIBT_IMAGE_24BIT_BLOCK;\r | |
1268 | \r | |
1269 | typedef EFI_HII_IIBT_IMAGE_24BIT_BLOCK EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK;\r | |
1270 | \r | |
1271 | \r | |
1272 | \r | |
1273 | //\r | |
1274 | // EFI_HII_IIBT_IMAGE_4BIT_BASE\r | |
1275 | // \r | |
1276 | typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE {\r | |
1277 | UINT16 Width;\r | |
1278 | UINT16 Height;\r | |
1279 | // UINT8 Data[...];\r | |
1280 | } EFI_HII_IIBT_IMAGE_4BIT_BASE;\r | |
1281 | \r | |
1282 | /**\r | |
1283 | \r | |
1284 | This record assigns the 4-bit-per-pixel bitmap data to the\r | |
1285 | ImageIdCurrent identifier using the specified palette and\r | |
1286 | increment ImageIdCurrent by one. The image????s upper left hand\r | |
1287 | corner pixel is the most significant nibble of the first bitmap\r | |
1288 | byte.\r | |
1289 | \r | |
1290 | @param Header Standard image header, where Header.BlockType\r | |
1291 | = EFI_HII_IIBT_IMAGE_4BIT.\r | |
1292 | \r | |
1293 | @param PaletteIndex Index of the palette in the palette\r | |
1294 | information.\r | |
1295 | \r | |
1296 | @param Bitmap The bitmap specifies a series of pixels, four\r | |
1297 | bits per pixel, left-to-right, top-to-bottom,\r | |
1298 | and is padded out to the nearest byte. The\r | |
1299 | number of bytes per bitmap can be calculated\r | |
1300 | as: ((Width + 1)/2) Height.\r | |
1301 | \r | |
1302 | **/\r | |
1303 | typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK {\r | |
1304 | EFI_HII_IMAGE_BLOCK Header;\r | |
1305 | UINT8 PaletteIndex;\r | |
1306 | EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;\r | |
1307 | } EFI_HII_IIBT_IMAGE_4BIT_BLOCK;\r | |
1308 | \r | |
1309 | typedef EFI_HII_IIBT_IMAGE_4BIT_BLOCK EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK;\r | |
1310 | \r | |
1311 | \r | |
1312 | \r | |
1313 | //\r | |
1314 | // EFI_HII_IIBT_IMAGE_8BIT_BASE \r | |
1315 | // \r | |
1316 | typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE {\r | |
1317 | UINT16 Width;\r | |
1318 | UINT16 Height;\r | |
1319 | // UINT8 Data[...];\r | |
1320 | } EFI_HII_IIBT_IMAGE_8BIT_BASE;\r | |
1321 | \r | |
1322 | /**\r | |
1323 | \r | |
1324 | This record assigns the 8-bit-per-pixel bitmap data to the\r | |
1325 | ImageIdCurrent identifier using the specified palette and\r | |
1326 | increment ImageIdCurrent by one. The image????s upper left hand\r | |
1327 | corner pixel is the first bitmap byte.\r | |
1328 | \r | |
1329 | @param Header Standard image header, where Header.BlockType\r | |
1330 | = EFI_HII_IIBT_IMAGE_8BIT.\r | |
1331 | \r | |
1332 | @param PaletteIndex Index of the palette in the palette\r | |
1333 | information.\r | |
1334 | \r | |
1335 | @param Bitmap The bitmap specifies a series of pixels, eight\r | |
1336 | bits per pixel, left-to-right, top-to-bottom.\r | |
1337 | The number of bytes per bitmap can be\r | |
1338 | calculated as: Width * Height.\r | |
1339 | \r | |
1340 | **/\r | |
1341 | typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE {\r | |
1342 | EFI_HII_IMAGE_BLOCK Header;\r | |
1343 | UINT8 PaletteIndex;\r | |
1344 | EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;\r | |
1345 | } EFI_HII_IIBT_IMAGE_8BIT_PALETTE;\r | |
1346 | \r | |
1347 | typedef EFI_HII_IIBT_IMAGE_8BIT_PALETTE EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK;\r | |
1348 | \r | |
1349 | \r | |
1350 | /**\r | |
1351 | \r | |
1352 | Indicates that the image with image ID ImageValueCurrent has the\r | |
1353 | same image as a previously defined image ID and increments\r | |
1354 | ImageValueCurrent by one\r | |
1355 | \r | |
1356 | @param Header Standard image header, where Header.BlockType\r | |
1357 | = EFI_HII_IIBT_DUPLICATE.\r | |
1358 | \r | |
1359 | @param ImageId The previously defined image ID with the exact\r | |
1360 | same image.\r | |
1361 | \r | |
1362 | \r | |
1363 | **/\r | |
1364 | typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK {\r | |
1365 | EFI_HII_IMAGE_BLOCK Header;\r | |
1366 | EFI_IMAGE_ID ImageId;\r | |
1367 | } EFI_HII_IIBT_DUPLICATE_BLOCK;\r | |
1368 | \r | |
1369 | \r | |
1370 | /**\r | |
1371 | \r | |
1372 | This record assigns the JPEG image data to the ImageIdCurrent\r | |
1373 | identifier and increment ImageIdCurrent by one. The JPEG decoder\r | |
1374 | is only required to cover the basic JPEG encoding types, which\r | |
1375 | are produced by standard available paint packages (for example:\r | |
1376 | MSPaint under Windows from Microsoft). This would include JPEG\r | |
1377 | encoding of high (1:1:1) and medium (4:1:1) quality with only\r | |
1378 | three components (R,G,B) ??C no support for the special gray\r | |
1379 | component encoding.\r | |
1380 | \r | |
1381 | @param Header Standard image header, where Header.BlockType\r | |
1382 | = EFI_HII_IIBT_IMAGE_JPEG.\r | |
1383 | \r | |
1384 | @param Size Specifies the size of the JPEG encoded data.\r | |
1385 | \r | |
1386 | @param Data JPEG encoded data with ????JFIF???? signature at\r | |
1387 | offset 6 in the data block. The JPEG encoded\r | |
1388 | data, specifies type of encoding and final size\r | |
1389 | of true-color image.\r | |
1390 | \r | |
1391 | **/\r | |
1392 | typedef struct _EFI_HII_IIBT_JPEG {\r | |
1393 | EFI_HII_IMAGE_BLOCK Header;\r | |
1394 | UINT32 Size;\r | |
1395 |