add a error macro to prevent this file from included for now #error "UEFI 2.1 HII...
[mirror_edk2.git] / MdePkg / Include / Protocol / HiiDatabase.h
1 /** @file
2 The file provides Database manager for HII-related data
3 structures.
4
5 Copyright (c) 2006 - 2007, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef __HII_DATABASE_H__
17 #define __HII_DATABASE_H__
18
19 #error "UEFI 2.1 HII is not fully implemented for now, Please don't include this file now."
20
21 #define EFI_HII_DATABASE_PROTOCOL_GUID \
22 { 0xef9fc172, 0xa1b2, 0x4693, { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } }
23
24
25 typedef struct _EFI_HII_DATABASE_PROTOCOL EFI_HII_DATABASE_PROTOCOL;
26
27 //
28 // ConfigurationS of HII.
29 //
30 #define GLYPH_WIDTH 8
31 #define GLYPH_HEIGHT 19
32
33 /**
34
35 Each package starts with a header, as defined above, which
36 indicates the size and type of the package. When added to a
37 pointer pointing to the start of the header, Length points at
38 the next package. The package lists form a package list when
39 concatenated together and terminated with an
40 EFI_HII_PACKAGE_HEADER with a Type of EFI_HII_PACKAGE_END. The
41 type EFI_HII_PACKAGE_TYPE_GUID is used for vendor-defined HII
42 packages, whose contents are determined by the Guid. The range
43 of package types starting with EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN
44 through EFI_HII_PACKAGE_TYPE_SYSTEM_END are reserved for system
45 firmware implementers.
46
47 @param Length The size of the package in bytes.
48
49 @param Type The package type. See EFI_HII_PACKAGE_TYPE_x,
50 below.
51
52 @param Data The package data, the format of which is
53 determined by Type.
54
55 **/
56 typedef struct {
57 UINT32 Length:24;
58 UINT32 Type:8;
59 // UINT8 Data[...];
60 } EFI_HII_PACKAGE_HEADER;
61
62 //
63 // EFI_HII_PACKAGE_TYPE_x.
64 //
65 #define EFI_HII_PACKAGE_TYPE_ALL 0x00
66 #define EFI_HII_PACKAGE_TYPE_GUID 0x01
67 #define EFI_HII_PACKAGE_FORM_CONFIG 0x02
68 #define EFI_HII_PACKAGE_FORM_APP 0x03
69 #define EFI_HII_PACKAGE_STRINGS 0x04
70 #define EFI_HII_PACKAGE_FONTS 0x05
71 #define EFI_HII_PACKAGE_IMAGES 0x06
72 #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
73 #define EFI_HII_PACKAGE_DEVICE_PATH 0x08
74 #define EFI_HII_PACKAGE_END 0x09
75 #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
76 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
77
78
79 /**
80
81 This header uniquely identifies the package list.and is placed
82 in front of a list of packages. Package lists with the same
83 PackageListGuid value should contain the same data set. Updated
84 versions should have updated GUIDs.
85
86 @param PackageListGuid The unique identifier applied to the
87 list of packages which follows.
88
89
90 @param PackageLength The size of the package list (in
91 bytes), including the header.
92
93 **/
94 typedef struct {
95 EFI_GUID PackageListGuid;
96 UINT32 PackagLength;
97 } EFI_HII_PACKAGE_LIST_HEADER;
98
99 /**
100
101 The fonts must be presented in Unicode sort order. That is,
102 the primary sort key is the UnicodeWeight and the secondary
103 sort key is the SurrogateWeight. It is up to developers who
104 manage fonts to choose efficient mechanisms for accessing
105 fonts. The contiguous presentation can easily be used because
106 narrow and wide glyphs are not intermixed, so a binary search
107 is possible (hence the requirement that the glyphs be sorted
108 by weight).
109
110 @param Header The header contains a Length and Type field.
111 In the case of a font package, the type will
112 be EFI_HII_PACKAGE_SIMPLE_FONTS and the length
113 will be the total size of the font package
114 including the size of the narrow and wide
115 glyphs. See EFI_HII_PACKAGE_HEADER.
116
117 @param NumberOfNarrowGlyphs The number of NarrowGlyphs that
118 are included in the font package.
119
120 @param NumberOfWideGlyphs The number of WideGlyphs that are
121 included in the font package.
122
123 @param NarrowGlyphs An array of EFI_NARROW_GLYPH entries.
124 The number of entries is specified by
125 NumberOfNarrowGlyphs.
126
127 @param WideGlyphs An array of EFI_WIDE_GLYPH entries. The
128 number of entries is specified by
129 NumberOfWideGlyphs. To calculate the
130 offset of WideGlyphs, use the offset of
131 NarrowGlyphs and add the size of
132 EFI_NARROW_GLYPH multiplied by the
133 NumberOfNarrowGlyphs.
134
135 */
136 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
137 EFI_HII_PACKAGE_HEADER Header;
138 UINT16 NumberOfNarrowGlyphs;
139 UINT16 NumberOfWideGlyphs;
140 // EFI_NARROW_GLYPH NarrowGlyphs[];
141 // EFI_WIDE_GLYPH WideGlyphs[];
142 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR;
143
144 //
145 // Contents of EFI_NARROW_GLYPH.Attributes
146 //
147 #define EFI_GLYPH_NON_SPACING 0x01
148 #define EFI_GLYPH_WIDE 0x02
149
150 /**
151
152 Glyphs are represented by two structures, one each for the two
153 sizes of glyphs. The narrow glyph (EFI_NARROW_GLYPH) is the
154 normal glyph used for text display.
155
156 @param UnicodeWeight The Unicode representation of the glyph.
157 The term weight is the technical term
158 for a character value.
159
160 @param Attributes The data element containing the glyph
161 definitions; see Related Definitions
162 below.
163
164 @param GlyphCol1 The column major glyph representation of the
165 character. Bits with values of one
166 indicate that the corresponding pixel is to
167 be on when normally displayed; those with
168 zero are off.
169
170 **/
171 typedef struct {
172 CHAR16 UnicodeWeight;
173 UINT8 Attributes;
174 UINT8 GlyphCol1[19];
175 } EFI_NARROW_GLYPH;
176
177 /**
178
179 Glyphs are represented via the two structures, one each for the
180 two sizes of glyphs. The wide glyph (EFI_WIDE_GLYPH) is large
181 enough to display logographic characters.
182
183 @param UnicodeWeight The Unicode representation of the glyph.
184 The term weight is the technical term
185 for a character value.
186
187 @param Attributes The data element containing the glyph
188 definitions; see Related Definitions in
189 EFI_NARROW_GLYPH for attribute values.
190
191 @param GlyphCol1, GlyphCol2 The column major glyph
192 representation of the character.
193 Bits with values of one indicate
194 that the corresponding pixel is
195 to be on when normally
196 displayed; those with zero are
197 off.
198
199 @param Pad Ensures that sizeof(EFI_WIDE_GLYPH) is twice the
200 sizeof(EFI_NARROW_GLYPH). The contents of Pad must
201 bezero.
202
203
204 **/
205 typedef struct {
206 CHAR16 UnicodeWeight;
207 UINT8 Attributes;
208 UINT8 GlyphCol1[GLYPH_HEIGHT];
209 UINT8 GlyphCol2[GLYPH_HEIGHT];
210 UINT8 Pad[3];
211 } EFI_WIDE_GLYPH;
212
213
214 //
215 // EFI_HII_FONT_STYLE
216 //
217 typedef UINT32 EFI_HII_FONT_STYLE;
218 #define EFI_HII_FONT_STYLE_BOLD 0x00000001
219 #define EFI_HII_FONT_STYLE_ITALIC 0x00000002
220 #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
221 #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
222 #define EFI_HII_FONT_STYLE_SHADOW 0x00040000
223 #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
224 #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
225
226 //
227 // EFI_HII_GLYPH_BLOCK.BlockType
228 //
229 #define EFI_HII_GIBT_END 0x00
230 #define EFI_HII_GIBT_GLYPH 0x10
231 #define EFI_HII_GIBT_GLYPHS 0x11
232 #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
233 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
234 #define EFI_HII_GIBT_DUPLICATE 0x20
235 #define EFI_HII_GIBT_SKIP2 0x21
236 #define EFI_HII_GIBT_SKIP1 0x22
237 #define EFI_HII_GIBT_DEFAULTS 0x23
238 #define EFI_HII_GIBT_EXT1 0x30
239 #define EFI_HII_GIBT_EXT2 0x31
240 #define EFI_HII_GIBT_EXT4 0x32
241
242 /**
243
244 EFI_HII_GIBT_END block is found. When processing the glyph
245 blocks, each block refers to the current character value
246 (CharValueCurrent), which is initially set to one (1). Glyph
247 blocks of an unknown type should be skipped. If they cannot be
248 skipped, then processing halts.
249
250 **/
251 typedef struct _EFI_HII_GLYPH_BLOCK {
252 UINT8 BlockType;
253 UINT8 BlockBody[1];
254 } EFI_HII_GLYPH_BLOCK;
255
256
257 /**
258
259 @param Width Width of the character or character cell, in
260 pixels. For fixed-pitch fonts, this is the same
261 as the advance.
262
263 @param Height Height of the character or character cell, in
264 pixels.
265
266 @param OffsetX Offset to the horizontal edge of the character
267 cell.
268
269 @param OffsetY Offset to the vertical edge of the character
270 cell.
271
272 @param AdvanceX Number of pixels to advance to the right
273 when moving from the origin of the current
274 glyph to the origin of the next glyph.
275
276 **/
277 typedef struct _EFI_HII_GLYPH_INFO {
278 UINT16 Width;
279 UINT16 Height;
280 INT16 OffsetX;
281 INT16 OffsetY;
282 INT16 AdvanceX;
283 } EFI_HII_GLYPH_INFO;
284
285
286 /**
287
288 Changes the default cell information used for subsequent
289 EFI_HII_GIBT_GLYPH_DEFAULT and EFI_HII_GIBT_GLYPHS_DEFAULT glyph
290 blocks. The cell information described by Cell remains in effect
291 until the next EFI_HII_GIBT_DEFAULTS is found. Prior to the
292 first EFI_HII_GIBT_DEFAULTS block, the cell information in the
293 fixed header are used.
294
295 @param Header Standard glyph block header, where
296 Header.BlockType = EFI_HII_GIBT_DEFAULTS.
297
298 @param Cell The new default cell information which will be
299 applied to all subsequent GLYPH_DEFAULT and
300 GLYPHS_DEFAULT blocks.
301
302 **/
303 typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK {
304 EFI_HII_GLYPH_BLOCK Header;
305 EFI_HII_GLYPH_INFO Cell;
306 } EFI_HII_GIBT_DEFAULTS_BLOCK;
307
308
309 /**
310
311 Indicates that the glyph with character value CharValueCurrent
312 has the same glyph as a previously defined character value and
313 increments CharValueCurrent by one.
314
315 @param Header Standard glyph block header, where
316 Header.BlockType = EFI_HII_GIBT_DUPLICATE.
317
318 @param CharValue The previously defined character value with
319 the exact same glyph.
320
321 **/
322 typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK {
323 EFI_HII_GLYPH_BLOCK Header;
324 CHAR16 CharValue;
325 } EFI_HII_GIBT_DUPLICATE_BLOCK;
326
327
328 /**
329
330 Any glyphs with a character value greater than or equal to
331 CharValueCurrent are empty.
332
333 @param Header Standard glyph block header, where
334 Header.BlockType = EFI_HII_GIBT_END.
335
336 **/
337 typedef struct _EFI_GLYPH_GIBT_END_BLOCK {
338 EFI_HII_GLYPH_BLOCK Header;
339 } EFI_GLYPH_GIBT_END_BLOCK;
340
341 /**
342
343 These are reserved for future expansion, with length bytes
344 included so that they can be easily skipped.
345
346 @param Header Standard glyph block header, where
347 Header.BlockType = EFI_HII_GIBT_EXT1,
348 EFI_HII_GIBT_EXT2 or EFI_HII_GIBT_EXT4.
349
350 @param Length Size of the glyph block, in bytes.
351
352 **/
353 typedef struct _EFI_HII_GIBT_EXT1_BLOCK {
354 EFI_HII_GLYPH_BLOCK Header;
355 UINT8 BlockType2;
356 UINT8 Length;
357 } EFI_HII_GIBT_EXT1_BLOCK;
358
359
360 /**
361
362 These are reserved for future expansion, with length bytes
363 included so that they can be easily skipped.
364
365 @param Header Standard glyph block header, where
366 Header.BlockType = EFI_HII_GIBT_EXT1,
367 EFI_HII_GIBT_EXT2 or EFI_HII_GIBT_EXT4.
368
369 @param Length Size of the glyph block, in bytes.
370
371 **/
372 typedef struct _EFI_HII_GIBT_EXT2_BLOCK {
373 EFI_HII_GLYPH_BLOCK Header;
374 UINT8 BlockType2;
375 UINT16 Length;
376 } EFI_HII_GIBT_EXT2_BLOCK;
377
378 /**
379
380 These are reserved for future expansion, with length bytes
381 included so that they can be easily skipped.
382
383 @param Header Standard glyph block header, where
384 Header.BlockType = EFI_HII_GIBT_EXT1,
385 EFI_HII_GIBT_EXT2 or EFI_HII_GIBT_EXT4.
386
387 @param Length Size of the glyph block, in bytes.
388
389 **/
390 typedef struct _EFI_HII_GIBT_EXT4_BLOCK {
391 EFI_HII_GLYPH_BLOCK Header;
392 UINT8 BlockType2;
393 UINT32 Length;
394 } EFI_HII_GIBT_EXT4_BLOCK;
395
396
397 /**
398
399 This block provides the bitmap for the character with the value
400 CharValueCurrent and increments CharValueCurrent by one. Each
401 glyph contains a glyph width and height, a drawing offset,
402 number of pixels to advance after drawing and then the encoded
403 bitmap.
404
405 @param Header Standard glyph block header, where
406 Header.BlockType = EFI_HII_GIBT_GLYPH.
407
408 @param Cell Contains the width and height of the encoded
409 bitmap (Cell.Width and Cell.Height), the number
410 of pixels (signed) right of the character cell
411 origin where the left edge of the bitmap should
412 be placed (Cell.OffsetX), the number of pixels
413 above the character cell origin where the top
414 edge of the bitmap should be placed
415 (Cell.OffsetY) and the number of pixels (signed)
416 to move right to find the origin for the next
417 charactercell (Cell.AdvanceX).
418
419 @param GlyphCount The number of glyph bitmaps.
420
421 @param BitmapData The bitmap data specifies a series of
422 pixels, one bit per pixel, left-to-right,
423 top-tobottom. Each glyph bitmap only
424 encodes the portion of the bitmap enclosed
425 by its character-bounding box, but the
426 entire glyph is padded out to the nearest
427 byte. The number of bytes per bitmap can
428 be calculated as: ((Cell.Width + 7)/8) *
429 Cell.Height.
430
431
432 **/
433 typedef struct _EFI_HII_GIBT_GLYPH_BLOCK {
434 EFI_HII_GLYPH_BLOCK Header;
435 EFI_HII_GLYPH_INFO Cell;
436 UINT16 GlyphCount;
437 UINT8 BitmapData[1];
438 } EFI_HII_GIBT_GLYPH_BLOCK;
439
440 /**
441
442 Provides the bitmaps for the characters with the values
443 CharValueCurrent through CharValueCurrent + Count -1 and
444 increments CharValueCurrent by Count. These glyphs have
445 identical cell information and the encoded bitmaps are exactly
446 the same number of byes.
447
448 @param Header Standard glyph block header, where
449 Header.BlockType = EFI_HII_GIBT_GLYPHS.
450
451 @param Cell Contains the width and height of the encoded
452 bitmap (Cell.Width and Cell.Height), the
453 number of pixels (signed) right of the
454 character cell origin where the left edge of
455 the bitmap should be placed (Cell.OffsetX),
456 the number of pixels above the character cell
457 origin where the top edge of the bitmap should
458 be placed (Cell.OffsetY) and the number of
459 pixels(signed) to move right to find the
460 origin for the next character cell
461 (Cell.AdvanceX).
462
463 @param BitmapData The bitmap data specifies a series of
464 pixels, one bit per pixel, left-to-right,
465 top-tobottom, for each glyph. Each glyph
466 bitmap only encodes the portion of the
467 bitmap enclosed by its character-bounding
468 box. The number of bytes per bitmap can be
469 calculated as: ((Cell.Width + 7)/8) *
470 Cell.Height.
471
472 **/
473 typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK {
474 EFI_HII_GLYPH_BLOCK Header;
475 EFI_HII_GLYPH_INFO Cell;
476 UINT8 BitmapData[1];
477 } EFI_HII_GIBT_GLYPHS_BLOCK;
478
479 /**
480
481 Provides the bitmap for the character with the value
482 CharValueCurrent and increments CharValueCurrent by 1. This
483 glyph uses the default cell information. The default cell
484 information is found in the font header or the most recently
485 processed EFI_HII_GIBT_DEFAULTS.
486
487 @param Header Standard glyph block header, where
488 Header.BlockType = EFI_HII_GIBT_GLYPH_DEFAULT.
489
490 @param BitmapData The bitmap data specifies a series of
491 pixels, one bit per pixel, left-to-right,
492 top-tobottom. Each glyph bitmap only
493 encodes the portion of the bitmap enclosed
494 by its character-bounding box. The number
495 of bytes per bitmap can be calculated as:
496 ((Global.Cell.Width + 7)/8) *
497 Global.Cell.Height.
498
499 **/
500 typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK {
501 EFI_HII_GLYPH_BLOCK Header;
502 UINT8 BitmapData[1];
503 } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK;
504
505
506
507
508 /**
509
510 Provides the bitmaps for the characters with the values
511 CharValueCurrent through CharValueCurrent + Count -1 and
512 increments CharValueCurrent by Count. These glyphs use the
513 default cell information and the encoded bitmaps have exactly
514 the same number of byes.
515
516 @param Header Standard glyph block header, where
517 Header.BlockType =
518 EFI_HII_GIBT_GLYPHS_DEFAULT.
519
520 @param Count Number of glyphs in the glyph block.
521
522 @param BitmapData The bitmap data specifies a series of
523 pixels, one bit per pixel, left-to-right,
524 top-tobottom, for each glyph. Each glyph
525 bitmap only encodes the portion of the
526 bitmap enclosed by its character-bounding
527 box. The number of bytes per bitmap can be
528 calculated as: ((Global.Cell.Width + 7)/8)
529 Global.Cell.Height.
530
531 **/
532 typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK {
533 EFI_HII_GLYPH_BLOCK Header;
534 UINT16 Count;
535 UINT8 BitmapData[1];
536 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;
537
538 /**
539
540 Increments the current character value CharValueCurrent by the
541 number specified.
542
543 @param Header Standard glyph block header, where BlockType =
544 EFI_HII_GIBT_SKIP1 or EFI_HII_GIBT_SKIP2.
545
546 @param SkipCount The unsigned 8- or 16-bit value to add to
547 CharValueCurrent.
548
549 **/
550 typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {
551 EFI_HII_GLYPH_BLOCK Header;
552 UINT16 SkipCount;
553 } EFI_HII_GIBT_SKIP2_BLOCK;
554
555
556 /**
557
558 Increments the current character value CharValueCurrent by the
559 number specified.
560
561 @param Header Standard glyph block header, where BlockType =
562 EFI_HII_GIBT_SKIP1 or EFI_HII_GIBT_SKIP2.
563
564 @param SkipCount The unsigned 8- or 16-bit value to add to
565 CharValueCurrent.
566
567 **/
568 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {
569 EFI_HII_GLYPH_BLOCK Header;
570 UINT8 SkipCount;
571 } EFI_HII_GIBT_SKIP1_BLOCK;
572
573
574 /**
575
576 This package is created by NewPackageList() when the package
577 list is first added to the HII database by locating the
578 EFI_DEVICE_PATH_PROTOCOL attached to the driver handle passed in
579 to that function.
580
581 **/
582 typedef EFI_DEVICE_PATH_PROTOCOL EFI_HII_DEVICE_PATH_PACKAGE_HDR;
583
584
585 /**
586
587 This is a free-form package type designed to allow extensibility
588 by allowing the format to be specified using Guid.
589
590 @param Guid Identifier which describes the remaining data
591 within the package.
592
593 **/
594 typedef struct _EFI_HII_GUID_PACKAGE_HDR {
595 EFI_GUID Guid;
596 } EFI_HII_GUID_PACKAGE_HDR;
597
598
599 /**
600
601 The Strings package record describes the mapping between string
602 identifiers and the actual text of the strings themselves. The
603 package consists of three parts: a fixed header, the string
604 information and the font information.
605
606 @param Header The standard package header, where Header.Type
607 = EFI_HII_PACKAGE_STRINGS.
608
609 @param HdrSize Size of this header.
610
611 @param StringInfoOffset Offset, relative to the start of
612 this header, of the string information.
613
614 @param LanguageWindow Specifies the default values placed in
615 the static and dynamic windows before
616 processing each SCSU-encoded strings.
617
618
619 @param LanguageName String identifier within the current
620 string package of the full name of the
621 language specified by Language. Language
622 Language of the strings, as specified by
623 RFC 3066.
624
625 **/
626 typedef struct _EFI_HII_STRING_PACKAGE_HDR {
627 EFI_HII_PACKAGE_HEADER Header;
628 UINT32 HdrSize;
629 UINT32 StringInfoOffset;
630 CHAR16 LanguageWindow[16];
631 EFI_STRING_ID LanguageName;
632 CHAR8 Language[1];
633 } EFI_HII_STRING_PACKAGE_HDR;
634
635
636
637 /**
638
639 The fixed header consists of a standard record header and then
640 the character values in this section, the flags (including the
641 encoding method) and the offsets of the glyph information, the
642 glyph bitmaps and the character map.
643
644 @param Header The standard package header, where Header.Size
645 EFI_HII_PACKAGE_FONTS.
646
647 @param HdrSize Size of this header.
648
649 @param GlyphInfoOffset The offset, relative to the start of
650 this header, of a series of
651 variable-length glyph blocks, each
652 describing information about the
653 bitmap associated with a glyph.
654
655 @param Cell This contains the measurement of the widest and
656 tallest characters in the font (Cell.Width and
657 Cell.Height). It also contains the offset to the
658 horizontal and vertical origin point of the
659 character cell (Cell.OffsetX and Cell.OffsetY).
660 Finally, it contains the default AdvanceX. The
661 individual glyph's OffsetX and OffsetY value is
662 added to this position to determine where to
663 draw the top-left pixel of the character's
664 glyph. The character glyph's AdvanceX is added
665 to this position to determine the origin point
666 for the next character.
667
668 @param FontStyle The design style of the font, 1 bit per
669 style. See EFI_HII_FONT_STYLE.
670
671 @param FontFamily The null-terminated string with the name
672 of the font family to which the font
673 belongs.
674
675 **/
676 typedef struct _EFI_HII_FONT_PACKAGE_HDR {
677 EFI_HII_PACKAGE_HEADER Header;
678 UINT32 HdrSize;
679 UINT32 GlyphBlockOffset;
680 EFI_HII_GLYPH_INFO Cell;
681 EFI_HII_FONT_STYLE FontStyle;
682 CHAR16 FontFamily[1];
683 } EFI_HII_FONT_PACKAGE_HDR;
684
685
686 //
687 // EFI_HII_STRING_BLOCK.BlockType
688 //
689 #define FI_HII_SIBT_END 0x00
690 #define EFI_HII_SIBT_STRING_SCSU 0x10
691 #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
692 #define EFI_HII_SIBT_STRINGS_SCSU 0x12
693 #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
694 #define EFI_HII_SIBT_STRING_UCS2 0x14
695 #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
696 #define EFI_HII_SIBT_STRINGS_UCS2 0x16
697 #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
698 #define EFI_HII_SIBT_DUPLICATE 0x20
699 #define EFI_HII_SIBT_SKIP2 0x21
700 #define EFI_HII_SIBT_SKIP1 0x22
701 #define EFI_HII_SIBT_EXT1 0x30
702 #define EFI_HII_SIBT_EXT2 0x31
703 #define EFI_HII_SIBT_EXT4 0x32
704 #define EFI_HII_SIBT_FONT 0x40
705
706 /**
707
708 String blocks specify the text and font for the current string
709 identifier and increment to the next string identifier.
710 **/
711 typedef struct {
712 UINT8 BlockType;
713 UINT8 BlockBody[1];
714 } EFI_HII_STRING_BLOCK;
715
716
717 /**
718
719 Indicates that the string with string identifier
720 StringIdCurrent is the same as a previously defined string and
721 increments StringIdCurrent by one.
722
723 @param Header Standard string block header, where
724 Header.BlockType = EFI_HII_SIBT_DUPLICATE.
725
726 @param StringId The string identifier of a previously
727 defined string with the exact same string
728 text. Description
729
730
731 **/
732 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK {
733 EFI_HII_STRING_BLOCK Header;
734 EFI_STRING_ID StringId;
735 } EFI_HII_SIBT_DUPLICATE_BLOCK;
736
737 /**
738
739 Any strings with a string identifier greater than or equal to
740 StringIdCurrent are empty.
741
742 @param Header Standard string block header, where
743 Header.BlockType = EFI_HII_SIBT_END.
744
745 **/
746 typedef struct _EFI_HII_SIBT_END_BLOCK {
747 EFI_HII_STRING_BLOCK Header;
748 } EFI_HII_SIBT_END_BLOCK;
749
750
751 /**
752
753 These are reserved for future expansion, with length bytes
754 included so that they can be easily skip
755
756 @param Header Standard string block header, where
757 Header.BlockType = EFI_HII_SIBT_EXT1,
758 EFI_HII_SIBT_EXT2 or EFI_HII_SIBT_EXT4.
759
760 @param Length Size of the string block, in bytes.
761
762 **/
763 typedef struct _EFI_HII_SIBT_EXT1_BLOCK {
764 EFI_HII_STRING_BLOCK Header;
765 UINT8 BlockType2;
766 UINT8 Length;
767 } EFI_HII_SIBT_EXT1_BLOCK;
768
769 /**
770
771 These are reserved for future expansion, with length bytes
772 included so that they can be easily skip
773
774 @param Header Standard string block header, where
775 Header.BlockType = EFI_HII_SIBT_EXT1,
776 EFI_HII_SIBT_EXT2 or EFI_HII_SIBT_EXT4.
777
778 @param Length Size of the string block, in bytes.
779
780 **/
781 typedef struct _EFI_HII_SIBT_EXT2_BLOCK {
782 EFI_HII_STRING_BLOCK Header;
783 UINT8 BlockType2;
784 UINT16 Length;
785 } EFI_HII_SIBT_EXT2_BLOCK;
786
787 /**
788
789 These are reserved for future expansion, with length bytes
790 included so that they can be easily skip
791
792 @param Header Standard string block header, where
793 Header.BlockType = EFI_HII_SIBT_EXT1,
794 EFI_HII_SIBT_EXT2 or EFI_HII_SIBT_EXT4.
795
796 @param Length Size of the string block, in bytes.
797
798 **/
799 typedef struct _EFI_HII_SIBT_EXT4_BLOCK {
800 EFI_HII_STRING_BLOCK Header;
801 UINT8 BlockType2;
802 UINT32 Length;
803 } EFI_HII_SIBT_EXT4_BLOCK;
804
805 /**
806
807 Associates a font identifier FontId with a font name FontName,
808 size FontSize and style FontStyle. This font identifier may be
809 used with the string blocks. The font identifier 0 is the
810 default font for those string blocks which do not specify a font
811 identifier.
812
813 @param Header Standard extended header, where
814 Header.BlockType = EFI_HII_SIBT_FONT.
815
816 @param FontId Font identifier, which must be unique within
817 the font package.
818
819 @param FontSize Character cell size, in pixels, of the font.
820
821 @param FontStyle Font style.
822
823 @param FontName Null-terminated font family name.
824
825 **/
826 typedef struct _EFI_HII_SIBT_FONT_BLOCK {
827 EFI_HII_SIBT_EXT2_BLOCK Header;
828 UINT8 FontId;
829 UINT16 FontSize;
830 EFI_HII_FONT_STYLE FontStyle;
831 CHAR16 FontName[1];
832 } EFI_HII_SIBT_FONT_BLOCK;
833
834 /**
835
836 Increments the current string identifier StringIdCurrent by the
837 number specified.
838
839 @param Header Standard string block header, where
840 Header.BlockType = EFI_HII_SIBT_SKIP1.
841
842 @param SkipCount The unsigned 8-bit value to add to
843 StringIdCurrent.
844
845 **/
846 typedef struct _EFI_HII_SIBT_SKIP1_BLOCK {
847 EFI_HII_STRING_BLOCK Header;
848 UINT8 SkipCount;
849 } EFI_HII_SIBT_SKIP1_BLOCK;
850
851 /**
852
853 Increments the current string identifier StringIdCurrent by
854 the number specified.
855
856 @param Header Standard string block header, where
857 Header.BlockType = EFI_HII_SIBT_SKIP2.
858
859 @param SkipCount The unsigned 16-bit value to add to
860 StringIdCurrent.
861
862 **/
863 typedef struct _EFI_HII_SIBT_SKIP2_BLOCK {
864 EFI_HII_STRING_BLOCK Header;
865 UINT16 SkipCount;
866 } EFI_HII_SIBT_SKIP2_BLOCK;
867
868 /**
869
870 This string block provides the SCSU-encoded text for the string
871 in the default font with string identifier StringIdCurrent and
872 increments StringIdCurrent by one.
873
874 @param Header Standard header where Header.BlockType =
875 EFI_HII_SIBT_STRING_SCSU.
876
877 @param StringText The string text is a null-terminated
878 string, which is assigned to the string
879 identifier StringIdCurrent.
880
881 **/
882 typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK {
883 EFI_HII_STRING_BLOCK Header;
884 UINT8 StringText[1];
885 } EFI_HII_SIBT_STRING_SCSU_BLOCK;
886
887
888 /**
889
890 This string block provides the SCSU-encoded text for the string
891 in the font specified by FontIdentifier with string identifier
892 StringIdCurrent and increments StringIdCurrent by one.
893
894 @param Header Standard string block header, where
895 Header.BlockType = EFI_HII_SIBT_STRING_SCSU_FONT.
896
897 @param FontIdentifier The identifier of the font to be used
898 as the starting font for the entire
899 string. The identifier must either be
900 0 for the default font or an
901 identifier previously specified by an
902 EFI_HII_SIBT_FONT block. Any string
903 characters that deviates from this
904 font family, size or style must
905 provide an explicit control character.
906
907 @param StringText The string text is a null-terminated
908 encoded string, which is assigned to the
909 string identifier StringIdCurrent.
910
911
912 **/
913 typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK {
914 EFI_HII_STRING_BLOCK Header;
915 UINT8 FontIdentifier;
916 UINT8 StringText[1];
917 } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK;
918
919
920 /**
921
922 This string block provides the SCSU-encoded text for StringCount
923 strings which have the default font and which have sequential
924 string identifiers. The strings are assigned the identifiers,
925 starting with StringIdCurrent and continuing through
926 StringIdCurrent + StringCount ??C 1. StringIdCurrent is
927 incremented by StringCount.
928
929 @param Header Standard header where Header.BlockType =
930 EFI_HII_SIBT_STRINGS_SCSU.
931
932 @param StringCount Number of strings in StringText.
933
934 @param StringText The strings, where each string is a
935 null-terminated encoded string.
936
937 **/
938 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK {
939 EFI_HII_STRING_BLOCK Header;
940 UINT16 StringCount;
941 UINT8 StringText[1];
942 } EFI_HII_SIBT_STRINGS_SCSU_BLOCK;
943
944
945 /**
946
947 This string block provides the SCSU-encoded text for StringCount
948 strings which have the font specified by FontIdentifier and
949 which have sequential string identifiers. The strings are
950 assigned the identifiers, starting with StringIdCurrent and
951 continuing through StringIdCurrent + StringCount ??C 1.
952 StringIdCurrent is incremented by StringCount.
953
954 @param Header Standard header where Header.BlockType =
955 EFI_HII_SIBT_STRINGS_SCSU_FONT.
956
957 @param StringCount Number of strings in StringText.
958
959 @param FontIdentifier The identifier of the font to be used
960 as the starting font for the entire
961 string. The identifier must either be
962 0 for the default font or an
963 identifier previously specified by an
964 EFI_HII_SIBT_FONT block. Any string
965 characters that deviates from this
966 font family, size or style must
967 provide an explicit control character.
968
969 @param StringText The strings, where each string is a
970 null-terminated encoded string.
971
972 **/
973 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK {
974 EFI_HII_STRING_BLOCK Header;
975 UINT16 StringCount;
976 UINT8 FontIdentifier;
977 UINT8 StringText[1];
978 } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK;
979
980
981 /**
982
983 This string block provides the UCS-2 encoded text for the string
984 in the default font with string identifier StringIdCurrent and
985 increments StringIdCurrent by one.
986
987 @param Header Standard header where Header.BlockType =
988 EFI_HII_SIBT_STRING_UCS2.
989
990 @param StringText The string text is a null-terminated UCS-2
991 string, which is assigned to the string
992 identifier StringIdCurrent.
993
994 **/
995 typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK {
996 EFI_HII_STRING_BLOCK Header;
997 CHAR16 StringText[1];
998 } EFI_HII_SIBT_STRING_UCS2_BLOCK;
999
1000
1001 /**
1002
1003 This string block provides the UCS-2 encoded text for the string
1004 in the font specified by FontIdentifier with string identifier
1005 StringIdCurrent and increments StringIdCurrent by one
1006
1007 @param Header Standard header where Header.BlockType =
1008 EFI_HII_SIBT_STRING_UCS2_FONT.
1009
1010 @param FontIdentifier The identifier of the font to be used
1011 as the starting font for the entire
1012 string. The identifier must either be
1013 0 for the default font or an
1014 identifier previously specified by an
1015 EFI_HII_SIBT_FONT block. Any string
1016 characters that deviates from this
1017 font family, size or style must
1018 provide an explicit control character.
1019
1020 @param StringText The string text is a null-terminated UCS-2
1021 string, which is assigned to the string
1022 identifier StringIdCurrent.
1023
1024 **/
1025 typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK {
1026 EFI_HII_STRING_BLOCK Header;
1027 UINT8 FontIdentifier;
1028 CHAR16 StringText[1];
1029 } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK;
1030
1031
1032 /**
1033
1034 This string block provides the UCS-2 encoded text for the
1035 strings in the default font with string identifiers
1036 StringIdCurrent to StringIdCurrent + StringCount - 1 and
1037 increments StringIdCurrent by StringCount.
1038
1039 @param Header Standard header where Header.BlockType =
1040 EFI_HII_SIBT_STRINGS_UCS2.
1041
1042 @param StringCount Number of strings in StringText.
1043
1044 @param StringText The string text is a series of
1045 null-terminated UCS-2 strings, which are
1046 assigned to the string identifiers
1047 StringIdCurrent.to StringIdCurrent +
1048 StringCount - 1.
1049
1050 **/
1051 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK {
1052 EFI_HII_STRING_BLOCK Header;
1053 UINT16 StringCount;
1054 CHAR16 StringText[1];
1055 } EFI_HII_SIBT_STRINGS_UCS2_BLOCK;
1056
1057
1058 /**
1059
1060 The fixed header consists of a standard record header and the
1061 offsets of the image and palette information.
1062
1063 @param Header Standard package header, where Header.Type =
1064 EFI_HII_PACKAGE_IMAGES. ImageInfoOffset
1065 Offset, relative to this header, of the image
1066 information. If this is zero, then there are
1067 no images in the package.
1068
1069 @param PaletteInfoOffset Offset, relative to this header, of
1070 the palette information. If this is
1071 zero, then there are no palettes in
1072 the image package.
1073
1074 **/
1075 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {
1076 EFI_HII_PACKAGE_HEADER Header;
1077 UINT32 ImageInfoOffset;
1078 UINT32 PaletteInfoOffset;
1079 } EFI_HII_IMAGE_PACKAGE_HDR;
1080
1081
1082 //
1083 // EFI_HII_IMAGE_BLOCK
1084 //
1085 typedef struct _EFI_HII_IMAGE_BLOCK {
1086 UINT8 BlockType;
1087 UINT8 BlockBody[1];
1088 } EFI_HII_IMAGE_BLOCK;
1089
1090 //
1091 // EFI_HII_IMAGE_BLOCK.BlockType.
1092 //
1093 #define EFI_HII_IIBT_END 0x00
1094 #define EFI_HII_IIBT_IMAGE_1BIT 0x10
1095 #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
1096 #define EFI_HII_IIBT_IMAGE_4BIT 0x12
1097 #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
1098 #define EFI_HII_IIBT_IMAGE_8BIT 0x14
1099 #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
1100 #define EFI_HII_IIBT_IMAGE_24BIT 0x16
1101 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
1102 #define EFI_HII_IIBT_IMAGE_JPEG 0x18
1103 #define EFI_HII_IIBT_DUPLICATE 0x20
1104 #define EFI_HII_IIBT_SKIP2 0x21
1105 #define EFI_HII_IIBT_SKIP1 0x22
1106 #define EFI_HII_IIBT_EXT1 0x30
1107 #define EFI_HII_IIBT_EXT2 0x31
1108 #define EFI_HII_IIBT_EXT4 0x32
1109
1110
1111 /**
1112
1113 Any images with an image identifier greater than or equal to
1114 ImageIdCurrent are empty.
1115
1116 @param Header Standard image block header, where
1117 Header.BlockType = EFI_HII_IIBT_END.
1118
1119 **/
1120 typedef struct _EFI_HII_IIBT_END_BLOCK {
1121 EFI_HII_IMAGE_BLOCK Header;
1122 } EFI_HII_IIBT_END_BLOCK;
1123
1124
1125 /**
1126
1127 Future extensions for image records which need a length-byte
1128 length use this prefix.
1129
1130 @param Header Standard image block header, where
1131 Header.BlockType = EFI_HII_IIBT_EXT1,
1132 EFI_HII_IIBT_EXT2 or EFI_HII_IIBT_EXT4.
1133
1134 @param Length Size of the image block, in bytes, including
1135 the image block header.
1136
1137 **/
1138 typedef struct _EFI_HII_IIBT_EXT1_BLOCK {
1139 EFI_HII_IMAGE_BLOCK Header;
1140 UINT8 BlockType2;
1141 UINT8 Length;
1142 } EFI_HII_IIBT_EXT1_BLOCK;
1143
1144 /**
1145
1146 Future extensions for image records which need a length-byte
1147 length use this prefix.
1148
1149 @param Header Standard image block header, where
1150 Header.BlockType = EFI_HII_IIBT_EXT1,
1151 EFI_HII_IIBT_EXT2 or EFI_HII_IIBT_EXT4.
1152
1153 @param Length Size of the image block, in bytes, including
1154 the image block header.
1155
1156 **/
1157 typedef struct _EFI_HII_IIBT_EXT2_BLOCK {
1158 EFI_HII_IMAGE_BLOCK Header;
1159 UINT8 BlockType2;
1160 UINT16 Length;
1161 } EFI_HII_IIBT_EXT2_BLOCK;
1162
1163 /**
1164
1165 Future extensions for image records which need a length-byte
1166 length use this prefix.
1167
1168 @param Header Standard image block header, where
1169 Header.BlockType = EFI_HII_IIBT_EXT1,
1170 EFI_HII_IIBT_EXT2 or EFI_HII_IIBT_EXT4.
1171
1172 @param Length Size of the image block, in bytes, including
1173 the image block header.
1174
1175 **/
1176 typedef struct _EFI_HII_IIBT_EXT4_BLOCK {
1177 EFI_HII_IMAGE_BLOCK Header;
1178 UINT8 BlockType2;
1179 UINT32 Length;
1180 } EFI_HII_IIBT_EXT4_BL0CK;
1181
1182 //
1183 // EFI_HII_IIBT_IMAGE_1BIT_BASE
1184 //
1185 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE {
1186 UINT16 Width;
1187 UINT16 Height;
1188 // UINT8 Data[...];
1189 } EFI_HII_IIBT_IMAGE_1BIT_BASE;
1190
1191 /**
1192
1193 This record assigns the 1-bit-per-pixel bitmap data to the
1194 ImageIdCurrent identifier and increment ImageIdCurrent by one.
1195 The data in the EFI_HII_IMAGE_1BIT_TRANS structure is exactly
1196 the same as the EFI_HII_IMAGE_1BIT structure, the difference is
1197 how the data is treated. The bitmap pixel value 0 is the
1198 transparency value and will not be written to the
1199 screen. The bitmap pixel value 1 will be translated to the color
1200 specified by Palette.
1201
1202 @param Header Standard image header, where Header.BlockType
1203 = EFI_HII_IIBT_IMAGE_1BIT_TRANS.
1204
1205 @param PaletteIndex Index of the palette in the palette
1206 information.
1207
1208 @param Bitmap The bitmap specifies a series of pixels, one
1209 bit per pixel, left-to-right, top-to-bottom,
1210 and is padded out to the nearest byte. The
1211 number of bytes per bitmap can be calculated
1212 as: ((Width + 7)/8) * Height.
1213
1214 **/
1215 typedef struct _EFI_HII_IBIT_IMAGE_1BIT_BLOCK {
1216 EFI_HII_IMAGE_BLOCK Header;
1217 UINT8 PaletteIndex;
1218 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
1219 } EFI_HII_IIBT_IMAGE_1BIT_BLOCK;
1220
1221 typedef EFI_HII_IIBT_IMAGE_1BIT_BLOCK EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK;
1222
1223
1224 //
1225 // EFI_HII_RGB_PIXEL
1226 //
1227 typedef struct _EFI_HII_RGB_PIXEL {
1228 UINT8 b;
1229 UINT8 g;
1230 UINT8 r;
1231 } EFI_HII_RGB_PIXEL;
1232
1233 //
1234 // FI_HII_IIBT_IMAGE_24BIT_BASE
1235 //
1236 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE {
1237 UINT16 Width;
1238 UINT16 Height;
1239 // EFI_HII_RGB_PIXEL Bitmap[...];
1240 } EFI_HII_IIBT_IMAGE_24BIT_BASE;
1241
1242 /**
1243
1244 This record assigns the 24-bit-per-pixel bitmap data to the
1245 ImageIdCurrent identifier and increment ImageIdCurrent by one.
1246 The image's upper left hand corner pixel is composed of the
1247 first three bitmap bytes. The first byte is the pixel????s blue
1248 component value, the next byte is the pixel????s green component
1249 value, and the third byte is the pixel's red component value
1250 (B,G,R). Each color component value can vary from 0x00 (color
1251 off) to 0xFF (color full on), allowing 16.8 millions colors that
1252 can be specified.
1253
1254 @param Header Standard image header, where Header.BlockType
1255 = EFI_HII_IIBT_IMAGE_24BIT. Bitmap The bitmap
1256 specifies a series of pixels, 24 bits per
1257 pixel, left-to-right, top-to-bottom. The
1258 number of bytes per bitmap can be calculated
1259 as: (Width * 3) * Height.
1260
1261 @param Type See EFI_HII_RGB_PIXEL definition.
1262
1263 **/
1264 typedef struct {
1265 EFI_HII_IMAGE_BLOCK Header;
1266 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
1267 } EFI_HII_IIBT_IMAGE_24BIT_BLOCK;
1268
1269 typedef EFI_HII_IIBT_IMAGE_24BIT_BLOCK EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK;
1270
1271
1272
1273 //
1274 // EFI_HII_IIBT_IMAGE_4BIT_BASE
1275 //
1276 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE {
1277 UINT16 Width;
1278 UINT16 Height;
1279 // UINT8 Data[...];
1280 } EFI_HII_IIBT_IMAGE_4BIT_BASE;
1281
1282 /**
1283
1284 This record assigns the 4-bit-per-pixel bitmap data to the
1285 ImageIdCurrent identifier using the specified palette and
1286 increment ImageIdCurrent by one. The image????s upper left hand
1287 corner pixel is the most significant nibble of the first bitmap
1288 byte.
1289
1290 @param Header Standard image header, where Header.BlockType
1291 = EFI_HII_IIBT_IMAGE_4BIT.
1292
1293 @param PaletteIndex Index of the palette in the palette
1294 information.
1295
1296 @param Bitmap The bitmap specifies a series of pixels, four
1297 bits per pixel, left-to-right, top-to-bottom,
1298 and is padded out to the nearest byte. The
1299 number of bytes per bitmap can be calculated
1300 as: ((Width + 1)/2) Height.
1301
1302 **/
1303 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK {
1304 EFI_HII_IMAGE_BLOCK Header;
1305 UINT8 PaletteIndex;
1306 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
1307 } EFI_HII_IIBT_IMAGE_4BIT_BLOCK;
1308
1309 typedef EFI_HII_IIBT_IMAGE_4BIT_BLOCK EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK;
1310
1311
1312
1313 //
1314 // EFI_HII_IIBT_IMAGE_8BIT_BASE
1315 //
1316 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE {
1317 UINT16 Width;
1318 UINT16 Height;
1319 // UINT8 Data[...];
1320 } EFI_HII_IIBT_IMAGE_8BIT_BASE;
1321
1322 /**
1323
1324 This record assigns the 8-bit-per-pixel bitmap data to the
1325 ImageIdCurrent identifier using the specified palette and
1326 increment ImageIdCurrent by one. The image????s upper left hand
1327 corner pixel is the first bitmap byte.
1328
1329 @param Header Standard image header, where Header.BlockType
1330 = EFI_HII_IIBT_IMAGE_8BIT.
1331
1332 @param PaletteIndex Index of the palette in the palette
1333 information.
1334
1335 @param Bitmap The bitmap specifies a series of pixels, eight
1336 bits per pixel, left-to-right, top-to-bottom.
1337 The number of bytes per bitmap can be
1338 calculated as: Width * Height.
1339
1340 **/
1341 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE {
1342 EFI_HII_IMAGE_BLOCK Header;
1343 UINT8 PaletteIndex;
1344 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
1345 } EFI_HII_IIBT_IMAGE_8BIT_PALETTE;
1346
1347 typedef EFI_HII_IIBT_IMAGE_8BIT_PALETTE EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK;
1348
1349
1350 /**
1351
1352 Indicates that the image with image ID ImageValueCurrent has the
1353 same image as a previously defined image ID and increments
1354 ImageValueCurrent by one
1355
1356 @param Header Standard image header, where Header.BlockType
1357 = EFI_HII_IIBT_DUPLICATE.
1358
1359 @param ImageId The previously defined image ID with the exact
1360 same image.
1361
1362
1363 **/
1364 typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK {
1365 EFI_HII_IMAGE_BLOCK Header;
1366 EFI_IMAGE_ID ImageId;
1367 } EFI_HII_IIBT_DUPLICATE_BLOCK;
1368
1369
1370 /**
1371
1372 This record assigns the JPEG image data to the ImageIdCurrent
1373 identifier and increment ImageIdCurrent by one. The JPEG decoder
1374 is only required to cover the basic JPEG encoding types, which
1375 are produced by standard available paint packages (for example:
1376 MSPaint under Windows from Microsoft). This would include JPEG
1377 encoding of high (1:1:1) and medium (4:1:1) quality with only
1378 three components (R,G,B) ??C no support for the special gray
1379 component encoding.
1380
1381 @param Header Standard image header, where Header.BlockType
1382 = EFI_HII_IIBT_IMAGE_JPEG.
1383
1384 @param Size Specifies the size of the JPEG encoded data.
1385
1386 @param Data JPEG encoded data with ????JFIF???? signature at
1387 offset 6 in the data block. The JPEG encoded
1388 data, specifies type of encoding and final size
1389 of true-color image.
1390
1391 **/
1392 typedef struct _EFI_HII_IIBT_JPEG {
1393 EFI_HII_IMAGE_BLOCK Header;
1394 UINT32 Size;
1395 //UINT8 Data[ ¡­ ];
1396 } EFI_HII_IIBT_JPEG;
1397
1398
1399 /**
1400
1401 Increments the current image ID ImageIdCurrent by the number
1402 specified.
1403
1404 @param Header Standard image header, where Header.BlockType
1405 = EFI_HII_IIBT_SKIP1.
1406
1407 @param SkipCount The unsigned 8-bit value to add to
1408 ImageIdCurrent.
1409
1410 **/
1411 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK {
1412 EFI_HII_IMAGE_BLOCK Header;
1413 UINT8 SkipCount;
1414 } EFI_HII_IIBT_SKIP1_BLOCK;
1415
1416 /**
1417
1418 Increments the current image ID ImageIdCurrent by the number
1419 specified.
1420
1421 @param Header Standard image header, where Header.BlockType
1422 = EFI_HII_IIBT_SKIP2.
1423
1424 @param SkipCount The unsigned 16-bit value to add to
1425 ImageIdCurrent.
1426
1427 **/
1428 typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {
1429 EFI_HII_IMAGE_BLOCK Header;
1430 UINT16 SkipCount;
1431 } EFI_HII_IIBT_SKIP2_BLOCK;
1432
1433
1434 /**
1435
1436 This fixed header is followed by zero or more variable-length
1437 palette information records. The structures are assigned a
1438 number 1 to n.
1439
1440 @param PaletteCount Number of palettes.
1441
1442 **/
1443 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {
1444 UINT16 PaletteCount;
1445 } EFI_HII_IMAGE_PALETTE_INFO_HEADER;
1446
1447 /**
1448
1449 Each palette information record is an array of 24-bit color
1450 structures. The first entry (PaletteValue[0]) corresponds to
1451 color 0 in the source image; the second entry (PaletteValue[1])
1452 corresponds to color 1, etc. Each palette entry is a three byte
1453 entry, with the first byte equal to the blue component of the
1454 color, followed by green, and finally red (B,G,R). Each color
1455 component value can vary from 0x00 (color off) to 0xFF (color
1456 full on), allowing 16.8 millions colors that can be specified.
1457
1458 @param PaletteSize Size of the palette information.
1459
1460 @param PaletteValue Array of color values.
1461
1462 **/
1463 typedef struct _EFI_HII_IMAGE_PALETTE_INFO {
1464 UINT16 PaletteSize;
1465 // EFI_HII_RGB_PIXEL PaletteValue[...];
1466 } EFI_HII_IMAGE_PALETTE_INFO;
1467
1468
1469
1470 //
1471 // EFI_HII_DATABASE_NOTIFY_TYPE
1472 //
1473 typedef UINTN EFI_HII_DATABASE_NOTIFY_TYPE;
1474 #define EFI_HII_DATABASE_NOTIFY_NEW_PACK 0x00000001
1475 #define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK 0x00000002
1476 #define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK 0x00000004
1477 #define EFI_HII_DATABASE_NOTIFY_ADD_PACK 0x00000008
1478 /**
1479
1480 Functions which are registered to receive notification of
1481 database events have this prototype. The actual event is encoded
1482 in NotifyType. The following table describes how PackageType,
1483 PackageGuid, Handle, and Package are used for each of the
1484 notification types.
1485
1486 @param PackageType Package type of the notification.
1487
1488 @param PackageGuid If PackageType is
1489 EFI_HII_PACKAGE_TYPE_GUID, then this is
1490 the pointer to the GUID from the Guid
1491 field of EFI_HII_PACKAGE_GUID_HEADER.
1492 Otherwise, it must be NULL.
1493
1494 @param Package Points to the package referred to by the
1495 notification Handle The handle of the package
1496 list which contains the specified package.
1497
1498 @param NotifyType The type of change concerning the
1499 database. See
1500 EFI_HII_DATABASE_NOTIFY_TYPE.
1501
1502 **/
1503 typedef
1504 EFI_STATUS
1505 (EFIAPI *EFI_HII_DATABASE_NOTIFY) (
1506 IN CONST UINT8 PackageType,
1507 IN CONST EFI_GUID *PackageGuid,
1508 IN CONST EFI_HII_PACKAGE_HEADER *Package,
1509 IN CONST EFI_HII_HANDLE Handle,
1510 IN CONST EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
1511 );
1512
1513 /**
1514
1515 This function adds the packages in the package list to the
1516 database and returns a handle. If there is a
1517 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then
1518 this function will create a package of type
1519 EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list. For
1520 each package in the package list, registered functions with the
1521 notification type NEW_PACK and having the same package type will
1522 be called. For each call to NewPackageList(), there should be a
1523 corresponding call to
1524 EFI_HII_DATABASE_PROTOCOL.RemovePackageList().
1525
1526 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1527 instance.
1528
1529 @param PackageList A pointer to an
1530 EFI_HII_PACKAGE_LIST_HEADER structure.
1531
1532 @param DriverHandle Associate the package list with this EFI
1533 handle Handle A pointer to the
1534 EFI_HII_HANDLE instance.
1535
1536 @retval EFI_SUCCESS The package list associated with the
1537 Handle was added to the HII database.
1538
1539 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary
1540 resources for the new database
1541 contents.
1542
1543 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle
1544 is NULL.
1545
1546 **/
1547 typedef
1548 EFI_STATUS
1549 (EFIAPI *EFI_HII_NEW_PACK) (
1550 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1551 IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList,
1552 IN CONST EFI_HANDLE DriverHandle,
1553 OUT EFI_HII_HANDLE *Handle
1554 );
1555
1556
1557 /**
1558
1559 This function removes the package list that is associated with a
1560 handle Handle from the HII database. Before removing the
1561 package, any registered functions with the notification type
1562 REMOVE_PACK and the same package type will be called. For each
1563 call to EFI_HII_DATABASE_PROTOCOL.NewPackageList(), there should
1564 be a corresponding call to RemovePackageList.
1565
1566 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1567 instance.
1568
1569 @param Handle The handle that was registered to the data
1570 that is requested for removal.
1571
1572 @retval EFI_SUCCESS The data associated with the Handle was
1573 removed from the HII database.
1574
1575 @retval EFI_INVALID_PARAMETER The Handle was not valid.
1576
1577 **/
1578 typedef
1579 EFI_STATUS
1580 (EFIAPI *EFI_HII_REMOVE_PACK) (
1581 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1582 IN CONST EFI_HII_HANDLE Handle
1583 );
1584
1585
1586 /**
1587
1588 This function updates the existing package list (which has the
1589 specified Handle) in the HII databases, using the new package
1590 list specified by PackageList. The update process has the
1591 following steps: Collect all the package types in the package
1592 list specified by PackageList. A package type consists of the
1593 Type field of EFI_HII_PACKAGE_HEADER and, if the Type is
1594 EFI_HII_PACKAGE_TYPE_GUID, the Guid field, as defined in
1595 EFI_HII_PACKAGE_GUID_HEADER. Iterate through the packages within
1596 the existing package list in the HII database specified by
1597 Handle. If a package??s type matches one of the types collected
1598 in step 1, then perform the following steps:
1599 - Call any functions registered with the notification type
1600 REMOVE_PACK.
1601 - Remove the package from the package list and the HII
1602 database.
1603 Add all of the packages within the new package list specified
1604 by PackageList, using the following steps:
1605 - Add the package to the package list and the HII database.
1606 - Call any functions registered with the notification type
1607 ADD_PACK.
1608
1609 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1610 instance.
1611
1612 @param Handle The handle that was registered to the data
1613 that is requested for removal.
1614
1615 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST
1616 package.
1617
1618 @retval EFI_SUCCESS The HII database was successfully
1619 updated.
1620
1621 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory
1622 for the updated database.
1623
1624 @retval EFI_INVALID_PARAMETER The Handle was not valid.
1625
1626 **/
1627 typedef
1628 EFI_STATUS
1629 (EFIAPI *EFI_HII_UPDATE_PACK) (
1630 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1631 IN CONST EFI_HII_HANDLE Handle,
1632 IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList
1633 );
1634
1635
1636 /**
1637
1638 This function returns a list of the package handles of the
1639 specified type that are currently active in the database. The
1640 pseudo-type EFI_HII_PACKAGE_TYPE_ALL will cause all package
1641 handles to be listed.
1642
1643 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1644 instance.
1645
1646 @param PackageType Specifies the package type of the packages
1647 to list or EFI_HII_PACKAGE_TYPE_ALL for
1648 all packages to be listed.
1649
1650 @param PackageGuid If PackageType is
1651 EFI_HII_PACKAGE_TYPE_GUID, then this is
1652 the pointer to the GUID which must match
1653 the Guid field of
1654 EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it
1655 must be NULL.
1656
1657 @param HandleBufferLength On input, a pointer to the length
1658 of the handle buffer. On output,
1659 the length of the handle buffer
1660 that is required for the handles
1661 found.
1662
1663 @param Handle An array of EFI_HII_HANDLE instances returned.
1664
1665
1666 @retval EFI_SUCCESS Handle was updated successfully.
1667
1668 @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter
1669 indicates that Handle is too
1670 small to support the number of
1671 handles. HandleBufferLength is
1672 updated with a value that will
1673 enable the data to fit.
1674
1675
1676 **/
1677 typedef
1678 EFI_STATUS
1679 (EFIAPI *EFI_HII_LIST_PACKS) (
1680 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1681 IN CONST UINT8 PackageType,
1682 IN CONST EFI_GUID *PackageGuid,
1683 IN OUT UINTN *HandleBufferLength,
1684 OUT EFI_HII_HANDLE *Handle
1685 );
1686
1687
1688
1689
1690
1691
1692 /**
1693
1694 This function will export one or all package lists in the
1695 database to a buffer. For each package list exported, this
1696 function will call functions registered with EXPORT_PACK and
1697 then copy the package list to the buffer. The registered
1698 functions may call EFI_HII_DATABASE_PROTOCOL.UpdatePackageList()
1699 to modify the package list before it is copied to the buffer. If
1700 the specified BufferSize is too small, then the status
1701 EFI_OUT_OF_RESOURCES will be returned and the actual package
1702 size will be returned in BufferSize.
1703
1704 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1705 instance.
1706
1707 @param Handle An EFI_HII_HANDLE that corresponds to the
1708 desired package list in the HII database to
1709 export or NULL to indicate all package lists
1710 should be exported.
1711
1712 @param BufferSize On input, a pointer to the length of the
1713 buffer. On output, the length of the
1714 buffer that is required for the exported
1715 data.
1716
1717 @param Buffer A pointer to a buffer that will contain the
1718 results of the export function.
1719
1720
1721 @retval EFI_SUCCESS Package exported.
1722
1723 @retval EFI_OUT_OF_RESOURCES BufferSize is too small to hold
1724 the package.
1725
1726 **/
1727 typedef
1728 EFI_STATUS
1729 (EFIAPI *EFI_HII_EXPORT_PACKS) (
1730 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1731 IN CONST EFI_HII_HANDLE Handle,
1732 IN OUT UINTN *BufferSize,
1733 OUT EFI_HII_PACKAGE_HEADER *Buffer
1734 );
1735
1736
1737 /**
1738
1739
1740 This function registers a function which will be called when
1741 specified actions related to packages of the specified type
1742 occur in the HII database. By registering a function, other
1743 HII-related drivers are notified when specific package types
1744 are added, removed or updated in the HII database. Each driver
1745 or application which registers a notification should use
1746 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before
1747 exiting.
1748
1749
1750 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1751 instance.
1752
1753 @param PackageType The package type. See
1754 EFI_HII_PACKAGE_TYPE_x in EFI_HII_PACKAGE_HEADER.
1755
1756 @param PackageGuid If PackageType is
1757 EFI_HII_PACKAGE_TYPE_GUID, then this is
1758 the pointer to the GUID which must match
1759 the Guid field of
1760 EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it
1761 must be NULL.
1762
1763 @param PackageNotifyFn Points to the function to be called
1764 when the event specified by
1765 NotificationType occurs. See
1766 EFI_HII_DATABASE_NOTIFY.
1767
1768 @param NotifyType Describes the types of notification which
1769 this function will be receiving. See
1770 EFI_HII_DATABASE_NOTIFY_TYPE for more a
1771 list of types.
1772
1773 @param NotifyHandle Points to the unique handle assigned to
1774 the registered notification. Can be used
1775 in
1776 EFI_HII_DATABASE_PROTOCOL.UnregisterPack
1777 to stop notifications.
1778
1779
1780 @retval EFI_SUCCESS Notification registered successfully.
1781
1782 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary
1783 data structures.
1784
1785 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when
1786 PackageType is not
1787 EFI_HII_PACKAGE_TYPE_GUID.
1788
1789 **/
1790 typedef
1791 EFI_STATUS
1792 (EFIAPI *EFI_HII_REGISTER_NOTIFY) (
1793 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1794 IN CONST UINT8 PackageType,
1795 IN CONST EFI_GUID *PackageGuid,
1796 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn,
1797 IN CONST EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,
1798 OUT EFI_HANDLE *NotifyHandle
1799 );
1800
1801
1802 /**
1803
1804 Removes the specified HII database package-related notification.
1805
1806 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1807 instance.
1808
1809 @param NotificationHandle The handle of the notification
1810 function being unregistered.
1811
1812 @retval EFI_SUCCESS Unregister the notification
1813 Successsfully
1814
1815 @retval EFI_INVALID_PARAMETER The Handle is invalid.
1816
1817 **/
1818 typedef
1819 EFI_STATUS
1820 (EFIAPI *EFI_HII_UNREGISTER_NOTIFY) (
1821 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1822 IN CONST EFI_HANDLE NotificationHandle
1823 );
1824
1825
1826 /**
1827
1828 @param Header The general pack header which defines both the
1829 type of pack and the length of the entire
1830 pack.
1831
1832 @param LayoutCount The number of keyboard layouts contained
1833 in the entire keyboard pack.
1834
1835 @param Layout An array of LayoutCount number of keyboard
1836 layouts.
1837
1838 **/
1839 typedef struct {
1840 EFI_HII_PACKAGE_HEADER Header;
1841 UINT16 LayoutCount;
1842 // EFI_HII_KEYBOARD_LAYOUT Layout[...];
1843 } EFI_HII_KEYBOARD_PACK;
1844
1845 /**
1846
1847 @param LayoutLength The length of the current keyboard
1848 layout.
1849
1850 @param Guid The unique ID associated with this keyboard
1851 layout.
1852
1853 @param LayoutDescriptorString An offset location (0 is the
1854 beginning of the
1855 EFI_KEYBOARD_LAYOUT instance)
1856 of the string which describes
1857 this keyboard layout. The data
1858 that is being referenced is in
1859 EFI_DESCRIPTION_STRING_BUNDLE
1860 format.
1861
1862 @param DescriptorCount The number of Descriptor entries in
1863 this layout.
1864
1865 @param Descriptors An array of key descriptors.
1866
1867 **/
1868 typedef struct {
1869 UINT16 LayoutLength;
1870 EFI_GUID Guid;
1871 RELOFST LayoutDescriptorString;
1872 UINT8 DescriptorCount;
1873 // EFI_KEY_DESCRIPTOR Descriptors[...];
1874 } EFI_HII_KEYBOARD_LAYOUT;
1875
1876
1877 /**
1878
1879 @param Language The language to associate with
1880 DescriptionString.
1881
1882 @param Space A space (U-0x0020) character to force as a
1883 separator between the Language field and the
1884 formal description string.
1885
1886 @param DescriptionString A null-terminated description
1887 string.
1888
1889 **/
1890 typedef struct {
1891 CHAR16 Language[3];
1892 CHAR16 Space;
1893 CHAR16 DescriptionString[1];
1894 } EFI_DESCRIPTION_STRING;
1895
1896 /**
1897
1898 @param DescriptionCount The number of description strings.
1899
1900 @param DescriptionString An array of language-specific
1901 description strings.
1902
1903 **/
1904 typedef struct {
1905 UINT16 DescriptionCount;
1906 // EFI_DESCRIPTION_STRING DescriptionString[];
1907 } EFI_DESCRIPTION_STRING_BUNDLE;
1908
1909 /**
1910
1911 See the figure below for which key corresponds to the values in
1912 the enumeration above. For example, EfiKeyLCtrl corresponds to
1913 the left control key in the lower-left corner of the keyboard,
1914 EfiKeyFour corresponds to the 4 key on the numeric keypad, and
1915 EfiKeySLck corresponds to the Scroll Lock key in the upper-right
1916 corner of the keyboard.
1917
1918 **/
1919 typedef enum {
1920 EfiKeyLCtrl, EfiKeyA0, EfiKeyLAlt, EfiKeySpaceBar,
1921 EfiKeyA2, EfiKeyA3, EfiKeyA4, EfiKeyRCtrl, EfiKeyLeftArrow,
1922 EfiKeyDownArrow, EfiKeyRightArrow, EfiKeyZero,
1923 EfiKeyPeriod, EfiKeyEnter, EfiKeyLShift, EfiKeyB0,
1924 EfiKeyB1, EfiKeyB2, EfiKeyB3, EfiKeyB4, EfiKeyB5, EfiKeyB6,
1925 EfiKeyB7, EfiKeyB8, EfiKeyB9, EfiKeyB10, EfiKeyRshift,
1926 EfiKeyUpArrow, EfiKeyOne, EfiKeyTwo, EfiKeyThree,
1927 EfiKeyCapsLock, EfiKeyC1, EfiKeyC2, EfiKeyC3, EfiKeyC4,
1928 EfiKeyC5, EfiKeyC6, EfiKeyC7, EfiKeyC8, EfiKeyC9,
1929 EfiKeyC10, EfiKeyC11, EfiKeyC12, EfiKeyFour, EfiKeyFive,
1930 EfiKeySix, EfiKeyPlus, EfiKeyTab, EfiKeyD1, EfiKeyD2,
1931 EfiKeyD3, EfiKeyD4, EfiKeyD5, EfiKeyD6, EfiKeyD7, EfiKeyD8,
1932 EfiKeyD9, EfiKeyD10, EfiKeyD11, EfiKeyD12, EfiKeyD13,
1933 EfiKeyDel, EfiKeyEnd, EfiKeyPgDn, EfiKeySeven, EfiKeyEight,
1934 EfiKeyNine, EfiKeyE0, EfiKeyE1, EfiKeyE2, EfiKeyE3,
1935 EfiKeyE4, EfiKeyE5, EfiKeyE6, EfiKeyE7, EfiKeyE8, EfiKeyE9,
1936 EfiKeyE10, EfiKeyE11, EfiKeyE12, EfiKeyBackSpace,
1937 EfiKeyIns, EfiKeyHome, EfiKeyPgUp, EfiKeyNLck, EfiKeySlash,
1938 EfiKeyAsterisk, EfiKeyMinus, EfiKeyEsc, EfiKeyF1, EfiKeyF2,
1939 EfiKeyF3, EfiKeyF4, EfiKeyF5, EfiKeyF6, EfiKeyF7, EfiKeyF8,
1940 EfiKeyF9, EfiKeyF10, EfiKeyF11, EfiKeyF12, EfiKeyPrint,
1941 EfiKeySLck, EfiKeyPause
1942 } EFI_KEY;
1943
1944 /**
1945
1946 @param Key Used to describe a physical key on a keyboard.
1947
1948 @param Unicode Unicode value for the Key.
1949
1950 @param ShiftedUnicode Unicode value for the key with the
1951 shift key being held down.
1952
1953 @param AltGrUnicode Unicode value for the key with the
1954 Alt-GR being held down.
1955
1956 @param ShiftedAltGrUnicode Unicode value for the key with the
1957 Alt-GR and shift keys being held down.
1958
1959 @param Modifier Modifier keys are defined to allow for
1960 special functionality that is not
1961 necessarily accomplished by a printable
1962 character. Many of these modifier keys are
1963 flags to toggle certain state bits on and
1964 off inside of a keyboard driver.
1965
1966 **/
1967 typedef struct {
1968 EFI_KEY Key;
1969 CHAR16 Unicode;
1970 CHAR16 ShiftedUnicode;
1971 CHAR16 AltGrUnicode;
1972 CHAR16 ShiftedAltGrUnicode;
1973 UINT16 Modifier;
1974 } EFI_KEY_DESCRIPTOR;
1975
1976
1977 //
1978 // Modifier values
1979 //
1980 #define EFI_NULL_MODIFIER 0x0000
1981 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1982 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1983 #define EFI_LEFT_ALT_MODIFIER 0x0003
1984 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1985 #define EFI_ALT_GR_MODIFIER 0x0005
1986 #define EFI_INSERT_MODIFIER 0x0006
1987 #define EFI_DELETE_MODIFIER 0x0007
1988 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1989 #define EFI_PAGE_UP_MODIFIER 0x0009
1990 #define EFI_HOME_MODIFIER 0x000A
1991 #define EFI_END_MODIFIER 0x000B
1992 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1993 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1994 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1995 #define EFI_NUM_LOCK _MODIFIER 0x000F
1996 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1997 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1998 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1999 #define EFI_UP_ARROW_MODIFIER 0X0013
2000 #define EFI_NS_KEY_MODIFIER 0x0014
2001 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
2002 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
2003 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
2004 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
2005 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
2006 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
2007 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
2008 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
2009 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
2010 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
2011 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
2012 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
2013 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
2014 //
2015 // Keys that have multiple control functions based on modifier
2016 // settings are handled in the keyboard driver implementation.
2017 // For instance PRINT_KEY might have a modifier held down and
2018 // is still a nonprinting character, but might have an alternate
2019 // control function like SYSREQUEST
2020 //
2021 #define EFI_PRINT_MODIFIER 0x0022
2022 #define EFI_SYS_REQUEST_MODIFIER 0x0023
2023 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
2024 #define EFI_PAUSE_MODIFIER 0x0025
2025 #define EFI_BREAK_MODIFIER 0x0026
2026
2027
2028
2029 /**
2030
2031 This routine retrieves an array of GUID values for each keyboard
2032 layout that was previously registered in the system.
2033
2034 @param This A pointer to the EFI_HII_PROTOCOL instance.
2035
2036 @param KeyGuidBufferLength On input, a pointer to the length
2037 of the keyboard GUID buffer. On
2038 output, the length of the handle
2039 buffer that is required for the
2040 handles found. KeyGuidBuffer An
2041 array of keyboard layout GUID
2042 instances returned.
2043
2044 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
2045
2046 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength
2047 parameter indicates that
2048 KeyGuidBuffer is too small to
2049 support the number of GUIDs.
2050 KeyGuidBufferLength is updated
2051 with a value that will enable
2052 the data to fit.
2053
2054 **/
2055 typedef
2056 EFI_STATUS
2057 (EFIAPI *EFI_HII_FIND_KEYBOARD_LAYOUTS) (
2058 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
2059 IN OUT UINT16 *KeyGuidBufferLength,
2060 OUT EFI_GUID *KeyGuidBuffer
2061 );
2062
2063
2064 /**
2065
2066 This routine retrieves the requested keyboard layout. The layout
2067 is a physical description of the keys on a keyboard and the
2068 character(s) that are associated with a particular set of key
2069 strokes.
2070
2071 @param This A pointer to the EFI_HII_PROTOCOL instance.
2072
2073 @param KeyGuid A pointer to the unique ID associated with a
2074 given keyboard layout. If KeyGuid is NULL then
2075 the current layout will be retrieved.
2076
2077 @param KeyboardLayout A pointer to a buffer containing the
2078 retrieved keyboard layout. below.
2079
2080 @retval EFI_SUCCESS The keyboard layout was retrieved
2081 successfully.
2082
2083 @retval EFI_NOT_FOUND The requested keyboard layout was not
2084 found.
2085
2086 **/
2087 typedef
2088 EFI_STATUS
2089 (EFIAPI *EFI_HII_GET_KEYBOARD_LAYOUT) (
2090 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
2091 IN CONST EFI_GUID *KeyGuid,
2092 OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout
2093 );
2094
2095 /**
2096
2097 This routine sets the default keyboard layout to the one
2098 referenced by KeyGuid. When this routine is called, an event
2099 will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
2100 group type. This is so that agents which are sensitive to the
2101 current keyboard layout being changed can be notified of this
2102 change.
2103
2104 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
2105 instance.
2106
2107 @param KeyGuid A pointer to the unique ID associated with a
2108 given keyboard layout.
2109
2110
2111 @retval EFI_SUCCESS The current keyboard layout was
2112 successfully set.
2113
2114 @retval EFI_NOT_FOUND The referenced keyboard layout was not
2115 found, so action was taken.
2116
2117 **/
2118 typedef
2119 EFI_STATUS
2120 (EFIAPI *EFI_HII_SET_KEYBOARD_LAYOUT) (
2121 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
2122 IN CONST EFI_GUID *KeyGuid
2123 );
2124
2125 /**
2126
2127 Return the EFI handle associated with a package list.
2128
2129 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
2130 instance.
2131
2132 @param PackageListHandle An EFI_HII_HANDLE that corresponds
2133 to the desired package list in the
2134 HIIdatabase.
2135
2136 @param DriverHandle On return, contains the EFI_HANDLE which
2137 was registered with the package list in
2138 NewPackageList().
2139
2140 @retval EFI_SUCCESS The DriverHandle was returned
2141 successfully.
2142
2143 @retval EFI_INVALID_PARAMETER The PackageListHandle was not
2144 valid.
2145
2146 **/
2147 typedef
2148 EFI_STATUS
2149 (EFIAPI *EFI_HII_GET_PACK_HANDLE) (
2150 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
2151 IN CONST EFI_HII_HANDLE PackageListHandle,
2152 OUT EFI_HANDLE *DriverHandle
2153 );
2154
2155 /**
2156
2157 @param NewPackageList Add a new package list to the HII
2158 database.
2159
2160 @param RemovePackageList Remove a package list from the HII
2161 database.
2162
2163 @param UpdatePackageList Update a package list in the HII
2164 database.
2165
2166 @param ListPackageLists List the handles of the package
2167 lists within the HII database.
2168
2169 @param ExportPackageLists Export package lists from the HII
2170 database.
2171
2172 @param RegisterPackageNotify Register notification when
2173 packages of a certain type are
2174 installed.
2175
2176 @param UnregisterPackageNotify Unregister notification of
2177 packages.
2178
2179 @param FindKeyboardLayouts Retrieves a list of the keyboard
2180 layouts in the system.
2181
2182 @param GetKeyboardLayout Allows a program to extract the
2183 current keyboard layout. See the
2184 GetKeyboardLayout() function
2185 description.
2186
2187 @param SetKeyboardLayout Changes the current keyboard layout.
2188 See the SetKeyboardLayout() function
2189
2190
2191 **/
2192 struct _EFI_HII_DATABASE_PROTOCOL {
2193 EFI_HII_NEW_PACK NewPackageList;
2194 EFI_HII_REMOVE_PACK RemovePackageList;
2195 EFI_HII_UPDATE_PACK UpdatePackageList;
2196 EFI_HII_LIST_PACKS ListPackageLists;
2197 EFI_HII_EXPORT_PACKS ExportPackageLists;
2198 EFI_HII_REGISTER_NOTIFY RegisterPackageNotify;
2199 EFI_HII_UNREGISTER_NOTIFY UnregisterPackageNotify;
2200 EFI_HII_FIND_KEYBOARD_LAYOUTS FindKeyboardLayouts;
2201 EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout;
2202 EFI_HII_SET_KEYBOARD_LAYOUT SetKeyboardLayout;
2203 EFI_HII_GET_PACK_HANDLE GetPackageHandle;
2204 };
2205
2206 extern EFI_GUID gEfiHiiDatabaseProtocolGuid;
2207
2208 #endif
2209