1 /** @file 2 Extension Form Browser Protocol provides the services that can be used to 3 register the different hot keys for the standard Browser actions described in UEFI specification. 4 5 Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 8 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 __FORM_BROWSER_EXTENSION2_H__ 17 #define __FORM_BROWSER_EXTENSION2_H__ 18 19 #include <Protocol/FormBrowserEx.h> 20 21 #define EDKII_FORM_BROWSER_EXTENSION2_PROTOCOL_GUID \ 22 { 0xa770c357, 0xb693, 0x4e6d, { 0xa6, 0xcf, 0xd2, 0x1c, 0x72, 0x8e, 0x55, 0xb }} 23 24 typedef struct _EDKII_FORM_BROWSER_EXTENSION2_PROTOCOL EDKII_FORM_BROWSER_EXTENSION2_PROTOCOL; 25 26 #define BROWSER_EXTENSION2_VERSION_1 0x10000 27 #define BROWSER_EXTENSION2_VERSION_1_1 0x10001 28 29 /** 30 Check whether the browser data has been modified. 31 32 @retval TRUE Browser data is modified. 33 @retval FALSE No browser data is modified. 34 35 **/ 36 typedef 37 BOOLEAN 38 (EFIAPI *IS_BROWSER_DATA_MODIFIED) ( 39 VOID 40 ); 41 42 /** 43 Execute the action requested by the Action parameter. 44 45 @param[in] Action Execute the request action. 46 @param[in] DefaultId The default Id info when need to load default value. 47 48 @retval EFI_SUCCESS Execute the request action succss. 49 50 **/ 51 typedef 52 EFI_STATUS 53 (EFIAPI *EXECUTE_ACTION) ( 54 IN UINT32 Action, 55 IN UINT16 DefaultId 56 ); 57 58 /** 59 Check whether required reset when exit the browser 60 61 @retval TRUE Browser required to reset after exit. 62 @retval FALSE Browser not need to reset after exit. 63 64 **/ 65 typedef 66 BOOLEAN 67 (EFIAPI *IS_RESET_REQUIRED) ( 68 VOID 69 ); 70 71 #define FORM_ENTRY_INFO_SIGNATURE SIGNATURE_32 ('f', 'e', 'i', 's') 72 73 typedef struct { 74 UINTN Signature; 75 LIST_ENTRY Link; 76 77 EFI_HII_HANDLE HiiHandle; 78 EFI_GUID FormSetGuid; 79 EFI_FORM_ID FormId; 80 EFI_QUESTION_ID QuestionId; 81 } FORM_ENTRY_INFO; 82 83 #define FORM_ENTRY_INFO_FROM_LINK(a) CR (a, FORM_ENTRY_INFO, Link, FORM_ENTRY_INFO_SIGNATURE) 84 85 #define FORM_QUESTION_ATTRIBUTE_OVERRIDE_SIGNATURE SIGNATURE_32 ('f', 'q', 'o', 's') 86 87 typedef struct { 88 UINTN Signature; 89 LIST_ENTRY Link; 90 91 EFI_QUESTION_ID QuestionId; // Find the question 92 EFI_FORM_ID FormId; // Find the form 93 EFI_GUID FormSetGuid; // Find the formset. 94 EFI_HII_HANDLE HiiHandle; // Find the HII handle 95 UINT32 Attribute; // Hide or grayout ... 96 } QUESTION_ATTRIBUTE_OVERRIDE; 97 98 #define FORM_QUESTION_ATTRIBUTE_OVERRIDE_FROM_LINK(a) CR (a, QUESTION_ATTRIBUTE_OVERRIDE, Link, FORM_QUESTION_ATTRIBUTE_OVERRIDE_SIGNATURE) 99 100 struct _EDKII_FORM_BROWSER_EXTENSION2_PROTOCOL { 101 /// 102 /// Version for protocol future extension. 103 /// 104 UINT32 Version; 105 SET_SCOPE SetScope; 106 REGISTER_HOT_KEY RegisterHotKey; 107 REGISTER_EXIT_HANDLER RegiserExitHandler; 108 IS_BROWSER_DATA_MODIFIED IsBrowserDataModified; 109 EXECUTE_ACTION ExecuteAction; 110 /// 111 /// A list of type FORMID_INFO is Browser View Form History List. 112 /// 113 LIST_ENTRY FormViewHistoryHead; 114 /// 115 /// A list of type QUESTION_ATTRIBUTE_OVERRIDE. 116 /// 117 LIST_ENTRY OverrideQestListHead; 118 119 IS_RESET_REQUIRED IsResetRequired; 120 }; 121 122 extern EFI_GUID gEdkiiFormBrowserEx2ProtocolGuid; 123 124 #endif 125 126