]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/HiiPopup.h
f7cb69aeaf224e51f5043a229f0207e91f4584a2
[mirror_edk2.git] / MdePkg / Include / Protocol / HiiPopup.h
1 /** @file
2 This protocol provides services to display a popup window.
3 The protocol is typically produced by the forms browser and consumed by a driver callback handler.
4
5 Copyright (c) 2017-2018, 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 @par Revision Reference:
15 This Protocol was introduced in UEFI Specification 2.7.
16
17 **/
18
19 #ifndef __HII_POPUP_H__
20 #define __HII_POPUP_H__
21
22 #define EFI_HII_POPUP_PROTOCOL_GUID \
23 {0x4311edc0, 0x6054, 0x46d4, {0x9e, 0x40, 0x89, 0x3e, 0xa9, 0x52, 0xfc, 0xcc}}
24
25 #define EFI_HII_POPUP_PROTOCOL_REVISION 1
26
27 typedef struct _EFI_HII_POPUP_PROTOCOL EFI_HII_POPUP_PROTOCOL;
28
29 typedef enum {
30 EfiHiiPopupStyleInfo,
31 EfiHiiPopupStyleWarning,
32 EfiHiiPopupStyleError
33 } EFI_HII_POPUP_STYLE;
34
35 typedef enum {
36 EfiHiiPopupTypeOk,
37 EfiHiiPopupTypeOkCancel,
38 EfiHiiPopupTypeYesNo,
39 EfiHiiPopupTypeYesNoCancel
40 } EFI_HII_POPUP_TYPE;
41
42 typedef enum {
43 EfiHiiPopupSelectionOk,
44 EfiHiiPopupSelectionCancel,
45 EfiHiiPopupSelectionYes,
46 EfiHiiPopupSelectionNo
47 } EFI_HII_POPUP_SELECTION;
48
49 /**
50 Displays a popup window.
51
52 @param This A pointer to the EFI_HII_POPUP_PROTOCOL instance.
53 @param PopupStyle Popup style to use.
54 @param PopupType Type of the popup to display.
55 @param HiiHandle HII handle of the string pack containing Message
56 @param Message A message to display in the popup box.
57 @param UserSelection User selection.
58
59 @retval EFI_SUCCESS The popup box was successfully displayed.
60 @retval EFI_INVALID_PARAMETER HiiHandle and Message do not define a valid HII string.
61 @retval EFI_INVALID_PARAMETER PopupType is not one of the values defined by this specification.
62 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to display the popup box.
63
64 **/
65 typedef
66 EFI_STATUS
67 (EFIAPI * EFI_HII_CREATE_POPUP) (
68 IN EFI_HII_POPUP_PROTOCOL *This,
69 IN EFI_HII_POPUP_STYLE PopupStyle,
70 IN EFI_HII_POPUP_TYPE PopupType,
71 IN EFI_HII_HANDLE HiiHandle,
72 IN EFI_STRING_ID Message,
73 OUT EFI_HII_POPUP_SELECTION *UserSelection OPTIONAL
74 );
75
76 typedef struct _EFI_HII_POPUP_PROTOCOL {
77 UINT64 Revision;
78 EFI_HII_CREATE_POPUP CreatePopup;
79 } EFI_HII_POPUP_PROTOCOL;
80
81 extern EFI_GUID gEfiHiiPopupProtocolGuid;
82
83 #endif
84