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