public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Dandan Bi <dandan.bi@intel.com>
To: edk2-devel@lists.01.org
Cc: Eric Dong <eric.dong@intel.com>, Liming Gao <liming.gao@intel.com>
Subject: [PATCH V5] MdePkg/HiiPopup: Add HII Popup Protocol definitions
Date: Tue, 22 Aug 2017 20:17:23 +0800	[thread overview]
Message-ID: <1503404245-298320-2-git-send-email-dandan.bi@intel.com> (raw)
In-Reply-To: <1503404245-298320-1-git-send-email-dandan.bi@intel.com>

V5:
Move the protocol GUID to the part fot UEFI2.7 protocol in dec.

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>
---
 MdePkg/Include/Protocol/HiiPopup.h | 81 ++++++++++++++++++++++++++++++++++++++
 MdePkg/MdePkg.dec                  |  3 ++
 2 files changed, 84 insertions(+)
 create mode 100644 MdePkg/Include/Protocol/HiiPopup.h

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



  reply	other threads:[~2017-08-22 12:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 12:17 [PATCH V5 0/3] Add HII Popup Protocol Dandan Bi
2017-08-22 12:17 ` Dandan Bi [this message]
2017-08-22 12:17 ` [PATCH V5 2/3] MdeModulePkg/DisplayEngine: Add implementation of HiiPopup protocol Dandan Bi
2017-08-22 12:17 ` [PATCH V5 3/3] MdeModulePkg/DriverSample: Add sample case for popup protocol Dandan Bi
2017-08-22 12:24 ` [PATCH V5 0/3] Add HII Popup Protocol Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1503404245-298320-2-git-send-email-dandan.bi@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox