]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/FormBrowser.h
automagically convert ELF to PE/COFF (i386 only)
[mirror_edk2.git] / MdePkg / Include / Protocol / FormBrowser.h
CommitLineData
878ddf1f 1/** @file\r
2 The EFI_FORM_BROWSER_PROTOCOL is the interface to the EFI \r
3 Configuration Driver. This will allow the caller to direct the \r
4 configuration driver to use either the HII database or use the passed \r
5 in packet of data. This will also allow the caller to post messages \r
6 into the configuration drivers internal mailbox.\r
7\r
8 Copyright (c) 2006, Intel Corporation \r
9 All rights reserved. This program and the accompanying materials \r
10 are licensed and made available under the terms and conditions of the BSD License \r
11 which accompanies this distribution. The full text of the license may be found at \r
12 http://opensource.org/licenses/bsd-license.php \r
13\r
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
16\r
17 Module Name: FormBrowser.h\r
18\r
19 @par Revision Reference:\r
20 This protocol is defined in HII spec 0.92.\r
21\r
22**/\r
23\r
24#ifndef __FORM_BROWSER_H__\r
25#define __FORM_BROWSER_H__\r
26\r
27\r
28#define EFI_FORM_BROWSER_PROTOCOL_GUID \\r
29 { \\r
30 0xe5a1333e, 0xe1b4, 0x4d55, {0xce, 0xeb, 0x35, 0xc3, 0xef, 0x13, 0x34, 0x43 } \\r
31 }\r
32\r
33typedef struct _EFI_FORM_BROWSER_PROTOCOL EFI_FORM_BROWSER_PROTOCOL;\r
34\r
35typedef struct {\r
36 UINT32 Length;\r
37 UINT16 Type;\r
38 UINT8 Data[1];\r
39} EFI_HII_PACKET;\r
40\r
41typedef struct {\r
42 EFI_HII_IFR_PACK *IfrData;\r
43 EFI_HII_STRING_PACK *StringData;\r
44} EFI_IFR_PACKET;\r
45\r
46typedef struct {\r
47 UINTN LeftColumn;\r
48 UINTN RightColumn;\r
49 UINTN TopRow;\r
50 UINTN BottomRow;\r
51} EFI_SCREEN_DESCRIPTOR;\r
52\r
53/**\r
54 Provides direction to the configuration driver whether to use the HII \r
55 database or a passed-in set of data. This function also establishes a \r
511710d6 56 pointer to the calling driver's callback interface. \r
878ddf1f 57\r
0647c9ad
LG
58 @param This A pointer to the EFI_FORM_BROWSER_PROTOCOL instance.\r
59 @param UseDatabase Determines whether the HII database is to be\r
60 used to gather information. If the value is FALSE, the configuration\r
61 driver will get the information provided in the passed-in Packet parameters.\r
62 @param Handle A pointer to an array of HII handles to display. This value\r
63 should correspond to the value of the HII form package that is required to\r
64 be displayed.\r
65 @param HandleCount The number of handles in the array specified by Handle.\r
66 @param Packet A pointer to a set of data containing pointers to IFR\r
67 and/or string data.\r
511710d6 68 @param CallbackHandle The handle to the driver's callback interface.\r
0647c9ad
LG
69 This parameter is used only when the UseDatabase parameter is FALSE\r
70 and an application wants to register a callback with the browser\r
71 @param NvMapOverride This buffer is used only when there is no NV variable\r
72 to define the current settings and the caller needs to provide to the browser\r
73 the current settings for the "fake" NV variable.\r
74 @param ScreenDimensions Allows the browser to be called so that it occupies\r
75 a portion of the physical screen instead of dynamically determining the\r
76 screen dimensions.\r
77 @param ResetRequired This BOOLEAN value will tell the caller if a reset\r
78 is required based on the data that might have been changed. The ResetRequired\r
79 parameter is primarily applicable for configuration applications, and is an\r
80 optional parameter.\r
81\r
82 @retval EFI_SUCCESS The function completed successfully\r
83 @retval EFI_NOT_FOUND The variable was not found.\r
84 @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.\r
85 DataSize has been updated with the size needed to complete the request.\r
878ddf1f 86 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
0647c9ad 87 @retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.\r
878ddf1f 88\r
89**/\r
90typedef\r
91EFI_STATUS\r
92(EFIAPI *EFI_SEND_FORM) (\r
93 IN EFI_FORM_BROWSER_PROTOCOL *This,\r
94 IN BOOLEAN UseDatabase,\r
95 IN EFI_HII_HANDLE *Handle,\r
96 IN UINTN HandleCount,\r
97 IN EFI_IFR_PACKET *Packet, OPTIONAL\r
98 IN EFI_HANDLE CallbackHandle, OPTIONAL\r
99 IN UINT8 *NvMapOverride, OPTIONAL\r
100 IN EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL\r
101 OUT BOOLEAN *ResetRequired OPTIONAL\r
102 );\r
103\r
104/**\r
105 Routine used to abstract a generic dialog interface and return the selected \r
106 key or string.\r
107\r
0647c9ad
LG
108 @param NumberOfLines The number of lines for the dialog box.\r
109 @param HotKey Defines whether a single character is parsed (TRUE)\r
110 and returned in KeyValue or if a string is returned in StringBuffer.\r
111 @param MaximumStringSize The maximum size in bytes of a typed-in string.\r
112 Because each character is a CHAR16, the minimum string returned is two bytes.\r
113 @param StringBuffer The passed-in pointer to the buffer that will hold\r
114 the typed in string if HotKey is FALSE.\r
115 @param KeyValue The EFI_INPUT_KEY value returned if HotKey is TRUE.\r
116 @param String The pointer to the first string in the list of strings\r
117 that comprise the dialog box.\r
118 @param ... A series of NumberOfLines text strings that will be used\r
119 to construct the dialog box.\r
120\r
121 @retval EFI_SUCCESS The dialog was displayed and user interaction was received.\r
122 @retval EFI_DEVICE_ERROR The user typed in an ESC character to exit the routine.\r
878ddf1f 123 @retval EFI_INVALID_PARAMETER One of the parameters was invalid\r
124\r
125**/\r
126typedef\r
127EFI_STATUS\r
128(EFIAPI *EFI_CREATE_POP_UP) (\r
129 IN UINTN NumberOfLines,\r
130 IN BOOLEAN HotKey,\r
131 IN UINTN MaximumStringSize,\r
132 OUT CHAR16 *StringBuffer,\r
133 OUT EFI_INPUT_KEY *KeyValue,\r
134 IN CHAR16 *String,\r
135 ...\r
136 );\r
137\r
138/**\r
139 @par Protocol Description:\r
140 The EFI_FORM_BROWSER_PROTOCOL is the interface to call for drivers to \r
141 leverage the EFI configuration driver interface. \r
142\r
143 @param SendForm\r
144 Provides direction to the configuration driver whether to use the HII \r
145 database or to use a passed-in set of data. This functions also establishes \r
511710d6 146 a pointer to the calling driver's callback interface. \r
878ddf1f 147\r
148 @param CreatePopUp\r
149 Routine used to abstract a generic dialog interface and return the \r
150 selected key or string.\r
151\r
152**/\r
153struct _EFI_FORM_BROWSER_PROTOCOL {\r
154 EFI_SEND_FORM SendForm;\r
155 EFI_CREATE_POP_UP CreatePopUp;\r
156};\r
157\r
158extern EFI_GUID gEfiFormBrowserProtocolGuid;\r
159\r
160#endif\r