]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.h
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Efi / Protocol / FormBrowser2 / FormBrowser2.h
CommitLineData
2c40a813 1/*++\r
2\r
3Copyright (c) 2007, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13\r
14 FormBrowser2.h\r
15\r
16Abstract:\r
17\r
18 The EFI_FORM_BROWSER2_PROTOCOL is the interface to the UEFI configuration driver.\r
19\r
20--*/\r
21\r
22#ifndef _FORM_BROWSER2_H_\r
23#define _FORM_BROWSER2_H_\r
24\r
25#include "EfiHii.h"\r
26\r
27#define EFI_FORM_BROWSER2_PROTOCOL_GUID \\r
28 { \\r
29 0xb9d4c360, 0xbcfb, 0x4f9b, 0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 \\r
30 }\r
31\r
32//\r
33// Forward reference for pure ANSI compatability\r
34//\r
35EFI_FORWARD_DECLARATION (EFI_FORM_BROWSER2_PROTOCOL);\r
36\r
37typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL;\r
38\r
39typedef struct {\r
40 UINTN LeftColumn;\r
41 UINTN RightColumn;\r
42 UINTN TopRow;\r
43 UINTN BottomRow;\r
44} EFI_SCREEN_DESCRIPTOR;\r
45\r
46typedef UINTN EFI_BROWSER_ACTION_REQUEST;\r
47\r
48#define EFI_BROWSER_ACTION_REQUEST_NONE 0\r
49#define EFI_BROWSER_ACTION_REQUEST_RESET 1\r
50#define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2\r
51#define EFI_BROWSER_ACTION_REQUEST_EXIT 3\r
52\r
53//\r
54// The following types are currently defined:\r
55//\r
56typedef\r
57EFI_STATUS\r
58(EFIAPI *EFI_SEND_FORM2) (\r
59 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,\r
60 IN EFI_HII_HANDLE *Handles,\r
61 IN UINTN HandleCount,\r
62 IN EFI_GUID *FormSetGuid, OPTIONAL\r
63 IN UINT16 FormId, OPTIONAL\r
64 IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL\r
65 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL\r
66 )\r
67/*++\r
68\r
69Routine Description:\r
70 This is the routine which an external caller uses to direct the browser\r
71 where to obtain it's information.\r
72\r
73Arguments:\r
74 This - A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.\r
75 Handles - A pointer to an array of HII handles to display.\r
76 HandleCount - The number of handles in the array specified by Handle.\r
77 FormSetGuid - This field points to the EFI_GUID which must match the Guid field in the EFI_IFR_FORM_SET op-code for the specified\r
78 forms-based package. If FormSetGuid is NULL, then this function will display the first found forms package.\r
79 FormId - This field specifies which EFI_IFR_FORM to render as the first displayable page.\r
80 If this field has a value of 0x0000, then the forms browser will render the specified forms in their encoded order.\r
81 ScreenDimenions - This allows the browser to be called so that it occupies a portion of the physical screen instead of\r
82 dynamically determining the screen dimensions.\r
83 ActionRequest - Points to the action recommended by the form.\r
84\r
85Returns:\r
86 EFI_SUCCESS - The function completed successfully.\r
87 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.\r
88 EFI_NOT_FOUND - No valid forms could be found to display.\r
89\r
90--*/\r
91;\r
92\r
93typedef\r
94EFI_STATUS\r
95(EFIAPI *EFI_BROWSER_CALLBACK2) (\r
96 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,\r
97 IN OUT UINTN *ResultsDataSize,\r
98 IN OUT EFI_STRING ResultsData,\r
99 IN BOOLEAN RetrieveData,\r
100 IN CONST EFI_GUID *VariableGuid, OPTIONAL\r
101 IN CONST CHAR16 *VariableName OPTIONAL\r
102 )\r
103/*++\r
104\r
105Routine Description:\r
106 This function is called by a callback handler to retrieve uncommitted state\r
107 data from the browser.\r
108\r
109Arguments:\r
110 This - A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.\r
111 ResultsDataSize - A pointer to the size of the buffer associated with ResultsData.\r
112 On input, the size in bytes of ResultsData. \r
113 On output, the size of data returned in ResultsData.\r
114 ResultsData - A string returned from an IFR browser or equivalent.\r
115 The results string will have no routing information in them.\r
116 RetrieveData - A BOOLEAN field which allows an agent to retrieve (if RetrieveData = TRUE)\r
117 data from the uncommitted browser state information or set\r
118 (if RetrieveData = FALSE) data in the uncommitted browser state information.\r
119 VariableGuid - An optional field to indicate the target variable GUID name to use.\r
120 VariableName - An optional field to indicate the target human-readable variable name.\r
121\r
122Returns:\r
123 EFI_SUCCESS - The results have been distributed or are awaiting distribution.\r
124 EFI_BUFFER_TOO_SMALL - The ResultsDataSize specified was too small to contain the results data.\r
125\r
126--*/\r
127;\r
128\r
129typedef struct _EFI_FORM_BROWSER2_PROTOCOL {\r
130 EFI_SEND_FORM2 SendForm;\r
131 EFI_BROWSER_CALLBACK2 BrowserCallback;\r
132} EFI_FORM_BROWSER2_PROTOCOL;\r
133\r
134extern EFI_GUID gEfiFormBrowser2ProtocolGuid;\r
135\r
136#endif\r