]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/HiiPopup: Add HII Popup Protocol definitions
authorDandan Bi <dandan.bi@intel.com>
Fri, 7 Jul 2017 05:54:51 +0000 (13:54 +0800)
committerEric Dong <eric.dong@intel.com>
Wed, 23 Aug 2017 02:37:14 +0000 (10:37 +0800)
Add definitions for HII Popup Protocol according to UEFI2.7.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/Protocol/HiiPopup.h [new file with mode: 0644]
MdePkg/MdePkg.dec

diff --git a/MdePkg/Include/Protocol/HiiPopup.h b/MdePkg/Include/Protocol/HiiPopup.h
new file mode 100644 (file)
index 0000000..f7d4863
--- /dev/null
@@ -0,0 +1,81 @@
+/** @file\r
+  This protocol provides services to display a popup window.\r
+  The protocol is typically produced by the forms browser and consumed by a driver callback handler.\r
+\r
+  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __HII_POPUP_H__\r
+#define __HII_POPUP_H__\r
+\r
+#define EFI_HII_POPUP_PROTOCOL_GUID \\r
+  {0x4311edc0, 0x6054, 0x46d4, {0x9e, 0x40, 0x89, 0x3e, 0xa9, 0x52, 0xfc, 0xcc}}\r
+\r
+#define EFI_HII_POPUP_PROTOCOL_REVISION 1\r
+\r
+typedef struct _EFI_HII_POPUP_PROTOCOL EFI_HII_POPUP_PROTOCOL;\r
+\r
+typedef enum {\r
+  EfiHiiPopupStyleInfo,\r
+  EfiHiiPopupStyleWarning,\r
+  EfiHiiPopupStyleError\r
+} EFI_HII_POPUP_STYLE;\r
+\r
+typedef enum {\r
+  EfiHiiPopupTypeOk,\r
+  EfiHiiPopupTypeOkCancel,\r
+  EfiHiiPopupTypeYesNo,\r
+  EfiHiiPopupTypeYesNoCancel\r
+} EFI_HII_POPUP_TYPE;\r
+\r
+typedef enum {\r
+  EfiHiiPopupSelectionOk,\r
+  EfiHiiPopupSelectionCancel,\r
+  EfiHiiPopupSelectionYes,\r
+  EfiHiiPopupSelectionNo\r
+} EFI_HII_POPUP_SELECTION;\r
+\r
+/**\r
+  Displays a popup window.\r
+\r
+  @param  This           A pointer to the EFI_HII_POPUP_PROTOCOL instance.\r
+  @param  PopupStyle     Popup style to use.\r
+  @param  PopupType      Type of the popup to display.\r
+  @param  HiiHandle      HII handle of the string pack containing Message\r
+  @param  Message        A message to display in the popup box.\r
+  @param  UserSelection  User selection.\r
+\r
+  @retval EFI_SUCCESS            The popup box was successfully displayed.\r
+  @retval EFI_INVALID_PARAMETER  HiiHandle and Message do not define a valid HII string.\r
+  @retval EFI_INVALID_PARAMETER  PopupType is not one of the values defined by this specification.\r
+  @retval EFI_OUT_OF_RESOURCES   There are not enough resources available to display the popup box.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI * EFI_HII_CREATE_POPUP) (\r
+  IN  EFI_HII_POPUP_PROTOCOL  *This,\r
+  IN  EFI_HII_POPUP_STYLE     PopupStyle,\r
+  IN  EFI_HII_POPUP_TYPE      PopupType,\r
+  IN  EFI_HII_HANDLE          HiiHandle,\r
+  IN  EFI_STRING_ID           Message,\r
+  OUT EFI_HII_POPUP_SELECTION *UserSelection OPTIONAL\r
+);\r
+\r
+typedef struct _EFI_HII_POPUP_PROTOCOL {\r
+  UINT64                Revision;\r
+  EFI_HII_CREATE_POPUP  CreatePopup;\r
+} EFI_HII_POPUP_PROTOCOL;\r
+\r
+extern EFI_GUID gEfiHiiPopupProtocolGuid;\r
+\r
+#endif\r
+\r
index f54b056563b4489324d39f287ed088f665ee6ba1..425004f9d80b09813828f185737cbd1e7672dafc 100644 (file)
   ## Include/Protocol/PartitionInfo.h\r
   gEfiPartitionInfoProtocolGuid             = { 0x8cf2f62c, 0xbc9b, 0x4821, { 0x80, 0x8d, 0xec, 0x9e, 0xc4, 0x21, 0xa1, 0xa0 }}\r
 \r
+  ## Include/Protocol/HiiPopup.h\r
+  gEfiHiiPopupProtocolGuid                  = { 0x4311edc0, 0x6054, 0x46d4, { 0x9e, 0x40, 0x89, 0x3e, 0xa9, 0x52, 0xfc, 0xcc }}\r
+\r
   #\r
   # Protocols defined in Shell2.0\r
   #\r