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