]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Uefi/UefiInternalFormRepresentation.h
MdeModulePkg FormBrowserEx: Change its structure name with EDKII_ prefix
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiInternalFormRepresentation.h
CommitLineData
959ccb23 1/** @file\r
2 This file defines the encoding for the VFR (Visual Form Representation) language.\r
3 IFR is primarily consumed by the EFI presentation engine, and produced by EFI\r
4 internal application and drivers as well as all add-in card option-ROM drivers\r
5\r
1c2a4962 6Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
6ef3ae6c 7(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
af2dc6a7 8This program and the accompanying materials are licensed and made available under \r
9the terms and conditions of the BSD License that accompanies this distribution. \r
10The full text of the license may be found at\r
11http://opensource.org/licenses/bsd-license.php. \r
12 \r
13THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
14WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
959ccb23 15\r
959ccb23 16 @par Revision Reference:\r
f6051525 17 These definitions are from UEFI 2.1 and 2.2.\r
959ccb23 18\r
19**/\r
20\r
21#ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__\r
22#define __UEFI_INTERNAL_FORMREPRESENTATION_H__\r
23\r
0cd118f7
LG
24#include <Guid/HiiFormMapMethodGuid.h>\r
25\r
fb5148a0 26///\r
27/// The following types are currently defined:\r
28///\r
7d582d6b 29typedef VOID* EFI_HII_HANDLE;\r
30typedef CHAR16* EFI_STRING;\r
d1f95000 31typedef UINT16 EFI_IMAGE_ID;\r
32typedef UINT16 EFI_QUESTION_ID;\r
33typedef UINT16 EFI_STRING_ID;\r
34typedef UINT16 EFI_FORM_ID;\r
35typedef UINT16 EFI_VARSTORE_ID;\r
f6051525 36typedef UINT16 EFI_ANIMATION_ID;\r
e0c047a0 37\r
7d582d6b 38typedef UINT16 EFI_DEFAULT_ID;\r
e0c047a0 39\r
7d582d6b 40typedef UINT32 EFI_HII_FONT_STYLE;\r
d1f95000 41\r
959ccb23 42\r
959ccb23 43\r
44#pragma pack(1)\r
7d582d6b 45\r
e0c047a0 46//\r
47// Definitions for Package Lists and Package Headers\r
48// Section 27.3.1\r
49//\r
7d582d6b 50\r
8b13229b 51///\r
e0c047a0 52/// The header found at the start of each package list.\r
8b13229b 53///\r
959ccb23 54typedef struct {\r
7d582d6b 55 EFI_GUID PackageListGuid;\r
56 UINT32 PackageLength;\r
57} EFI_HII_PACKAGE_LIST_HEADER;\r
959ccb23 58\r
e0c047a0 59///\r
60/// The header found at the start of each package.\r
61///\r
959ccb23 62typedef struct {\r
7d582d6b 63 UINT32 Length:24;\r
64 UINT32 Type:8;\r
65 // UINT8 Data[...];\r
66} EFI_HII_PACKAGE_HEADER;\r
959ccb23 67\r
7d582d6b 68//\r
e0c047a0 69// Value of HII package type\r
7d582d6b 70// \r
71#define EFI_HII_PACKAGE_TYPE_ALL 0x00\r
72#define EFI_HII_PACKAGE_TYPE_GUID 0x01\r
9185c388 73#define EFI_HII_PACKAGE_FORMS 0x02\r
7d582d6b 74#define EFI_HII_PACKAGE_STRINGS 0x04\r
75#define EFI_HII_PACKAGE_FONTS 0x05\r
76#define EFI_HII_PACKAGE_IMAGES 0x06\r
77#define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07\r
78#define EFI_HII_PACKAGE_DEVICE_PATH 0x08\r
9185c388 79#define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09\r
66d550f9 80#define EFI_HII_PACKAGE_ANIMATIONS 0x0A\r
7d582d6b 81#define EFI_HII_PACKAGE_END 0xDF\r
82#define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0\r
83#define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF\r
959ccb23 84\r
7d582d6b 85//\r
e0c047a0 86// Definitions for Simplified Font Package\r
7d582d6b 87//\r
88\r
fbf926ad 89///\r
af2dc6a7 90/// Contents of EFI_NARROW_GLYPH.Attributes.\r
fbf926ad 91///@{\r
7d582d6b 92#define EFI_GLYPH_NON_SPACING 0x01\r
93#define EFI_GLYPH_WIDE 0x02\r
e0c047a0 94#define EFI_GLYPH_HEIGHT 19\r
95#define EFI_GLYPH_WIDTH 8\r
fbf926ad 96///@}\r
959ccb23 97\r
fbf926ad 98///\r
99/// The EFI_NARROW_GLYPH has a preferred dimension (w x h) of 8 x 19 pixels.\r
100///\r
959ccb23 101typedef struct {\r
fbf926ad 102 ///\r
103 /// The Unicode representation of the glyph. The term weight is the \r
104 /// technical term for a character code.\r
105 ///\r
7d582d6b 106 CHAR16 UnicodeWeight;\r
fbf926ad 107 ///\r
108 /// The data element containing the glyph definitions.\r
109 ///\r
7d582d6b 110 UINT8 Attributes;\r
fbf926ad 111 ///\r
112 /// The column major glyph representation of the character. Bits \r
113 /// with values of one indicate that the corresponding pixel is to be\r
114 /// on when normally displayed; those with zero are off.\r
115 ///\r
7d582d6b 116 UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];\r
117} EFI_NARROW_GLYPH;\r
959ccb23 118\r
fbf926ad 119///\r
120/// The EFI_WIDE_GLYPH has a preferred dimension (w x h) of 16 x 19 pixels, which is large enough \r
121/// to accommodate logographic characters.\r
122///\r
959ccb23 123typedef struct {\r
fbf926ad 124 ///\r
125 /// The Unicode representation of the glyph. The term weight is the \r
126 /// technical term for a character code.\r
127 ///\r
7d582d6b 128 CHAR16 UnicodeWeight;\r
fbf926ad 129 ///\r
130 /// The data element containing the glyph definitions.\r
131 ///\r
7d582d6b 132 UINT8 Attributes;\r
fbf926ad 133 ///\r
134 /// The column major glyph representation of the character. Bits \r
135 /// with values of one indicate that the corresponding pixel is to be \r
136 /// on when normally displayed; those with zero are off.\r
137 ///\r
7d582d6b 138 UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];\r
fbf926ad 139 ///\r
140 /// The column major glyph representation of the character. Bits \r
141 /// with values of one indicate that the corresponding pixel is to be \r
142 /// on when normally displayed; those with zero are off.\r
143 ///\r
7d582d6b 144 UINT8 GlyphCol2[EFI_GLYPH_HEIGHT];\r
fbf926ad 145 ///\r
146 /// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the \r
147 /// sizeof (EFI_NARROW_GLYPH). The contents of Pad must \r
148 /// be zero.\r
149 ///\r
7d582d6b 150 UINT8 Pad[3];\r
151} EFI_WIDE_GLYPH;\r
152\r
e0c047a0 153///\r
154/// A simplified font package consists of a font header\r
155/// followed by a series of glyph structures.\r
156///\r
7d582d6b 157typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {\r
158 EFI_HII_PACKAGE_HEADER Header;\r
159 UINT16 NumberOfNarrowGlyphs;\r
160 UINT16 NumberOfWideGlyphs;\r
161 // EFI_NARROW_GLYPH NarrowGlyphs[];\r
162 // EFI_WIDE_GLYPH WideGlyphs[];\r
163} EFI_HII_SIMPLE_FONT_PACKAGE_HDR;\r
959ccb23 164\r
165//\r
e0c047a0 166// Definitions for Font Package\r
167// Section 27.3.3\r
959ccb23 168//\r
959ccb23 169\r
e0c047a0 170//\r
171// Value for font style\r
172//\r
54cf8780 173#define EFI_HII_FONT_STYLE_NORMAL 0x00000000\r
7d582d6b 174#define EFI_HII_FONT_STYLE_BOLD 0x00000001\r
175#define EFI_HII_FONT_STYLE_ITALIC 0x00000002\r
176#define EFI_HII_FONT_STYLE_EMBOSS 0x00010000\r
177#define EFI_HII_FONT_STYLE_OUTLINE 0x00020000\r
178#define EFI_HII_FONT_STYLE_SHADOW 0x00040000\r
179#define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000\r
180#define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000\r
959ccb23 181\r
7d582d6b 182typedef struct _EFI_HII_GLYPH_INFO {\r
183 UINT16 Width;\r
184 UINT16 Height;\r
185 INT16 OffsetX;\r
186 INT16 OffsetY;\r
187 INT16 AdvanceX;\r
188} EFI_HII_GLYPH_INFO;\r
189\r
e0c047a0 190///\r
af2dc6a7 191/// The fixed header consists of a standard record header,\r
e0c047a0 192/// then the character values in this section, the flags\r
193/// (including the encoding method) and the offsets of the glyph\r
194/// information, the glyph bitmaps and the character map.\r
195///\r
7d582d6b 196typedef struct _EFI_HII_FONT_PACKAGE_HDR {\r
197 EFI_HII_PACKAGE_HEADER Header;\r
198 UINT32 HdrSize;\r
199 UINT32 GlyphBlockOffset;\r
200 EFI_HII_GLYPH_INFO Cell;\r
201 EFI_HII_FONT_STYLE FontStyle;\r
202 CHAR16 FontFamily[1];\r
203} EFI_HII_FONT_PACKAGE_HDR;\r
204\r
e0c047a0 205//\r
206// Value of different glyph info block types\r
207//\r
7d582d6b 208#define EFI_HII_GIBT_END 0x00\r
209#define EFI_HII_GIBT_GLYPH 0x10\r
210#define EFI_HII_GIBT_GLYPHS 0x11\r
211#define EFI_HII_GIBT_GLYPH_DEFAULT 0x12\r
212#define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13\r
6ef3ae6c 213#define EFI_HII_GIBT_GLYPH_VARIABILITY 0x14\r
7d582d6b 214#define EFI_HII_GIBT_DUPLICATE 0x20\r
215#define EFI_HII_GIBT_SKIP2 0x21\r
216#define EFI_HII_GIBT_SKIP1 0x22\r
217#define EFI_HII_GIBT_DEFAULTS 0x23\r
218#define EFI_HII_GIBT_EXT1 0x30\r
219#define EFI_HII_GIBT_EXT2 0x31\r
220#define EFI_HII_GIBT_EXT4 0x32\r
221\r
222typedef struct _EFI_HII_GLYPH_BLOCK {\r
223 UINT8 BlockType;\r
224} EFI_HII_GLYPH_BLOCK;\r
225\r
e0c047a0 226//\r
227// Definition of different glyph info block types\r
228//\r
229\r
7d582d6b 230typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK {\r
231 EFI_HII_GLYPH_BLOCK Header;\r
232 EFI_HII_GLYPH_INFO Cell;\r
233} EFI_HII_GIBT_DEFAULTS_BLOCK;\r
234\r
235typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK {\r
236 EFI_HII_GLYPH_BLOCK Header;\r
237 CHAR16 CharValue;\r
238} EFI_HII_GIBT_DUPLICATE_BLOCK;\r
239\r
240typedef struct _EFI_GLYPH_GIBT_END_BLOCK {\r
241 EFI_HII_GLYPH_BLOCK Header;\r
242} EFI_GLYPH_GIBT_END_BLOCK;\r
243\r
244typedef struct _EFI_HII_GIBT_EXT1_BLOCK {\r
245 EFI_HII_GLYPH_BLOCK Header;\r
246 UINT8 BlockType2;\r
247 UINT8 Length;\r
248} EFI_HII_GIBT_EXT1_BLOCK;\r
249\r
250typedef struct _EFI_HII_GIBT_EXT2_BLOCK {\r
251 EFI_HII_GLYPH_BLOCK Header;\r
252 UINT8 BlockType2;\r
253 UINT16 Length;\r
254} EFI_HII_GIBT_EXT2_BLOCK;\r
255\r
256typedef struct _EFI_HII_GIBT_EXT4_BLOCK {\r
257 EFI_HII_GLYPH_BLOCK Header;\r
258 UINT8 BlockType2;\r
259 UINT32 Length;\r
260} EFI_HII_GIBT_EXT4_BLOCK;\r
261\r
262typedef struct _EFI_HII_GIBT_GLYPH_BLOCK {\r
263 EFI_HII_GLYPH_BLOCK Header;\r
264 EFI_HII_GLYPH_INFO Cell;\r
e0c047a0 265 UINT8 BitmapData[1];\r
7d582d6b 266} EFI_HII_GIBT_GLYPH_BLOCK;\r
267\r
268typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK {\r
269 EFI_HII_GLYPH_BLOCK Header;\r
270 EFI_HII_GLYPH_INFO Cell;\r
271 UINT16 Count; \r
e0c047a0 272 UINT8 BitmapData[1];\r
7d582d6b 273} EFI_HII_GIBT_GLYPHS_BLOCK;\r
274\r
275typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK {\r
276 EFI_HII_GLYPH_BLOCK Header;\r
e0c047a0 277 UINT8 BitmapData[1];\r
7d582d6b 278} EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK;\r
279\r
280typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK {\r
281 EFI_HII_GLYPH_BLOCK Header;\r
282 UINT16 Count;\r
e0c047a0 283 UINT8 BitmapData[1];\r
7d582d6b 284} EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;\r
285\r
6ef3ae6c
SEHM
286typedef struct _EFI_HII_GIBT_VARIABILITY_BLOCK {\r
287 EFI_HII_GLYPH_BLOCK Header;\r
288 EFI_HII_GLYPH_INFO Cell;\r
289 UINT8 GlyphPackInBits;\r
290 UINT8 BitmapData [1];\r
291} EFI_HII_GIBT_VARIABILITY_BLOCK;\r
292\r
7d582d6b 293typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {\r
294 EFI_HII_GLYPH_BLOCK Header;\r
295 UINT8 SkipCount;\r
296} EFI_HII_GIBT_SKIP1_BLOCK;\r
297\r
298typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {\r
299 EFI_HII_GLYPH_BLOCK Header;\r
300 UINT16 SkipCount;\r
301} EFI_HII_GIBT_SKIP2_BLOCK;\r
959ccb23 302\r
303//\r
e0c047a0 304// Definitions for Device Path Package\r
305// Section 27.3.4\r
959ccb23 306//\r
e0c047a0 307\r
308///\r
309/// The device path package is used to carry a device path\r
310/// associated with the package list.\r
311///\r
f620c889 312typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR {\r
7d582d6b 313 EFI_HII_PACKAGE_HEADER Header;\r
314 // EFI_DEVICE_PATH_PROTOCOL DevicePath[];\r
f620c889 315} EFI_HII_DEVICE_PATH_PACKAGE_HDR;\r
959ccb23 316\r
7d582d6b 317//\r
e0c047a0 318// Definitions for GUID Package\r
319// Section 27.3.5\r
7d582d6b 320//\r
e0c047a0 321\r
322///\r
323/// The GUID package is used to carry data where the format is defined by a GUID.\r
324///\r
7d582d6b 325typedef struct _EFI_HII_GUID_PACKAGE_HDR {\r
326 EFI_HII_PACKAGE_HEADER Header;\r
327 EFI_GUID Guid;\r
328 // Data per GUID definition may follow\r
329} EFI_HII_GUID_PACKAGE_HDR;\r
959ccb23 330\r
7d582d6b 331//\r
e0c047a0 332// Definitions for String Package\r
333// Section 27.3.6\r
7d582d6b 334//\r
959ccb23 335\r
234dfbf8 336#define UEFI_CONFIG_LANG "x-UEFI"\r
337#define UEFI_CONFIG_LANG_2 "x-i-UEFI"\r
7d582d6b 338\r
e0c047a0 339///\r
340/// The fixed header consists of a standard record header and then the string identifiers\r
341/// contained in this section and the offsets of the string and language information.\r
342///\r
7d582d6b 343typedef struct _EFI_HII_STRING_PACKAGE_HDR {\r
344 EFI_HII_PACKAGE_HEADER Header;\r
345 UINT32 HdrSize;\r
346 UINT32 StringInfoOffset;\r
347 CHAR16 LanguageWindow[16];\r
348 EFI_STRING_ID LanguageName;\r
349 CHAR8 Language[1];\r
350} EFI_HII_STRING_PACKAGE_HDR;\r
959ccb23 351\r
352typedef struct {\r
7d582d6b 353 UINT8 BlockType;\r
354} EFI_HII_STRING_BLOCK;\r
355\r
e0c047a0 356//\r
357// Value of different string information block types\r
358//\r
7d582d6b 359#define EFI_HII_SIBT_END 0x00\r
360#define EFI_HII_SIBT_STRING_SCSU 0x10\r
361#define EFI_HII_SIBT_STRING_SCSU_FONT 0x11\r
362#define EFI_HII_SIBT_STRINGS_SCSU 0x12\r
363#define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13\r
364#define EFI_HII_SIBT_STRING_UCS2 0x14\r
365#define EFI_HII_SIBT_STRING_UCS2_FONT 0x15\r
366#define EFI_HII_SIBT_STRINGS_UCS2 0x16\r
367#define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17\r
368#define EFI_HII_SIBT_DUPLICATE 0x20\r
369#define EFI_HII_SIBT_SKIP2 0x21\r
370#define EFI_HII_SIBT_SKIP1 0x22\r
371#define EFI_HII_SIBT_EXT1 0x30\r
372#define EFI_HII_SIBT_EXT2 0x31\r
373#define EFI_HII_SIBT_EXT4 0x32\r
374#define EFI_HII_SIBT_FONT 0x40\r
375\r
e0c047a0 376//\r
377// Definition of different string information block types\r
378//\r
379\r
7d582d6b 380typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK {\r
381 EFI_HII_STRING_BLOCK Header;\r
382 EFI_STRING_ID StringId;\r
383} EFI_HII_SIBT_DUPLICATE_BLOCK;\r
384\r
385typedef struct _EFI_HII_SIBT_END_BLOCK {\r
386 EFI_HII_STRING_BLOCK Header;\r
387} EFI_HII_SIBT_END_BLOCK;\r
388\r
389typedef struct _EFI_HII_SIBT_EXT1_BLOCK {\r
390 EFI_HII_STRING_BLOCK Header;\r
391 UINT8 BlockType2;\r
392 UINT8 Length;\r
393} EFI_HII_SIBT_EXT1_BLOCK;\r
394\r
395typedef struct _EFI_HII_SIBT_EXT2_BLOCK {\r
396 EFI_HII_STRING_BLOCK Header;\r
397 UINT8 BlockType2;\r
398 UINT16 Length;\r
399} EFI_HII_SIBT_EXT2_BLOCK;\r
400\r
401typedef struct _EFI_HII_SIBT_EXT4_BLOCK {\r
402 EFI_HII_STRING_BLOCK Header;\r
403 UINT8 BlockType2;\r
404 UINT32 Length;\r
405} EFI_HII_SIBT_EXT4_BLOCK;\r
406\r
407typedef struct _EFI_HII_SIBT_FONT_BLOCK {\r
408 EFI_HII_SIBT_EXT2_BLOCK Header;\r
409 UINT8 FontId;\r
410 UINT16 FontSize;\r
411 EFI_HII_FONT_STYLE FontStyle;\r
412 CHAR16 FontName[1];\r
413} EFI_HII_SIBT_FONT_BLOCK;\r
414\r
415typedef struct _EFI_HII_SIBT_SKIP1_BLOCK {\r
416 EFI_HII_STRING_BLOCK Header;\r
417 UINT8 SkipCount;\r
418} EFI_HII_SIBT_SKIP1_BLOCK;\r
419\r
420typedef struct _EFI_HII_SIBT_SKIP2_BLOCK {\r
421 EFI_HII_STRING_BLOCK Header;\r
422 UINT16 SkipCount;\r
423} EFI_HII_SIBT_SKIP2_BLOCK;\r
424\r
425typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK {\r
426 EFI_HII_STRING_BLOCK Header;\r
427 UINT8 StringText[1];\r
428} EFI_HII_SIBT_STRING_SCSU_BLOCK;\r
429\r
430typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK {\r
431 EFI_HII_STRING_BLOCK Header;\r
432 UINT8 FontIdentifier;\r
433 UINT8 StringText[1];\r
434} EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK;\r
435\r
436typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK {\r
437 EFI_HII_STRING_BLOCK Header;\r
438 UINT16 StringCount;\r
439 UINT8 StringText[1];\r
440} EFI_HII_SIBT_STRINGS_SCSU_BLOCK;\r
441\r
442typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK {\r
443 EFI_HII_STRING_BLOCK Header;\r
444 UINT8 FontIdentifier;\r
445 UINT16 StringCount;\r
446 UINT8 StringText[1];\r
447} EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK;\r
448\r
449typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK {\r
450 EFI_HII_STRING_BLOCK Header;\r
451 CHAR16 StringText[1];\r
452} EFI_HII_SIBT_STRING_UCS2_BLOCK;\r
453\r
454typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK {\r
455 EFI_HII_STRING_BLOCK Header;\r
456 UINT8 FontIdentifier;\r
457 CHAR16 StringText[1];\r
458} EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK;\r
459\r
460typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK {\r
461 EFI_HII_STRING_BLOCK Header;\r
462 UINT16 StringCount;\r
463 CHAR16 StringText[1];\r
464} EFI_HII_SIBT_STRINGS_UCS2_BLOCK;\r
465\r
466typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK {\r
467 EFI_HII_STRING_BLOCK Header;\r
468 UINT8 FontIdentifier;\r
469 UINT16 StringCount;\r
470 CHAR16 StringText[1];\r
471} EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK;\r
959ccb23 472\r
473//\r
e0c047a0 474// Definitions for Image Package\r
475// Section 27.3.7\r
7d582d6b 476//\r
477\r
478typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {\r
479 EFI_HII_PACKAGE_HEADER Header;\r
480 UINT32 ImageInfoOffset;\r
481 UINT32 PaletteInfoOffset;\r
482} EFI_HII_IMAGE_PACKAGE_HDR;\r
483\r
484typedef struct _EFI_HII_IMAGE_BLOCK {\r
485 UINT8 BlockType;\r
486} EFI_HII_IMAGE_BLOCK;\r
487\r
e0c047a0 488//\r
489// Value of different image information block types\r
490//\r
7d582d6b 491#define EFI_HII_IIBT_END 0x00\r
492#define EFI_HII_IIBT_IMAGE_1BIT 0x10\r
493#define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11\r
494#define EFI_HII_IIBT_IMAGE_4BIT 0x12\r
495#define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13\r
496#define EFI_HII_IIBT_IMAGE_8BIT 0x14\r
497#define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15\r
498#define EFI_HII_IIBT_IMAGE_24BIT 0x16\r
499#define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17\r
500#define EFI_HII_IIBT_IMAGE_JPEG 0x18\r
6ef3ae6c 501#define EFI_HII_IIBT_IMAGE_PNG 0x19\r
7d582d6b 502#define EFI_HII_IIBT_DUPLICATE 0x20\r
503#define EFI_HII_IIBT_SKIP2 0x21\r
504#define EFI_HII_IIBT_SKIP1 0x22\r
505#define EFI_HII_IIBT_EXT1 0x30\r
506#define EFI_HII_IIBT_EXT2 0x31\r
507#define EFI_HII_IIBT_EXT4 0x32\r
508\r
e0c047a0 509//\r
510// Definition of different image information block types\r
511//\r
512\r
7d582d6b 513typedef struct _EFI_HII_IIBT_END_BLOCK {\r
514 EFI_HII_IMAGE_BLOCK Header;\r
515} EFI_HII_IIBT_END_BLOCK;\r
516\r
517typedef struct _EFI_HII_IIBT_EXT1_BLOCK {\r
518 EFI_HII_IMAGE_BLOCK Header;\r
519 UINT8 BlockType2;\r
520 UINT8 Length;\r
521} EFI_HII_IIBT_EXT1_BLOCK;\r
522\r
523typedef struct _EFI_HII_IIBT_EXT2_BLOCK {\r
524 EFI_HII_IMAGE_BLOCK Header;\r
525 UINT8 BlockType2;\r
526 UINT16 Length;\r
527} EFI_HII_IIBT_EXT2_BLOCK;\r
528\r
529typedef struct _EFI_HII_IIBT_EXT4_BLOCK {\r
530 EFI_HII_IMAGE_BLOCK Header;\r
531 UINT8 BlockType2;\r
532 UINT32 Length;\r
533} EFI_HII_IIBT_EXT4_BLOCK;\r
534\r
535typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE {\r
536 UINT16 Width;\r
537 UINT16 Height;\r
538 UINT8 Data[1];\r
539} EFI_HII_IIBT_IMAGE_1BIT_BASE;\r
540\r
541typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK {\r
542 EFI_HII_IMAGE_BLOCK Header;\r
543 UINT8 PaletteIndex;\r
544 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;\r
545} EFI_HII_IIBT_IMAGE_1BIT_BLOCK;\r
546\r
547typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK {\r
548 EFI_HII_IMAGE_BLOCK Header;\r
549 UINT8 PaletteIndex;\r
550 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;\r
551} EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK;\r
552\r
553typedef struct _EFI_HII_RGB_PIXEL {\r
554 UINT8 b;\r
555 UINT8 g;\r
556 UINT8 r;\r
557} EFI_HII_RGB_PIXEL;\r
558\r
559typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE {\r
560 UINT16 Width;\r
561 UINT16 Height;\r
562 EFI_HII_RGB_PIXEL Bitmap[1];\r
563} EFI_HII_IIBT_IMAGE_24BIT_BASE;\r
564\r
565typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK {\r
566 EFI_HII_IMAGE_BLOCK Header;\r
567 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;\r
568} EFI_HII_IIBT_IMAGE_24BIT_BLOCK;\r
569\r
570typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK {\r
571 EFI_HII_IMAGE_BLOCK Header;\r
572 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;\r
573} EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK;\r
574\r
575typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE {\r
576 UINT16 Width;\r
577 UINT16 Height;\r
578 UINT8 Data[1];\r
579} EFI_HII_IIBT_IMAGE_4BIT_BASE;\r
580\r
581typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK {\r
582 EFI_HII_IMAGE_BLOCK Header;\r
583 UINT8 PaletteIndex;\r
584 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;\r
585} EFI_HII_IIBT_IMAGE_4BIT_BLOCK;\r
586\r
587typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK {\r
588 EFI_HII_IMAGE_BLOCK Header;\r
589 UINT8 PaletteIndex;\r
590 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;\r
591} EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK;\r
592\r
593typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE {\r
594 UINT16 Width;\r
595 UINT16 Height;\r
596 UINT8 Data[1];\r
597} EFI_HII_IIBT_IMAGE_8BIT_BASE;\r
598\r
599typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK {\r
600 EFI_HII_IMAGE_BLOCK Header;\r
601 UINT8 PaletteIndex;\r
602 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;\r
603} EFI_HII_IIBT_IMAGE_8BIT_BLOCK;\r
604\r
605typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK {\r
606 EFI_HII_IMAGE_BLOCK Header;\r
607 UINT8 PaletteIndex;\r
608 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;\r
609} EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK;\r
610\r
611typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK {\r
612 EFI_HII_IMAGE_BLOCK Header;\r
613 EFI_IMAGE_ID ImageId;\r
614} EFI_HII_IIBT_DUPLICATE_BLOCK;\r
615\r
616typedef struct _EFI_HII_IIBT_JPEG_BLOCK {\r
617 EFI_HII_IMAGE_BLOCK Header;\r
618 UINT32 Size;\r
619 UINT8 Data[1];\r
620} EFI_HII_IIBT_JPEG_BLOCK;\r
621\r
6ef3ae6c
SEHM
622typedef struct _EFI_HII_IIBT_PNG_BLOCK {\r
623 EFI_HII_IMAGE_BLOCK Header;\r
624 UINT32 Size;\r
625 UINT8 Data[1];\r
626} EFI_HII_IIBT_PNG_BLOCK;\r
627\r
7d582d6b 628typedef struct _EFI_HII_IIBT_SKIP1_BLOCK {\r
629 EFI_HII_IMAGE_BLOCK Header;\r
630 UINT8 SkipCount;\r
631} EFI_HII_IIBT_SKIP1_BLOCK;\r
632\r
633typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {\r
634 EFI_HII_IMAGE_BLOCK Header;\r
635 UINT16 SkipCount;\r
636} EFI_HII_IIBT_SKIP2_BLOCK;\r
637\r
e0c047a0 638//\r
639// Definitions for Palette Information\r
640//\r
641\r
7d582d6b 642typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {\r
643 UINT16 PaletteCount;\r
644} EFI_HII_IMAGE_PALETTE_INFO_HEADER;\r
645\r
646typedef struct _EFI_HII_IMAGE_PALETTE_INFO {\r
647 UINT16 PaletteSize;\r
648 EFI_HII_RGB_PIXEL PaletteValue[1];\r
649} EFI_HII_IMAGE_PALETTE_INFO;\r
650\r
959ccb23 651//\r
e0c047a0 652// Definitions for Forms Package\r
653// Section 27.3.8\r
7d582d6b 654//\r
655\r
e0c047a0 656///\r
f620c889 657/// The Form package is used to carry form-based encoding data.\r
e0c047a0 658///\r
f620c889 659typedef struct _EFI_HII_FORM_PACKAGE_HDR {\r
7d582d6b 660 EFI_HII_PACKAGE_HEADER Header;\r
661 // EFI_IFR_OP_HEADER OpCodeHeader;\r
662 // More op-codes follow\r
f620c889 663} EFI_HII_FORM_PACKAGE_HDR;\r
7d582d6b 664\r
959ccb23 665typedef struct {\r
7d582d6b 666 UINT8 Hour;\r
667 UINT8 Minute;\r
668 UINT8 Second;\r
669} EFI_HII_TIME;\r
959ccb23 670\r
671typedef struct {\r
7d582d6b 672 UINT16 Year;\r
673 UINT8 Month;\r
674 UINT8 Day;\r
675} EFI_HII_DATE;\r
676\r
2ed77d0d
ED
677typedef struct {\r
678 EFI_QUESTION_ID QuestionId;\r
679 EFI_FORM_ID FormId;\r
680 EFI_GUID FormSetGuid;\r
681 EFI_STRING_ID DevicePath;\r
682} EFI_HII_REF;\r
683\r
7d582d6b 684typedef union {\r
685 UINT8 u8;\r
686 UINT16 u16;\r
687 UINT32 u32;\r
688 UINT64 u64;\r
689 BOOLEAN b;\r
690 EFI_HII_TIME time;\r
691 EFI_HII_DATE date;\r
0cd118f7 692 EFI_STRING_ID string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION\r
2ed77d0d 693 EFI_HII_REF ref; ///< EFI_IFR_TYPE_REF\r
4e7d855f 694 // UINT8 buffer[]; ///< EFI_IFR_TYPE_BUFFER\r
7d582d6b 695} EFI_IFR_TYPE_VALUE;\r
696\r
d7132512
LG
697//\r
698// IFR Opcodes\r
699//\r
7d582d6b 700#define EFI_IFR_FORM_OP 0x01\r
701#define EFI_IFR_SUBTITLE_OP 0x02\r
702#define EFI_IFR_TEXT_OP 0x03\r
703#define EFI_IFR_IMAGE_OP 0x04\r
704#define EFI_IFR_ONE_OF_OP 0x05\r
705#define EFI_IFR_CHECKBOX_OP 0x06\r
706#define EFI_IFR_NUMERIC_OP 0x07\r
707#define EFI_IFR_PASSWORD_OP 0x08\r
708#define EFI_IFR_ONE_OF_OPTION_OP 0x09\r
709#define EFI_IFR_SUPPRESS_IF_OP 0x0A\r
710#define EFI_IFR_LOCKED_OP 0x0B\r
711#define EFI_IFR_ACTION_OP 0x0C\r
712#define EFI_IFR_RESET_BUTTON_OP 0x0D\r
713#define EFI_IFR_FORM_SET_OP 0x0E\r
714#define EFI_IFR_REF_OP 0x0F\r
715#define EFI_IFR_NO_SUBMIT_IF_OP 0x10\r
716#define EFI_IFR_INCONSISTENT_IF_OP 0x11\r
717#define EFI_IFR_EQ_ID_VAL_OP 0x12\r
718#define EFI_IFR_EQ_ID_ID_OP 0x13\r
e8ef4283 719#define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14\r
7d582d6b 720#define EFI_IFR_AND_OP 0x15\r
721#define EFI_IFR_OR_OP 0x16\r
722#define EFI_IFR_NOT_OP 0x17\r
723#define EFI_IFR_RULE_OP 0x18\r
724#define EFI_IFR_GRAY_OUT_IF_OP 0x19\r
725#define EFI_IFR_DATE_OP 0x1A\r
726#define EFI_IFR_TIME_OP 0x1B\r
727#define EFI_IFR_STRING_OP 0x1C\r
728#define EFI_IFR_REFRESH_OP 0x1D\r
729#define EFI_IFR_DISABLE_IF_OP 0x1E\r
f6051525 730#define EFI_IFR_ANIMATION_OP 0x1F\r
7d582d6b 731#define EFI_IFR_TO_LOWER_OP 0x20\r
732#define EFI_IFR_TO_UPPER_OP 0x21\r
0cd118f7 733#define EFI_IFR_MAP_OP 0x22\r
7d582d6b 734#define EFI_IFR_ORDERED_LIST_OP 0x23\r
735#define EFI_IFR_VARSTORE_OP 0x24\r
736#define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25\r
737#define EFI_IFR_VARSTORE_EFI_OP 0x26\r
738#define EFI_IFR_VARSTORE_DEVICE_OP 0x27\r
739#define EFI_IFR_VERSION_OP 0x28\r
740#define EFI_IFR_END_OP 0x29\r
741#define EFI_IFR_MATCH_OP 0x2A\r
0cd118f7 742#define EFI_IFR_GET_OP 0x2B\r
2573712e 743#define EFI_IFR_SET_OP 0x2C\r
0cd118f7
LG
744#define EFI_IFR_READ_OP 0x2D\r
745#define EFI_IFR_WRITE_OP 0x2E\r
7d582d6b 746#define EFI_IFR_EQUAL_OP 0x2F\r
747#define EFI_IFR_NOT_EQUAL_OP 0x30\r
748#define EFI_IFR_GREATER_THAN_OP 0x31\r
749#define EFI_IFR_GREATER_EQUAL_OP 0x32\r
750#define EFI_IFR_LESS_THAN_OP 0x33\r
751#define EFI_IFR_LESS_EQUAL_OP 0x34\r
752#define EFI_IFR_BITWISE_AND_OP 0x35\r
753#define EFI_IFR_BITWISE_OR_OP 0x36\r
754#define EFI_IFR_BITWISE_NOT_OP 0x37\r
755#define EFI_IFR_SHIFT_LEFT_OP 0x38\r
756#define EFI_IFR_SHIFT_RIGHT_OP 0x39\r
757#define EFI_IFR_ADD_OP 0x3A\r
758#define EFI_IFR_SUBTRACT_OP 0x3B\r
759#define EFI_IFR_MULTIPLY_OP 0x3C\r
760#define EFI_IFR_DIVIDE_OP 0x3D\r
761#define EFI_IFR_MODULO_OP 0x3E\r
762#define EFI_IFR_RULE_REF_OP 0x3F\r
763#define EFI_IFR_QUESTION_REF1_OP 0x40\r
764#define EFI_IFR_QUESTION_REF2_OP 0x41\r
765#define EFI_IFR_UINT8_OP 0x42\r
766#define EFI_IFR_UINT16_OP 0x43\r
767#define EFI_IFR_UINT32_OP 0x44\r
768#define EFI_IFR_UINT64_OP 0x45\r
769#define EFI_IFR_TRUE_OP 0x46\r
770#define EFI_IFR_FALSE_OP 0x47\r
771#define EFI_IFR_TO_UINT_OP 0x48\r
772#define EFI_IFR_TO_STRING_OP 0x49\r
773#define EFI_IFR_TO_BOOLEAN_OP 0x4A\r
774#define EFI_IFR_MID_OP 0x4B\r
775#define EFI_IFR_FIND_OP 0x4C\r
776#define EFI_IFR_TOKEN_OP 0x4D\r
777#define EFI_IFR_STRING_REF1_OP 0x4E\r
778#define EFI_IFR_STRING_REF2_OP 0x4F\r
779#define EFI_IFR_CONDITIONAL_OP 0x50\r
780#define EFI_IFR_QUESTION_REF3_OP 0x51\r
781#define EFI_IFR_ZERO_OP 0x52\r
782#define EFI_IFR_ONE_OP 0x53\r
783#define EFI_IFR_ONES_OP 0x54\r
784#define EFI_IFR_UNDEFINED_OP 0x55\r
785#define EFI_IFR_LENGTH_OP 0x56\r
786#define EFI_IFR_DUP_OP 0x57\r
787#define EFI_IFR_THIS_OP 0x58\r
788#define EFI_IFR_SPAN_OP 0x59\r
789#define EFI_IFR_VALUE_OP 0x5A\r
790#define EFI_IFR_DEFAULT_OP 0x5B\r
791#define EFI_IFR_DEFAULTSTORE_OP 0x5C\r
0cd118f7 792#define EFI_IFR_FORM_MAP_OP 0x5D\r
7d582d6b 793#define EFI_IFR_CATENATE_OP 0x5E\r
794#define EFI_IFR_GUID_OP 0x5F\r
0cd118f7 795#define EFI_IFR_SECURITY_OP 0x60\r
26a65e5c 796#define EFI_IFR_MODAL_TAG_OP 0x61\r
dfc66bb9 797#define EFI_IFR_REFRESH_ID_OP 0x62\r
774b5736 798#define EFI_IFR_WARNING_IF_OP 0x63\r
7cc80bfd 799#define EFI_IFR_MATCH2_OP 0x64\r
7d582d6b 800\r
e0c047a0 801//\r
802// Definitions of IFR Standard Headers\r
803// Section 27.3.8.2\r
804//\r
7d582d6b 805\r
806typedef struct _EFI_IFR_OP_HEADER {\r
807 UINT8 OpCode;\r
808 UINT8 Length:7;\r
809 UINT8 Scope:1;\r
810} EFI_IFR_OP_HEADER;\r
811\r
812typedef struct _EFI_IFR_STATEMENT_HEADER {\r
813 EFI_STRING_ID Prompt;\r
814 EFI_STRING_ID Help;\r
815} EFI_IFR_STATEMENT_HEADER;\r
816\r
817typedef struct _EFI_IFR_QUESTION_HEADER {\r
818 EFI_IFR_STATEMENT_HEADER Header;\r
819 EFI_QUESTION_ID QuestionId;\r
820 EFI_VARSTORE_ID VarStoreId;\r
821 union {\r
822 EFI_STRING_ID VarName;\r
823 UINT16 VarOffset;\r
824 } VarStoreInfo;\r
825 UINT8 Flags;\r
826} EFI_IFR_QUESTION_HEADER;\r
827\r
e0c047a0 828//\r
829// Flag values of EFI_IFR_QUESTION_HEADER\r
830//\r
1c2a4962
ED
831#define EFI_IFR_FLAG_READ_ONLY 0x01\r
832#define EFI_IFR_FLAG_CALLBACK 0x04\r
833#define EFI_IFR_FLAG_RESET_REQUIRED 0x10\r
834#define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40\r
835#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80\r
7d582d6b 836\r
e0c047a0 837//\r
838// Definition for Opcode Reference\r
839// Section 27.3.8.3\r
840//\r
7d582d6b 841typedef struct _EFI_IFR_DEFAULTSTORE {\r
842 EFI_IFR_OP_HEADER Header;\r
843 EFI_STRING_ID DefaultName;\r
844 UINT16 DefaultId;\r
845} EFI_IFR_DEFAULTSTORE;\r
846\r
e0c047a0 847//\r
848// Default Identifier of default store \r
849//\r
7d582d6b 850#define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000\r
851#define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001\r
852#define EFI_HII_DEFAULT_CLASS_SAFE 0x0002\r
853#define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000\r
854#define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff\r
855#define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000\r
856#define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff\r
857#define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000\r
858#define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff\r
859\r
860typedef struct _EFI_IFR_VARSTORE {\r
861 EFI_IFR_OP_HEADER Header;\r
862 EFI_GUID Guid;\r
863 EFI_VARSTORE_ID VarStoreId;\r
864 UINT16 Size;\r
865 UINT8 Name[1];\r
866} EFI_IFR_VARSTORE;\r
867\r
868typedef struct _EFI_IFR_VARSTORE_EFI {\r
869 EFI_IFR_OP_HEADER Header;\r
54cf8780 870 EFI_VARSTORE_ID VarStoreId;\r
7d582d6b 871 EFI_GUID Guid;\r
872 UINT32 Attributes;\r
d23610eb
ED
873 UINT16 Size;\r
874 UINT8 Name[1];\r
7d582d6b 875} EFI_IFR_VARSTORE_EFI;\r
876\r
877typedef struct _EFI_IFR_VARSTORE_NAME_VALUE {\r
878 EFI_IFR_OP_HEADER Header;\r
54cf8780 879 EFI_VARSTORE_ID VarStoreId;\r
7d582d6b 880 EFI_GUID Guid;\r
881} EFI_IFR_VARSTORE_NAME_VALUE;\r
882\r
883typedef struct _EFI_IFR_FORM_SET {\r
884 EFI_IFR_OP_HEADER Header;\r
885 EFI_GUID Guid;\r
886 EFI_STRING_ID FormSetTitle;\r
887 EFI_STRING_ID Help;\r
c2ace45e
LG
888 UINT8 Flags;\r
889 // EFI_GUID ClassGuid[];\r
7d582d6b 890} EFI_IFR_FORM_SET;\r
891\r
892typedef struct _EFI_IFR_END {\r
893 EFI_IFR_OP_HEADER Header;\r
894} EFI_IFR_END;\r
895\r
896typedef struct _EFI_IFR_FORM {\r
897 EFI_IFR_OP_HEADER Header;\r
898 UINT16 FormId;\r
899 EFI_STRING_ID FormTitle;\r
900} EFI_IFR_FORM;\r
901\r
902typedef struct _EFI_IFR_IMAGE {\r
903 EFI_IFR_OP_HEADER Header;\r
904 EFI_IMAGE_ID Id;\r
905} EFI_IFR_IMAGE;\r
906\r
cadf8790 907typedef struct _EFI_IFR_MODAL_TAG {\r
26a65e5c 908 EFI_IFR_OP_HEADER Header;\r
cadf8790 909} EFI_IFR_MODAL_TAG;\r
26a65e5c 910\r
7d582d6b 911typedef struct _EFI_IFR_LOCKED {\r
912 EFI_IFR_OP_HEADER Header;\r
913} EFI_IFR_LOCKED;\r
914\r
915typedef struct _EFI_IFR_RULE {\r
916 EFI_IFR_OP_HEADER Header;\r
917 UINT8 RuleId;\r
918} EFI_IFR_RULE;\r
919\r
920typedef struct _EFI_IFR_DEFAULT {\r
921 EFI_IFR_OP_HEADER Header;\r
922 UINT16 DefaultId;\r
923 UINT8 Type;\r
924 EFI_IFR_TYPE_VALUE Value;\r
925} EFI_IFR_DEFAULT;\r
926\r
4706ff4f
ED
927typedef struct _EFI_IFR_DEFAULT_2 {\r
928 EFI_IFR_OP_HEADER Header;\r
929 UINT16 DefaultId;\r
930 UINT8 Type;\r
931} EFI_IFR_DEFAULT_2;\r
932\r
7d582d6b 933typedef struct _EFI_IFR_VALUE {\r
934 EFI_IFR_OP_HEADER Header;\r
935} EFI_IFR_VALUE;\r
936\r
937typedef struct _EFI_IFR_SUBTITLE {\r
938 EFI_IFR_OP_HEADER Header;\r
939 EFI_IFR_STATEMENT_HEADER Statement;\r
940 UINT8 Flags;\r
941} EFI_IFR_SUBTITLE;\r
942\r
943#define EFI_IFR_FLAGS_HORIZONTAL 0x01\r
944\r
945typedef struct _EFI_IFR_CHECKBOX {\r
946 EFI_IFR_OP_HEADER Header;\r
947 EFI_IFR_QUESTION_HEADER Question;\r
948 UINT8 Flags;\r
949} EFI_IFR_CHECKBOX;\r
950\r
951#define EFI_IFR_CHECKBOX_DEFAULT 0x01\r
952#define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02\r
953\r
954typedef struct _EFI_IFR_TEXT {\r
955 EFI_IFR_OP_HEADER Header;\r
956 EFI_IFR_STATEMENT_HEADER Statement;\r
957 EFI_STRING_ID TextTwo;\r
958} EFI_IFR_TEXT;\r
959\r
960typedef struct _EFI_IFR_REF {\r
961 EFI_IFR_OP_HEADER Header;\r
962 EFI_IFR_QUESTION_HEADER Question;\r
963 EFI_FORM_ID FormId;\r
964} EFI_IFR_REF;\r
965\r
966typedef struct _EFI_IFR_REF2 {\r
967 EFI_IFR_OP_HEADER Header;\r
968 EFI_IFR_QUESTION_HEADER Question;\r
969 EFI_FORM_ID FormId;\r
970 EFI_QUESTION_ID QuestionId;\r
971} EFI_IFR_REF2;\r
972\r
973typedef struct _EFI_IFR_REF3 {\r
974 EFI_IFR_OP_HEADER Header;\r
975 EFI_IFR_QUESTION_HEADER Question;\r
976 EFI_FORM_ID FormId;\r
977 EFI_QUESTION_ID QuestionId;\r
978 EFI_GUID FormSetId;\r
979} EFI_IFR_REF3;\r
980\r
981typedef struct _EFI_IFR_REF4 {\r
982 EFI_IFR_OP_HEADER Header;\r
983 EFI_IFR_QUESTION_HEADER Question;\r
984 EFI_FORM_ID FormId;\r
985 EFI_QUESTION_ID QuestionId;\r
986 EFI_GUID FormSetId;\r
987 EFI_STRING_ID DevicePath;\r
988} EFI_IFR_REF4;\r
989\r
2ed77d0d
ED
990typedef struct _EFI_IFR_REF5 {\r
991 EFI_IFR_OP_HEADER Header;\r
992 EFI_IFR_QUESTION_HEADER Question;\r
993} EFI_IFR_REF5;\r
994\r
7d582d6b 995typedef struct _EFI_IFR_RESET_BUTTON {\r
996 EFI_IFR_OP_HEADER Header;\r
16cb6eca 997 EFI_IFR_STATEMENT_HEADER Statement;\r
7d582d6b 998 EFI_DEFAULT_ID DefaultId;\r
999} EFI_IFR_RESET_BUTTON;\r
1000\r
1001typedef struct _EFI_IFR_ACTION {\r
1002 EFI_IFR_OP_HEADER Header;\r
1003 EFI_IFR_QUESTION_HEADER Question;\r
1004 EFI_STRING_ID QuestionConfig;\r
1005} EFI_IFR_ACTION;\r
1006\r
1007typedef struct _EFI_IFR_ACTION_1 {\r
1008 EFI_IFR_OP_HEADER Header;\r
1009 EFI_IFR_QUESTION_HEADER Question;\r
1010} EFI_IFR_ACTION_1;\r
1011\r
1012typedef struct _EFI_IFR_DATE {\r
1013 EFI_IFR_OP_HEADER Header;\r
1014 EFI_IFR_QUESTION_HEADER Question;\r
1015 UINT8 Flags;\r
959ccb23 1016} EFI_IFR_DATE;\r
1017\r
e0c047a0 1018//\r
1019// Flags that describe the behavior of the question.\r
1020//\r
7d582d6b 1021#define EFI_QF_DATE_YEAR_SUPPRESS 0x01\r
1022#define EFI_QF_DATE_MONTH_SUPPRESS 0x02\r
1023#define EFI_QF_DATE_DAY_SUPPRESS 0x04\r
959ccb23 1024\r
7d582d6b 1025#define EFI_QF_DATE_STORAGE 0x30\r
1026#define QF_DATE_STORAGE_NORMAL 0x00\r
1027#define QF_DATE_STORAGE_TIME 0x10\r
1028#define QF_DATE_STORAGE_WAKEUP 0x20\r
1029\r
1030typedef union {\r
1031 struct {\r
1032 UINT8 MinValue;\r
1033 UINT8 MaxValue;\r
1034 UINT8 Step;\r
1035 } u8;\r
1036 struct {\r
1037 UINT16 MinValue;\r
1038 UINT16 MaxValue;\r
1039 UINT16 Step;\r
1040 } u16;\r
1041 struct {\r
1042 UINT32 MinValue;\r
1043 UINT32 MaxValue;\r
1044 UINT32 Step;\r
1045 } u32;\r
1046 struct {\r
1047 UINT64 MinValue;\r
1048 UINT64 MaxValue;\r
1049 UINT64 Step;\r
1050 } u64;\r
1051} MINMAXSTEP_DATA;\r
1052\r
1053typedef struct _EFI_IFR_NUMERIC {\r
1054 EFI_IFR_OP_HEADER Header;\r
1055 EFI_IFR_QUESTION_HEADER Question;\r
1056 UINT8 Flags;\r
1057 MINMAXSTEP_DATA data;\r
1058} EFI_IFR_NUMERIC;\r
1059\r
e0c047a0 1060//\r
1061// Flags related to the numeric question\r
1062//\r
7d582d6b 1063#define EFI_IFR_NUMERIC_SIZE 0x03\r
e0c047a0 1064#define EFI_IFR_NUMERIC_SIZE_1 0x00\r
1065#define EFI_IFR_NUMERIC_SIZE_2 0x01\r
1066#define EFI_IFR_NUMERIC_SIZE_4 0x02\r
1067#define EFI_IFR_NUMERIC_SIZE_8 0x03\r
7d582d6b 1068\r
1069#define EFI_IFR_DISPLAY 0x30\r
e0c047a0 1070#define EFI_IFR_DISPLAY_INT_DEC 0x00\r
1071#define EFI_IFR_DISPLAY_UINT_DEC 0x10\r
1072#define EFI_IFR_DISPLAY_UINT_HEX 0x20\r
7d582d6b 1073\r
1074typedef struct _EFI_IFR_ONE_OF {\r
1075 EFI_IFR_OP_HEADER Header;\r
1076 EFI_IFR_QUESTION_HEADER Question;\r
1077 UINT8 Flags;\r
1078 MINMAXSTEP_DATA data;\r
1079} EFI_IFR_ONE_OF;\r
1080\r
1081typedef struct _EFI_IFR_STRING {\r
1082 EFI_IFR_OP_HEADER Header;\r
1083 EFI_IFR_QUESTION_HEADER Question;\r
1084 UINT8 MinSize;\r
1085 UINT8 MaxSize;\r
1086 UINT8 Flags;\r
959ccb23 1087} EFI_IFR_STRING;\r
1088\r
7d582d6b 1089#define EFI_IFR_STRING_MULTI_LINE 0x01\r
959ccb23 1090\r
7d582d6b 1091typedef struct _EFI_IFR_PASSWORD {\r
1092 EFI_IFR_OP_HEADER Header;\r
1093 EFI_IFR_QUESTION_HEADER Question;\r
1094 UINT16 MinSize;\r
1095 UINT16 MaxSize;\r
1096} EFI_IFR_PASSWORD;\r
959ccb23 1097\r
7d582d6b 1098typedef struct _EFI_IFR_ORDERED_LIST {\r
1099 EFI_IFR_OP_HEADER Header;\r
1100 EFI_IFR_QUESTION_HEADER Question;\r
1101 UINT8 MaxContainers;\r
1102 UINT8 Flags;\r
1103} EFI_IFR_ORDERED_LIST;\r
959ccb23 1104\r
7d582d6b 1105#define EFI_IFR_UNIQUE_SET 0x01\r
1106#define EFI_IFR_NO_EMPTY_SET 0x02\r
959ccb23 1107\r
7d582d6b 1108typedef struct _EFI_IFR_TIME {\r
1109 EFI_IFR_OP_HEADER Header;\r
1110 EFI_IFR_QUESTION_HEADER Question;\r
1111 UINT8 Flags;\r
1112} EFI_IFR_TIME;\r
959ccb23 1113\r
e0c047a0 1114//\r
1115// A bit-mask that determines which unique settings are active for this opcode.\r
1116//\r
7d582d6b 1117#define QF_TIME_HOUR_SUPPRESS 0x01\r
1118#define QF_TIME_MINUTE_SUPPRESS 0x02\r
1119#define QF_TIME_SECOND_SUPPRESS 0x04\r
1120\r
1121#define QF_TIME_STORAGE 0x30\r
e0c047a0 1122#define QF_TIME_STORAGE_NORMAL 0x00\r
1123#define QF_TIME_STORAGE_TIME 0x10\r
1124#define QF_TIME_STORAGE_WAKEUP 0x20\r
7d582d6b 1125\r
1126typedef struct _EFI_IFR_DISABLE_IF {\r
1127 EFI_IFR_OP_HEADER Header;\r
1128} EFI_IFR_DISABLE_IF;\r
1129\r
1130typedef struct _EFI_IFR_SUPPRESS_IF {\r
1131 EFI_IFR_OP_HEADER Header;\r
1132} EFI_IFR_SUPPRESS_IF;\r
1133\r
1134typedef struct _EFI_IFR_GRAY_OUT_IF {\r
1135 EFI_IFR_OP_HEADER Header;\r
1136} EFI_IFR_GRAY_OUT_IF;\r
1137\r
1138typedef struct _EFI_IFR_INCONSISTENT_IF {\r
1139 EFI_IFR_OP_HEADER Header;\r
1140 EFI_STRING_ID Error;\r
1141} EFI_IFR_INCONSISTENT_IF;\r
1142\r
1143typedef struct _EFI_IFR_NO_SUBMIT_IF {\r
1144 EFI_IFR_OP_HEADER Header;\r
1145 EFI_STRING_ID Error;\r
1146} EFI_IFR_NO_SUBMIT_IF;\r
1147\r
774b5736
ED
1148typedef struct _EFI_IFR_WARNING_IF {\r
1149 EFI_IFR_OP_HEADER Header;\r
1150 EFI_STRING_ID Warning;\r
1151 UINT8 TimeOut;\r
1152} EFI_IFR_WARNING_IF;\r
1153\r
7d582d6b 1154typedef struct _EFI_IFR_REFRESH {\r
1155 EFI_IFR_OP_HEADER Header;\r
1156 UINT8 RefreshInterval;\r
1157} EFI_IFR_REFRESH;\r
1158\r
1159typedef struct _EFI_IFR_VARSTORE_DEVICE {\r
1160 EFI_IFR_OP_HEADER Header;\r
1161 EFI_STRING_ID DevicePath;\r
1162} EFI_IFR_VARSTORE_DEVICE;\r
1163\r
1164typedef struct _EFI_IFR_ONE_OF_OPTION {\r
1165 EFI_IFR_OP_HEADER Header;\r
1166 EFI_STRING_ID Option;\r
1167 UINT8 Flags;\r
1168 UINT8 Type;\r
1169 EFI_IFR_TYPE_VALUE Value;\r
1170} EFI_IFR_ONE_OF_OPTION;\r
1171\r
e0c047a0 1172//\r
1173// Types of the option's value.\r
1174//\r
7d582d6b 1175#define EFI_IFR_TYPE_NUM_SIZE_8 0x00\r
1176#define EFI_IFR_TYPE_NUM_SIZE_16 0x01\r
1177#define EFI_IFR_TYPE_NUM_SIZE_32 0x02\r
1178#define EFI_IFR_TYPE_NUM_SIZE_64 0x03\r
1179#define EFI_IFR_TYPE_BOOLEAN 0x04\r
1180#define EFI_IFR_TYPE_TIME 0x05\r
1181#define EFI_IFR_TYPE_DATE 0x06\r
1182#define EFI_IFR_TYPE_STRING 0x07\r
1183#define EFI_IFR_TYPE_OTHER 0x08\r
0cd118f7
LG
1184#define EFI_IFR_TYPE_UNDEFINED 0x09\r
1185#define EFI_IFR_TYPE_ACTION 0x0A\r
1186#define EFI_IFR_TYPE_BUFFER 0x0B\r
2ed77d0d 1187#define EFI_IFR_TYPE_REF 0x0C\r
7d582d6b 1188\r
1189#define EFI_IFR_OPTION_DEFAULT 0x10\r
1190#define EFI_IFR_OPTION_DEFAULT_MFG 0x20\r
1191\r
1192typedef struct _EFI_IFR_GUID {\r
1193 EFI_IFR_OP_HEADER Header;\r
1194 EFI_GUID Guid;\r
1195 //Optional Data Follows\r
1196} EFI_IFR_GUID;\r
1197\r
dfc66bb9
ED
1198typedef struct _EFI_IFR_REFRESH_ID {\r
1199 EFI_IFR_OP_HEADER Header;\r
1200 EFI_GUID RefreshEventGroupId;\r
1201} EFI_IFR_REFRESH_ID;\r
1202\r
7d582d6b 1203typedef struct _EFI_IFR_DUP {\r
1204 EFI_IFR_OP_HEADER Header;\r
1205} EFI_IFR_DUP;\r
1206\r
1207typedef struct _EFI_IFR_EQ_ID_ID {\r
1208 EFI_IFR_OP_HEADER Header;\r
1209 EFI_QUESTION_ID QuestionId1;\r
1210 EFI_QUESTION_ID QuestionId2;\r
1211} EFI_IFR_EQ_ID_ID;\r
1212\r
1213typedef struct _EFI_IFR_EQ_ID_VAL {\r
1214 EFI_IFR_OP_HEADER Header;\r
1215 EFI_QUESTION_ID QuestionId;\r
1216 UINT16 Value;\r
959ccb23 1217} EFI_IFR_EQ_ID_VAL;\r
1218\r
66d550f9 1219typedef struct _EFI_IFR_EQ_ID_VAL_LIST {\r
7d582d6b 1220 EFI_IFR_OP_HEADER Header;\r
1221 EFI_QUESTION_ID QuestionId;\r
1222 UINT16 ListLength;\r
1223 UINT16 ValueList[1];\r
66d550f9 1224} EFI_IFR_EQ_ID_VAL_LIST;\r
959ccb23 1225\r
7d582d6b 1226typedef struct _EFI_IFR_UINT8 {\r
1227 EFI_IFR_OP_HEADER Header;\r
1228 UINT8 Value;\r
1229} EFI_IFR_UINT8;\r
959ccb23 1230\r
7d582d6b 1231typedef struct _EFI_IFR_UINT16 {\r
1232 EFI_IFR_OP_HEADER Header;\r
1233 UINT16 Value;\r
1234} EFI_IFR_UINT16;\r
1235\r
7d582d6b 1236typedef struct _EFI_IFR_UINT32 {\r
1237 EFI_IFR_OP_HEADER Header;\r
1238 UINT32 Value;\r
1239} EFI_IFR_UINT32;\r
1240\r
1241typedef struct _EFI_IFR_UINT64 {\r
1242 EFI_IFR_OP_HEADER Header;\r
1243 UINT64 Value;\r
1244} EFI_IFR_UINT64;\r
1245\r
e0c047a0 1246typedef struct _EFI_IFR_QUESTION_REF1 {\r
1247 EFI_IFR_OP_HEADER Header;\r
1248 EFI_QUESTION_ID QuestionId;\r
1249} EFI_IFR_QUESTION_REF1;\r
1250\r
1251typedef struct _EFI_IFR_QUESTION_REF2 {\r
1252 EFI_IFR_OP_HEADER Header;\r
1253} EFI_IFR_QUESTION_REF2;\r
1254\r
7d582d6b 1255typedef struct _EFI_IFR_QUESTION_REF3 {\r
1256 EFI_IFR_OP_HEADER Header;\r
1257} EFI_IFR_QUESTION_REF3;\r
1258\r
1259typedef struct _EFI_IFR_QUESTION_REF3_2 {\r
1260 EFI_IFR_OP_HEADER Header;\r
1261 EFI_STRING_ID DevicePath;\r
1262} EFI_IFR_QUESTION_REF3_2;\r
1263\r
1264typedef struct _EFI_IFR_QUESTION_REF3_3 {\r
1265 EFI_IFR_OP_HEADER Header;\r
1266 EFI_STRING_ID DevicePath;\r
1267 EFI_GUID Guid;\r
1268} EFI_IFR_QUESTION_REF3_3;\r
1269\r
1270typedef struct _EFI_IFR_RULE_REF {\r
1271 EFI_IFR_OP_HEADER Header;\r
1272 UINT8 RuleId;\r
1273} EFI_IFR_RULE_REF;\r
1274\r
1275typedef struct _EFI_IFR_STRING_REF1 {\r
1276 EFI_IFR_OP_HEADER Header;\r
1277 EFI_STRING_ID StringId;\r
1278} EFI_IFR_STRING_REF1;\r
1279\r
1280typedef struct _EFI_IFR_STRING_REF2 {\r
1281 EFI_IFR_OP_HEADER Header;\r
1282} EFI_IFR_STRING_REF2;\r
1283\r
1284typedef struct _EFI_IFR_THIS {\r
1285 EFI_IFR_OP_HEADER Header;\r
1286} EFI_IFR_THIS;\r
1287\r
1288typedef struct _EFI_IFR_TRUE {\r
1289 EFI_IFR_OP_HEADER Header;\r
1290} EFI_IFR_TRUE;\r
1291\r
1292typedef struct _EFI_IFR_FALSE {\r
1293 EFI_IFR_OP_HEADER Header;\r
1294} EFI_IFR_FALSE;\r
1295\r
1296typedef struct _EFI_IFR_ONE {\r
1297 EFI_IFR_OP_HEADER Header;\r
1298} EFI_IFR_ONE;\r
1299\r
1300typedef struct _EFI_IFR_ONES {\r
1301 EFI_IFR_OP_HEADER Header;\r
1302} EFI_IFR_ONES;\r
1303\r
1304typedef struct _EFI_IFR_ZERO {\r
1305 EFI_IFR_OP_HEADER Header;\r
1306} EFI_IFR_ZERO;\r
1307\r
1308typedef struct _EFI_IFR_UNDEFINED {\r
1309 EFI_IFR_OP_HEADER Header;\r
1310} EFI_IFR_UNDEFINED;\r
1311\r
1312typedef struct _EFI_IFR_VERSION {\r
1313 EFI_IFR_OP_HEADER Header;\r
1314} EFI_IFR_VERSION;\r
1315\r
1316typedef struct _EFI_IFR_LENGTH {\r
1317 EFI_IFR_OP_HEADER Header;\r
1318} EFI_IFR_LENGTH;\r
1319\r
1320typedef struct _EFI_IFR_NOT {\r
1321 EFI_IFR_OP_HEADER Header;\r
1322} EFI_IFR_NOT;\r
1323\r
1324typedef struct _EFI_IFR_BITWISE_NOT {\r
1325 EFI_IFR_OP_HEADER Header;\r
1326} EFI_IFR_BITWISE_NOT;\r
1327\r
1328typedef struct _EFI_IFR_TO_BOOLEAN {\r
1329 EFI_IFR_OP_HEADER Header;\r
1330} EFI_IFR_TO_BOOLEAN;\r
1331\r
fbf926ad 1332///\r
1333/// For EFI_IFR_TO_STRING, when converting from\r
1334/// unsigned integers, these flags control the format:\r
af2dc6a7 1335/// 0 = unsigned decimal.\r
1336/// 1 = signed decimal.\r
1337/// 2 = hexadecimal (lower-case alpha).\r
1338/// 3 = hexadecimal (upper-case alpha).\r
fbf926ad 1339///@{\r
7d582d6b 1340#define EFI_IFR_STRING_UNSIGNED_DEC 0\r
1341#define EFI_IFR_STRING_SIGNED_DEC 1\r
1342#define EFI_IFR_STRING_LOWERCASE_HEX 2\r
1343#define EFI_IFR_STRING_UPPERCASE_HEX 3\r
fbf926ad 1344///@}\r
1345\r
1346///\r
1347/// When converting from a buffer, these flags control the format:\r
af2dc6a7 1348/// 0 = ASCII.\r
1349/// 8 = Unicode.\r
fbf926ad 1350///@{\r
7d582d6b 1351#define EFI_IFR_STRING_ASCII 0\r
1352#define EFI_IFR_STRING_UNICODE 8\r
fbf926ad 1353///@}\r
7d582d6b 1354\r
1355typedef struct _EFI_IFR_TO_STRING {\r
1356 EFI_IFR_OP_HEADER Header;\r
1357 UINT8 Format;\r
1358} EFI_IFR_TO_STRING;\r
1359\r
1360typedef struct _EFI_IFR_TO_UINT {\r
1361 EFI_IFR_OP_HEADER Header;\r
1362} EFI_IFR_TO_UINT;\r
1363\r
1364typedef struct _EFI_IFR_TO_UPPER {\r
1365 EFI_IFR_OP_HEADER Header;\r
1366} EFI_IFR_TO_UPPER;\r
1367\r
1368typedef struct _EFI_IFR_TO_LOWER {\r
1369 EFI_IFR_OP_HEADER Header;\r
1370} EFI_IFR_TO_LOWER;\r
1371\r
1372typedef struct _EFI_IFR_ADD {\r
1373 EFI_IFR_OP_HEADER Header;\r
1374} EFI_IFR_ADD;\r
1375\r
1376typedef struct _EFI_IFR_AND {\r
1377 EFI_IFR_OP_HEADER Header;\r
959ccb23 1378} EFI_IFR_AND;\r
1379\r
7d582d6b 1380typedef struct _EFI_IFR_BITWISE_AND {\r
1381 EFI_IFR_OP_HEADER Header;\r
1382} EFI_IFR_BITWISE_AND;\r
1383\r
1384typedef struct _EFI_IFR_BITWISE_OR {\r
1385 EFI_IFR_OP_HEADER Header;\r
1386} EFI_IFR_BITWISE_OR;\r
1387\r
1388typedef struct _EFI_IFR_CATENATE {\r
1389 EFI_IFR_OP_HEADER Header;\r
1390} EFI_IFR_CATENATE;\r
1391\r
1392typedef struct _EFI_IFR_DIVIDE {\r
1393 EFI_IFR_OP_HEADER Header;\r
1394} EFI_IFR_DIVIDE;\r
1395\r
1396typedef struct _EFI_IFR_EQUAL {\r
1397 EFI_IFR_OP_HEADER Header;\r
1398} EFI_IFR_EQUAL;\r
1399\r
1400typedef struct _EFI_IFR_GREATER_EQUAL {\r
1401 EFI_IFR_OP_HEADER Header;\r
1402} EFI_IFR_GREATER_EQUAL;\r
1403\r
1404typedef struct _EFI_IFR_GREATER_THAN {\r
1405 EFI_IFR_OP_HEADER Header;\r
1406} EFI_IFR_GREATER_THAN;\r
1407\r
1408typedef struct _EFI_IFR_LESS_EQUAL {\r
1409 EFI_IFR_OP_HEADER Header;\r
1410} EFI_IFR_LESS_EQUAL;\r
1411\r
1412typedef struct _EFI_IFR_LESS_THAN {\r
1413 EFI_IFR_OP_HEADER Header;\r
1414} EFI_IFR_LESS_THAN;\r
1415\r
1416typedef struct _EFI_IFR_MATCH {\r
1417 EFI_IFR_OP_HEADER Header;\r
1418} EFI_IFR_MATCH;\r
1419\r
7cc80bfd
ED
1420typedef struct _EFI_IFR_MATCH2 {\r
1421 EFI_IFR_OP_HEADER Header;\r
1422 EFI_GUID SyntaxType;\r
1423} EFI_IFR_MATCH2;\r
1424\r
7d582d6b 1425typedef struct _EFI_IFR_MULTIPLY {\r
1426 EFI_IFR_OP_HEADER Header;\r
1427} EFI_IFR_MULTIPLY;\r
1428\r
1429typedef struct _EFI_IFR_MODULO {\r
1430 EFI_IFR_OP_HEADER Header;\r
1431} EFI_IFR_MODULO;\r
1432\r
1433typedef struct _EFI_IFR_NOT_EQUAL {\r
1434 EFI_IFR_OP_HEADER Header;\r
1435} EFI_IFR_NOT_EQUAL;\r
1436\r
1437typedef struct _EFI_IFR_OR {\r
1438 EFI_IFR_OP_HEADER Header;\r
959ccb23 1439} EFI_IFR_OR;\r
1440\r
7d582d6b 1441typedef struct _EFI_IFR_SHIFT_LEFT {\r
1442 EFI_IFR_OP_HEADER Header;\r
1443} EFI_IFR_SHIFT_LEFT;\r
959ccb23 1444\r
7d582d6b 1445typedef struct _EFI_IFR_SHIFT_RIGHT {\r
1446 EFI_IFR_OP_HEADER Header;\r
1447} EFI_IFR_SHIFT_RIGHT;\r
959ccb23 1448\r
7d582d6b 1449typedef struct _EFI_IFR_SUBTRACT {\r
1450 EFI_IFR_OP_HEADER Header;\r
1451} EFI_IFR_SUBTRACT;\r
959ccb23 1452\r
7d582d6b 1453typedef struct _EFI_IFR_CONDITIONAL {\r
1454 EFI_IFR_OP_HEADER Header;\r
1455} EFI_IFR_CONDITIONAL;\r
959ccb23 1456\r
e0c047a0 1457//\r
1458// Flags governing the matching criteria of EFI_IFR_FIND\r
1459//\r
7d582d6b 1460#define EFI_IFR_FF_CASE_SENSITIVE 0x00\r
1461#define EFI_IFR_FF_CASE_INSENSITIVE 0x01\r
959ccb23 1462\r
7d582d6b 1463typedef struct _EFI_IFR_FIND {\r
1464 EFI_IFR_OP_HEADER Header;\r
1465 UINT8 Format;\r
1466} EFI_IFR_FIND;\r
1467\r
1468typedef struct _EFI_IFR_MID {\r
1469 EFI_IFR_OP_HEADER Header;\r
1470} EFI_IFR_MID;\r
1471\r
1472typedef struct _EFI_IFR_TOKEN {\r
1473 EFI_IFR_OP_HEADER Header;\r
1474} EFI_IFR_TOKEN;\r
1475\r
e0c047a0 1476//\r
1477// Flags specifying whether to find the first matching string\r
1478// or the first non-matching string.\r
1479//\r
7d582d6b 1480#define EFI_IFR_FLAGS_FIRST_MATCHING 0x00\r
1481#define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01\r
1482\r
1483typedef struct _EFI_IFR_SPAN {\r
1484 EFI_IFR_OP_HEADER Header;\r
1485 UINT8 Flags;\r
1486} EFI_IFR_SPAN;\r
959ccb23 1487\r
0cd118f7
LG
1488typedef struct _EFI_IFR_SECURITY {\r
1489 ///\r
1490 /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.\r
1491 ///\r
1492 EFI_IFR_OP_HEADER Header;\r
1493 ///\r
1494 /// Security permission level.\r
1495 ///\r
1496 EFI_GUID Permissions;\r
1497} EFI_IFR_SECURITY;\r
1498\r
1499typedef struct _EFI_IFR_FORM_MAP_METHOD {\r
1500 ///\r
1501 /// The string identifier which provides the human-readable name of \r
1502 /// the configuration method for this standards map form.\r
1503 ///\r
1504 EFI_STRING_ID MethodTitle;\r
1505 ///\r
1506 /// Identifier which uniquely specifies the configuration methods \r
1507 /// associated with this standards map form.\r
1508 ///\r
1509 EFI_GUID MethodIdentifier;\r
1510} EFI_IFR_FORM_MAP_METHOD;\r
1511\r
1512typedef struct _EFI_IFR_FORM_MAP {\r
1513 ///\r
1514 /// The sequence that defines the type of opcode as well as the length \r
1515 /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP. \r
1516 ///\r
1517 EFI_IFR_OP_HEADER Header;\r
1518 ///\r
1519 /// The unique identifier for this particular form.\r
1520 ///\r
1521 EFI_FORM_ID FormId;\r
1522 ///\r
1523 /// One or more configuration method's name and unique identifier.\r
1524 ///\r
2573712e 1525 // EFI_IFR_FORM_MAP_METHOD Methods[];\r
0cd118f7
LG
1526} EFI_IFR_FORM_MAP;\r
1527\r
1528typedef struct _EFI_IFR_SET {\r
1529 ///\r
1530 /// The sequence that defines the type of opcode as well as the length \r
1531 /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP. \r
1532 ///\r
1533 EFI_IFR_OP_HEADER Header;\r
1534 ///\r
1535 /// Specifies the identifier of a previously declared variable store to \r
1536 /// use when storing the question's value. \r
1537 ///\r
1538 EFI_VARSTORE_ID VarStoreId;\r
1539 union {\r
1540 ///\r
1541 /// A 16-bit Buffer Storage offset.\r
1542 ///\r
1543 EFI_STRING_ID VarName;\r
1544 ///\r
1545 /// A Name Value or EFI Variable name (VarName).\r
1546 ///\r
1547 UINT16 VarOffset;\r
1548 } VarStoreInfo;\r
2573712e
LG
1549 ///\r
1550 /// Specifies the type used for storage. \r
1551 ///\r
1552 UINT8 VarStoreType;\r
0cd118f7
LG
1553} EFI_IFR_SET;\r
1554\r
1555typedef struct _EFI_IFR_GET {\r
1556 ///\r
1557 /// The sequence that defines the type of opcode as well as the length \r
1558 /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP. \r
1559 ///\r
1560 EFI_IFR_OP_HEADER Header;\r
1561 ///\r
1562 /// Specifies the identifier of a previously declared variable store to \r
1563 /// use when retrieving the value. \r
1564 ///\r
1565 EFI_VARSTORE_ID VarStoreId;\r
1566 union {\r
1567 ///\r
1568 /// A 16-bit Buffer Storage offset.\r
1569 ///\r
1570 EFI_STRING_ID VarName;\r
1571 ///\r
1572 /// A Name Value or EFI Variable name (VarName).\r
1573 ///\r
1574 UINT16 VarOffset;\r
1575 } VarStoreInfo;\r
1576 ///\r
1577 /// Specifies the type used for storage. \r
1578 ///\r
1579 UINT8 VarStoreType;\r
1580} EFI_IFR_GET;\r
1581\r
1582typedef struct _EFI_IFR_READ {\r
1583 EFI_IFR_OP_HEADER Header;\r
1584} EFI_IFR_READ;\r
1585\r
1586typedef struct _EFI_IFR_WRITE {\r
1587 EFI_IFR_OP_HEADER Header;\r
1588} EFI_IFR_WRITE;\r
1589\r
1590typedef struct _EFI_IFR_MAP {\r
1591 EFI_IFR_OP_HEADER Header;\r
1592} EFI_IFR_MAP;\r
959ccb23 1593//\r
e0c047a0 1594// Definitions for Keyboard Package\r
e0c047a0 1595// Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL\r
959ccb23 1596//\r
7d582d6b 1597\r
9319d2c2
LG
1598///\r
1599/// Each enumeration values maps a physical key on a keyboard.\r
1600///\r
7d582d6b 1601typedef enum { \r
1602 EfiKeyLCtrl,\r
1603 EfiKeyA0, \r
1604 EfiKeyLAlt,\r
1605 EfiKeySpaceBar,\r
1606 EfiKeyA2,\r
1607 EfiKeyA3,\r
1608 EfiKeyA4,\r
1609 EfiKeyRCtrl,\r
1610 EfiKeyLeftArrow,\r
1611 EfiKeyDownArrow,\r
1612 EfiKeyRightArrow,\r
1613 EfiKeyZero,\r
1614 EfiKeyPeriod,\r
1615 EfiKeyEnter,\r
1616 EfiKeyLShift,\r
1617 EfiKeyB0,\r
1618 EfiKeyB1,\r
1619 EfiKeyB2,\r
1620 EfiKeyB3,\r
1621 EfiKeyB4,\r
1622 EfiKeyB5,\r
1623 EfiKeyB6,\r
1624 EfiKeyB7,\r
1625 EfiKeyB8,\r
1626 EfiKeyB9,\r
1627 EfiKeyB10,\r
54cf8780 1628 EfiKeyRShift,\r
7d582d6b 1629 EfiKeyUpArrow,\r
1630 EfiKeyOne,\r
1631 EfiKeyTwo,\r
1632 EfiKeyThree,\r
1633 EfiKeyCapsLock,\r
1634 EfiKeyC1,\r
1635 EfiKeyC2,\r
1636 EfiKeyC3,\r
1637 EfiKeyC4,\r
1638 EfiKeyC5,\r
1639 EfiKeyC6,\r
1640 EfiKeyC7,\r
1641 EfiKeyC8,\r
1642 EfiKeyC9,\r
1643 EfiKeyC10,\r
1644 EfiKeyC11,\r
1645 EfiKeyC12,\r
1646 EfiKeyFour,\r
1647 EfiKeyFive,\r
1648 EfiKeySix,\r
1649 EfiKeyPlus,\r
1650 EfiKeyTab,\r
1651 EfiKeyD1,\r
1652 EfiKeyD2,\r
1653 EfiKeyD3,\r
1654 EfiKeyD4,\r
1655 EfiKeyD5,\r
1656 EfiKeyD6,\r
1657 EfiKeyD7,\r
1658 EfiKeyD8,\r
1659 EfiKeyD9,\r
1660 EfiKeyD10,\r
1661 EfiKeyD11,\r
1662 EfiKeyD12,\r
1663 EfiKeyD13,\r
1664 EfiKeyDel,\r
1665 EfiKeyEnd,\r
1666 EfiKeyPgDn,\r
1667 EfiKeySeven,\r
1668 EfiKeyEight,\r
1669 EfiKeyNine,\r
1670 EfiKeyE0,\r
1671 EfiKeyE1,\r
1672 EfiKeyE2,\r
1673 EfiKeyE3,\r
1674 EfiKeyE4,\r
1675 EfiKeyE5,\r
1676 EfiKeyE6,\r
1677 EfiKeyE7,\r
1678 EfiKeyE8,\r
1679 EfiKeyE9,\r
1680 EfiKeyE10,\r
1681 EfiKeyE11,\r
1682 EfiKeyE12,\r
1683 EfiKeyBackSpace,\r
1684 EfiKeyIns,\r
1685 EfiKeyHome,\r
1686 EfiKeyPgUp,\r
1687 EfiKeyNLck,\r
1688 EfiKeySlash,\r
1689 EfiKeyAsterisk,\r
1690 EfiKeyMinus,\r
1691 EfiKeyEsc,\r
1692 EfiKeyF1,\r
1693 EfiKeyF2,\r
1694 EfiKeyF3,\r
1695 EfiKeyF4,\r
1696 EfiKeyF5,\r
1697 EfiKeyF6,\r
1698 EfiKeyF7,\r
1699 EfiKeyF8,\r
1700 EfiKeyF9,\r
1701 EfiKeyF10,\r
1702 EfiKeyF11,\r
1703 EfiKeyF12,\r
1704 EfiKeyPrint,\r
1705 EfiKeySLck,\r
1706 EfiKeyPause\r
1707} EFI_KEY;\r
1708\r
959ccb23 1709typedef struct {\r
fbf926ad 1710 ///\r
1711 /// Used to describe a physical key on a keyboard.\r
1712 ///\r
7d582d6b 1713 EFI_KEY Key;\r
fbf926ad 1714 ///\r
1715 /// Unicode character code for the Key.\r
1716 ///\r
7d582d6b 1717 CHAR16 Unicode;\r
fbf926ad 1718 ///\r
1719 /// Unicode character code for the key with the shift key being held down.\r
1720 ///\r
7d582d6b 1721 CHAR16 ShiftedUnicode;\r
fbf926ad 1722 ///\r
1723 /// Unicode character code for the key with the Alt-GR being held down.\r
1724 ///\r
7d582d6b 1725 CHAR16 AltGrUnicode;\r
fbf926ad 1726 ///\r
1727 /// Unicode character code for the key with the Alt-GR and shift keys being held down.\r
1728 ///\r
7d582d6b 1729 CHAR16 ShiftedAltGrUnicode;\r
fbf926ad 1730 ///\r
1731 /// Modifier keys are defined to allow for special functionality that is not necessarily \r
1732 /// accomplished by a printable character. Many of these modifier keys are flags to toggle \r
1733 /// certain state bits on and off inside of a keyboard driver.\r
1734 ///\r
7d582d6b 1735 UINT16 Modifier;\r
1736 UINT16 AffectedAttribute;\r
1737} EFI_KEY_DESCRIPTOR;\r
1738\r
8b13229b 1739///\r
1740/// A key which is affected by all the standard shift modifiers. \r
1741/// Most keys would be expected to have this bit active.\r
1742///\r
7d582d6b 1743#define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001\r
8b13229b 1744\r
1745///\r
1746/// This key is affected by the caps lock so that if a keyboard driver\r
1747/// would need to disambiguate between a key which had a "1" defined\r
1a2f870c 1748/// versus an "a" character. Having this bit turned on would tell\r
8b13229b 1749/// the keyboard driver to use the appropriate shifted state or not.\r
1750///\r
7d582d6b 1751#define EFI_AFFECTED_BY_CAPS_LOCK 0x0002\r
8b13229b 1752\r
1753///\r
1754/// Similar to the case of CAPS lock, if this bit is active, the key\r
1755/// is affected by the num lock being turned on.\r
1756///\r
7d582d6b 1757#define EFI_AFFECTED_BY_NUM_LOCK 0x0004\r
959ccb23 1758\r
1759typedef struct {\r
7d582d6b 1760 UINT16 LayoutLength;\r
1761 EFI_GUID Guid;\r
1762 UINT32 LayoutDescriptorStringOffset;\r
1763 UINT8 DescriptorCount;\r
1764 // EFI_KEY_DESCRIPTOR Descriptors[];\r
1765} EFI_HII_KEYBOARD_LAYOUT;\r
959ccb23 1766\r
1767typedef struct {\r
7d582d6b 1768 EFI_HII_PACKAGE_HEADER Header;\r
1769 UINT16 LayoutCount;\r
1770 // EFI_HII_KEYBOARD_LAYOUT Layout[];\r
1771} EFI_HII_KEYBOARD_PACKAGE_HDR;\r
959ccb23 1772\r
959ccb23 1773//\r
7d582d6b 1774// Modifier values\r
959ccb23 1775//\r
7d582d6b 1776#define EFI_NULL_MODIFIER 0x0000\r
1777#define EFI_LEFT_CONTROL_MODIFIER 0x0001\r
1778#define EFI_RIGHT_CONTROL_MODIFIER 0x0002\r
1779#define EFI_LEFT_ALT_MODIFIER 0x0003\r
1780#define EFI_RIGHT_ALT_MODIFIER 0x0004\r
1781#define EFI_ALT_GR_MODIFIER 0x0005\r
1782#define EFI_INSERT_MODIFIER 0x0006\r
1783#define EFI_DELETE_MODIFIER 0x0007\r
1784#define EFI_PAGE_DOWN_MODIFIER 0x0008\r
1785#define EFI_PAGE_UP_MODIFIER 0x0009\r
1786#define EFI_HOME_MODIFIER 0x000A\r
1787#define EFI_END_MODIFIER 0x000B\r
1788#define EFI_LEFT_SHIFT_MODIFIER 0x000C\r
1789#define EFI_RIGHT_SHIFT_MODIFIER 0x000D\r
1790#define EFI_CAPS_LOCK_MODIFIER 0x000E\r
54cf8780 1791#define EFI_NUM_LOCK_MODIFIER 0x000F\r
7d582d6b 1792#define EFI_LEFT_ARROW_MODIFIER 0x0010\r
1793#define EFI_RIGHT_ARROW_MODIFIER 0x0011\r
1794#define EFI_DOWN_ARROW_MODIFIER 0x0012\r
1795#define EFI_UP_ARROW_MODIFIER 0x0013\r
1796#define EFI_NS_KEY_MODIFIER 0x0014\r
1797#define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015\r
1798#define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016\r
1799#define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017\r
1800#define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018\r
1801#define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019\r
1802#define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A\r
1803#define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B\r
1804#define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C\r
1805#define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D\r
1806#define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E\r
1807#define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F\r
1808#define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020\r
1809#define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021\r
959ccb23 1810\r
7d582d6b 1811//\r
1812// Keys that have multiple control functions based on modifier\r
1813// settings are handled in the keyboard driver implementation.\r
1a2f870c 1814// For instance, PRINT_KEY might have a modifier held down and\r
7d582d6b 1815// is still a nonprinting character, but might have an alternate\r
1816// control function like SYSREQUEST\r
1817//\r
1818#define EFI_PRINT_MODIFIER 0x0022\r
1819#define EFI_SYS_REQUEST_MODIFIER 0x0023\r
1820#define EFI_SCROLL_LOCK_MODIFIER 0x0024\r
1821#define EFI_PAUSE_MODIFIER 0x0025\r
1822#define EFI_BREAK_MODIFIER 0x0026\r
959ccb23 1823\r
54cf8780 1824#define EFI_LEFT_LOGO_MODIFIER 0x0027\r
1825#define EFI_RIGHT_LOGO_MODIFIER 0x0028\r
1826#define EFI_MENU_MODIFIER 0x0029\r
1827\r
f6051525 1828///\r
1829/// Animation IFR opcode\r
1830///\r
1831typedef struct _EFI_IFR_ANIMATION {\r
1832 ///\r
1833 /// Standard opcode header, where Header.OpCode is \r
1834 /// EFI_IFR_ANIMATION_OP.\r
1835 ///\r
1836 EFI_IFR_OP_HEADER Header;\r
1837 ///\r
1838 /// Animation identifier in the HII database.\r
1839 ///\r
1840 EFI_ANIMATION_ID Id;\r
1841} EFI_IFR_ANIMATION;\r
1842\r
1843///\r
af2dc6a7 1844/// HII animation package header.\r
f6051525 1845///\r
1846typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR {\r
1847 ///\r
1848 /// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS.\r
1849 ///\r
1850 EFI_HII_PACKAGE_HEADER Header;\r
1851 ///\r
1852 /// Offset, relative to this header, of the animation information. If \r
1853 /// this is zero, then there are no animation sequences in the package.\r
1854 ///\r
1855 UINT32 AnimationInfoOffset;\r
1856} EFI_HII_ANIMATION_PACKAGE_HDR;\r
1857\r
1858///\r
1859/// Animation information is encoded as a series of blocks,\r
af2dc6a7 1860/// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK.\r
f6051525 1861///\r
1862typedef struct _EFI_HII_ANIMATION_BLOCK {\r
1863 UINT8 BlockType;\r
1864 //UINT8 BlockBody[];\r
1865} EFI_HII_ANIMATION_BLOCK;\r
1866\r
1867///\r
af2dc6a7 1868/// Animation block types.\r
f6051525 1869///\r
1870#define EFI_HII_AIBT_END 0x00\r
1871#define EFI_HII_AIBT_OVERLAY_IMAGES 0x10\r
1872#define EFI_HII_AIBT_CLEAR_IMAGES 0x11\r
1873#define EFI_HII_AIBT_RESTORE_SCRN 0x12\r
1874#define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18\r
1875#define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19\r
1876#define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A\r
1877#define EFI_HII_AIBT_DUPLICATE 0x20\r
1878#define EFI_HII_AIBT_SKIP2 0x21\r
1879#define EFI_HII_AIBT_SKIP1 0x22\r
1880#define EFI_HII_AIBT_EXT1 0x30\r
1881#define EFI_HII_AIBT_EXT2 0x31\r
1882#define EFI_HII_AIBT_EXT4 0x32\r
1883\r
1884///\r
1885/// Extended block headers used for variable sized animation records\r
1886/// which need an explicit length.\r
1887///\r
1888\r
1889typedef struct _EFI_HII_AIBT_EXT1_BLOCK {\r
1890 ///\r
af2dc6a7 1891 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1.\r
f6051525 1892 ///\r
1893 EFI_HII_ANIMATION_BLOCK Header;\r
1894 ///\r
af2dc6a7 1895 /// The block type.\r
f6051525 1896 ///\r
1897 UINT8 BlockType2;\r
1898 ///\r
1899 /// Size of the animation block, in bytes, including the animation block header.\r
1900 ///\r
1901 UINT8 Length;\r
1902} EFI_HII_AIBT_EXT1_BLOCK;\r
1903\r
1904typedef struct _EFI_HII_AIBT_EXT2_BLOCK {\r
1905 ///\r
af2dc6a7 1906 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2.\r
f6051525 1907 ///\r
1908 EFI_HII_ANIMATION_BLOCK Header;\r
1909 ///\r
1910 /// The block type\r
1911 ///\r
1912 UINT8 BlockType2;\r
1913 ///\r
1914 /// Size of the animation block, in bytes, including the animation block header.\r
1915 ///\r
1916 UINT16 Length;\r
1917} EFI_HII_AIBT_EXT2_BLOCK;\r
1918\r
1919typedef struct _EFI_HII_AIBT_EXT4_BLOCK {\r
1920 ///\r
af2dc6a7 1921 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4.\r
f6051525 1922 ///\r
1923 EFI_HII_ANIMATION_BLOCK Header;\r
1924 ///\r
1925 /// The block type\r
1926 ///\r
1927 UINT8 BlockType2;\r
1928 ///\r
1929 /// Size of the animation block, in bytes, including the animation block header.\r
1930 ///\r
1931 UINT32 Length;\r
1932} EFI_HII_AIBT_EXT4_BLOCK;\r
1933\r
1934typedef struct _EFI_HII_ANIMATION_CELL {\r
1935 ///\r
1936 /// The X offset from the upper left hand corner of the logical \r
1937 /// window to position the indexed image.\r
1938 ///\r
1939 UINT16 OffsetX;\r
1940 ///\r
1941 /// The Y offset from the upper left hand corner of the logical \r
1942 /// window to position the indexed image.\r
1943 ///\r
1944 UINT16 OffsetY;\r
1945 ///\r
1946 /// The image to display at the specified offset from the upper left \r
1947 /// hand corner of the logical window.\r
1948 ///\r
1949 EFI_IMAGE_ID ImageId;\r
1950 ///\r
1951 /// The number of milliseconds to delay after displaying the indexed \r
1952 /// image and before continuing on to the next linked image. If value \r
1953 /// is zero, no delay.\r
1954 ///\r
1955 UINT16 Delay;\r
1956} EFI_HII_ANIMATION_CELL;\r
1957\r
1958///\r
1959/// An animation block to describe an animation sequence that does not cycle, and\r
1960/// where one image is simply displayed over the previous image.\r
1961///\r
8c6d73fb 1962typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK {\r
f6051525 1963 ///\r
1964 /// This is image that is to be reference by the image protocols, if the \r
1965 /// animation function is not supported or disabled. This image can \r
1966 /// be one particular image from the animation sequence (if any one \r
1967 /// of the animation frames has a complete image) or an alternate \r
1968 /// image that can be displayed alone. If the value is zero, no image \r
1969 /// is displayed.\r
1970 ///\r
1971 EFI_IMAGE_ID DftImageId;\r
1972 ///\r
1973 /// The overall width of the set of images (logical window width).\r
1974 ///\r
1975 UINT16 Width;\r
1976 ///\r
1977 /// The overall height of the set of images (logical window height).\r
1978 ///\r
1979 UINT16 Height;\r
1980 ///\r
1981 /// The number of EFI_HII_ANIMATION_CELL contained in the \r
1982 /// animation sequence.\r
1983 ///\r
1984 UINT16 CellCount;\r
1985 ///\r
1986 /// An array of CellCount animation cells.\r
1987 ///\r
1988 EFI_HII_ANIMATION_CELL AnimationCell[1];\r
1989} EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK;\r
1990\r
1991///\r
1992/// An animation block to describe an animation sequence that does not cycle,\r
1993/// and where the logical window is cleared to the specified color before \r
1994/// the next image is displayed.\r
1995///\r
1996typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK {\r
1997 ///\r
1998 /// This is image that is to be reference by the image protocols, if the \r
1999 /// animation function is not supported or disabled. This image can \r
2000 /// be one particular image from the animation sequence (if any one \r
2001 /// of the animation frames has a complete image) or an alternate \r
2002 /// image that can be displayed alone. If the value is zero, no image \r
2003 /// is displayed.\r
2004 ///\r
2005 EFI_IMAGE_ID DftImageId;\r
2006 ///\r
2007 /// The overall width of the set of images (logical window width).\r
2008 ///\r
2009 UINT16 Width;\r
2010 ///\r
2011 /// The overall height of the set of images (logical window height).\r
2012 ///\r
2013 UINT16 Height;\r
2014 ///\r
2015 /// The number of EFI_HII_ANIMATION_CELL contained in the \r
2016 /// animation sequence.\r
2017 ///\r
2018 UINT16 CellCount;\r
2019 ///\r
2020 /// The color to clear the logical window to before displaying the \r
2021 /// indexed image.\r
2022 ///\r
2023 EFI_HII_RGB_PIXEL BackgndColor;\r
2024 ///\r
2025 /// An array of CellCount animation cells.\r
2026 ///\r
2027 EFI_HII_ANIMATION_CELL AnimationCell[1];\r
2028} EFI_HII_AIBT_CLEAR_IMAGES_BLOCK;\r
2029\r
2030///\r
2031/// An animation block to describe an animation sequence that does not cycle,\r
2032/// and where the screen is restored to the original state before the next \r
2033/// image is displayed.\r
2034///\r
2035typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK {\r
2036 ///\r
2037 /// This is image that is to be reference by the image protocols, if the \r
2038 /// animation function is not supported or disabled. This image can \r
2039 /// be one particular image from the animation sequence (if any one \r
2040 /// of the animation frames has a complete image) or an alternate \r
2041 /// image that can be displayed alone. If the value is zero, no image \r
2042 /// is displayed.\r
2043 ///\r
2044 EFI_IMAGE_ID DftImageId;\r
2045 ///\r
2046 /// The overall width of the set of images (logical window width).\r
2047 ///\r
2048 UINT16 Width;\r
2049 ///\r
2050 /// The overall height of the set of images (logical window height).\r
2051 ///\r
2052 UINT16 Height;\r
2053 ///\r
2054 /// The number of EFI_HII_ANIMATION_CELL contained in the \r
2055 /// animation sequence.\r
2056 ///\r
2057 UINT16 CellCount;\r
2058 ///\r
2059 /// An array of CellCount animation cells.\r
2060 ///\r
2061 EFI_HII_ANIMATION_CELL AnimationCell[1];\r
2062} EFI_HII_AIBT_RESTORE_SCRN_BLOCK;\r
2063\r
2064///\r
2065/// An animation block to describe an animation sequence that continuously cycles,\r
2066/// and where one image is simply displayed over the previous image.\r
2067///\r
2068typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK;\r
2069\r
2070///\r
2071/// An animation block to describe an animation sequence that continuously cycles,\r
2072/// and where the logical window is cleared to the specified color before \r
2073/// the next image is displayed.\r
2074///\r
2075typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK;\r
2076\r
2077///\r
2078/// An animation block to describe an animation sequence that continuously cycles,\r
2079/// and where the screen is restored to the original state before \r
2080/// the next image is displayed.\r
2081///\r
2082typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK;\r
2083\r
2084///\r
2085/// Assigns a new character value to a previously defined animation sequence.\r
2086///\r
2087typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK {\r
2088 ///\r
2089 /// The previously defined animation ID with the exact same \r
2090 /// animation information.\r
2091 ///\r
2092 EFI_ANIMATION_ID AnimationId;\r
2093} EFI_HII_AIBT_DUPLICATE_BLOCK;\r
2094\r
2095///\r
2096/// Skips animation IDs.\r
2097///\r
2098typedef struct _EFI_HII_AIBT_SKIP1_BLOCK {\r
2099 ///\r
2100 /// The unsigned 8-bit value to add to AnimationIdCurrent.\r
2101 ///\r
2102 UINT8 SkipCount;\r
2103} EFI_HII_AIBT_SKIP1_BLOCK;\r
2104\r
2105///\r
2106/// Skips animation IDs.\r
2107///\r
2108typedef struct _EFI_HII_AIBT_SKIP2_BLOCK {\r
2109 ///\r
2110 /// The unsigned 16-bit value to add to AnimationIdCurrent.\r
2111 ///\r
2112 UINT16 SkipCount;\r
2113} EFI_HII_AIBT_SKIP2_BLOCK;\r
2114\r
959ccb23 2115#pragma pack()\r
2116\r
2117\r
2118\r
8b13229b 2119///\r
2120/// References to string tokens must use this macro to enable scanning for\r
2121/// token usages.\r
2122///\r
2123///\r
2124/// STRING_TOKEN is not defined in UEFI specification. But it is placed \r
2125/// here for the easy access by C files and VFR source files.\r
2126///\r
e52c5a9f 2127#define STRING_TOKEN(t) t\r
2128\r
959ccb23 2129#endif\r