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