]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[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
2442e62a 25typedef\r
26EFI_STATUS\r
2b578de0 27(*MENU_ITEM_FUNCTION) (\r
2442e62a 28 VOID\r
29 );\r
30\r
31typedef struct _EDITOR_MENU_ITEM {\r
47d20b54
MK
32 EFI_STRING_ID NameToken;\r
33 CHAR16 FunctionKeyToken;\r
34 MENU_ITEM_FUNCTION Function;\r
2442e62a 35} EDITOR_MENU_ITEM;\r
36\r
37/**\r
38 Initializa the menu bar with the specified items.\r
39\r
40 @param[in] Items The items to display and their functions.\r
41\r
42 @retval EFI_SUCCESS The initialization was correct.\r
43 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r
44**/\r
45EFI_STATUS\r
2442e62a 46MenuBarInit (\r
47 IN CONST EDITOR_MENU_ITEM *Items\r
48 );\r
49\r
5a2beb74 50/**\r
51 Initialize the control hot-key with the specified items.\r
52\r
53 @param[in] Items The hot-key functions.\r
54\r
55 @retval EFI_SUCCESS The initialization was correct.\r
56**/\r
57EFI_STATUS\r
5a2beb74 58ControlHotKeyInit (\r
59 IN MENU_ITEM_FUNCTION *Items\r
60 );\r
61\r
2442e62a 62/**\r
63 Cleanup function for a menu bar. frees all allocated memory.\r
64**/\r
65VOID\r
2442e62a 66MenuBarCleanup (\r
67 VOID\r
68 );\r
69\r
70/**\r
71 Refresh function for the menu bar.\r
72\r
73 @param[in] LastRow The last printable row.\r
74 @param[in] LastCol The last printable column.\r
75\r
76 @retval EFI_SUCCESS The refresh was successful.\r
77**/\r
78EFI_STATUS\r
2442e62a 79MenuBarRefresh (\r
47d20b54
MK
80 IN CONST UINTN LastRow,\r
81 IN CONST UINTN LastCol\r
2442e62a 82 );\r
83\r
84/**\r
85 Function to dispatch the correct function based on a function key (F1...)\r
86\r
87 @param[in] Key The pressed key.\r
88\r
ba0014b9 89 @retval EFI_NOT_FOUND The key was not a valid function key\r
2442e62a 90 (an error was sent to the status bar).\r
91 @return The return value from the called dispatch function.\r
92**/\r
93EFI_STATUS\r
2442e62a 94MenuBarDispatchFunctionKey (\r
47d20b54 95 IN CONST EFI_INPUT_KEY *Key\r
2442e62a 96 );\r
97\r
5a2beb74 98/**\r
99 Function to dispatch the correct function based on a control-based key (ctrl+o...)\r
100\r
5563281f 101 @param[in] KeyData The pressed key.\r
5a2beb74 102\r
ba0014b9 103 @retval EFI_NOT_FOUND The key was not a valid control-based key\r
5a2beb74 104 (an error was sent to the status bar).\r
105 @return EFI_SUCCESS.\r
106**/\r
107EFI_STATUS\r
5a2beb74 108MenuBarDispatchControlHotKey (\r
47d20b54 109 IN CONST EFI_KEY_DATA *KeyData\r
5a2beb74 110 );\r
111\r
2442e62a 112#endif\r