]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.h
ShellPkg/Debug1CommandsLib: Fix bugs in func DisplaySysEventLogData
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / EditMenuBar.h
CommitLineData
2442e62a 1/** @file\r
2 Declares menubar interface functions.\r
3\r
5563281f 4 Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>\r
56ba3746 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
2442e62a 6\r
7**/\r
8\r
9#ifndef _LIB_MENU_BAR_H_\r
10#define _LIB_MENU_BAR_H_\r
11\r
5a2beb74 12#define SCAN_CONTROL_E 5\r
13#define SCAN_CONTROL_F 6\r
14#define SCAN_CONTROL_G 7\r
15#define SCAN_CONTROL_K 11\r
16#define SCAN_CONTROL_O 15\r
17#define SCAN_CONTROL_Q 17\r
18#define SCAN_CONTROL_R 18\r
19#define SCAN_CONTROL_S 19\r
20#define SCAN_CONTROL_T 20\r
21#define SCAN_CONTROL_U 21\r
22#define SCAN_CONTROL_W 23\r
23#define SCAN_CONTROL_Z 26\r
24\r
25\r
2442e62a 26typedef\r
27EFI_STATUS\r
2b578de0 28(*MENU_ITEM_FUNCTION) (\r
2442e62a 29 VOID\r
30 );\r
31\r
32typedef struct _EDITOR_MENU_ITEM {\r
33 EFI_STRING_ID NameToken;\r
34 CHAR16 FunctionKeyToken;\r
35 MENU_ITEM_FUNCTION Function;\r
36} EDITOR_MENU_ITEM;\r
37\r
38/**\r
39 Initializa the menu bar with the specified items.\r
40\r
41 @param[in] Items The items to display and their functions.\r
42\r
43 @retval EFI_SUCCESS The initialization was correct.\r
44 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r
45**/\r
46EFI_STATUS\r
2442e62a 47MenuBarInit (\r
48 IN CONST EDITOR_MENU_ITEM *Items\r
49 );\r
50\r
5a2beb74 51/**\r
52 Initialize the control hot-key with the specified items.\r
53\r
54 @param[in] Items The hot-key functions.\r
55\r
56 @retval EFI_SUCCESS The initialization was correct.\r
57**/\r
58EFI_STATUS\r
5a2beb74 59ControlHotKeyInit (\r
60 IN MENU_ITEM_FUNCTION *Items\r
61 );\r
62\r
2442e62a 63/**\r
64 Cleanup function for a menu bar. frees all allocated memory.\r
65**/\r
66VOID\r
2442e62a 67MenuBarCleanup (\r
68 VOID\r
69 );\r
70\r
71/**\r
72 Refresh function for the menu bar.\r
73\r
74 @param[in] LastRow The last printable row.\r
75 @param[in] LastCol The last printable column.\r
76\r
77 @retval EFI_SUCCESS The refresh was successful.\r
78**/\r
79EFI_STATUS\r
2442e62a 80MenuBarRefresh (\r
81 IN CONST UINTN LastRow,\r
82 IN CONST UINTN LastCol\r
83 );\r
84\r
85/**\r
86 Function to dispatch the correct function based on a function key (F1...)\r
87\r
88 @param[in] Key The pressed key.\r
89\r
ba0014b9 90 @retval EFI_NOT_FOUND The key was not a valid function key\r
2442e62a 91 (an error was sent to the status bar).\r
92 @return The return value from the called dispatch function.\r
93**/\r
94EFI_STATUS\r
2442e62a 95MenuBarDispatchFunctionKey (\r
96 IN CONST EFI_INPUT_KEY *Key\r
97 );\r
98\r
5a2beb74 99/**\r
100 Function to dispatch the correct function based on a control-based key (ctrl+o...)\r
101\r
5563281f 102 @param[in] KeyData The pressed key.\r
5a2beb74 103\r
ba0014b9 104 @retval EFI_NOT_FOUND The key was not a valid control-based key\r
5a2beb74 105 (an error was sent to the status bar).\r
106 @return EFI_SUCCESS.\r
107**/\r
108EFI_STATUS\r
5a2beb74 109MenuBarDispatchControlHotKey (\r
5563281f 110 IN CONST EFI_KEY_DATA *KeyData\r
5a2beb74 111 );\r
112\r
2442e62a 113#endif\r