]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.h
ShellPkg: Parse new SMBIOS 3.0 fields.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / EditMenuBar.h
CommitLineData
2442e62a 1/** @file\r
2 Declares menubar interface functions.\r
3\r
4 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>\r
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _LIB_MENU_BAR_H_\r
16#define _LIB_MENU_BAR_H_\r
17\r
5a2beb74 18#define SCAN_CONTROL_E 5\r
19#define SCAN_CONTROL_F 6\r
20#define SCAN_CONTROL_G 7\r
21#define SCAN_CONTROL_K 11\r
22#define SCAN_CONTROL_O 15\r
23#define SCAN_CONTROL_Q 17\r
24#define SCAN_CONTROL_R 18\r
25#define SCAN_CONTROL_S 19\r
26#define SCAN_CONTROL_T 20\r
27#define SCAN_CONTROL_U 21\r
28#define SCAN_CONTROL_W 23\r
29#define SCAN_CONTROL_Z 26\r
30\r
31\r
2442e62a 32typedef\r
33EFI_STATUS\r
2b578de0 34(*MENU_ITEM_FUNCTION) (\r
2442e62a 35 VOID\r
36 );\r
37\r
38typedef struct _EDITOR_MENU_ITEM {\r
39 EFI_STRING_ID NameToken;\r
40 CHAR16 FunctionKeyToken;\r
41 MENU_ITEM_FUNCTION Function;\r
42} EDITOR_MENU_ITEM;\r
43\r
44/**\r
45 Initializa the menu bar with the specified items.\r
46\r
47 @param[in] Items The items to display and their functions.\r
48\r
49 @retval EFI_SUCCESS The initialization was correct.\r
50 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r
51**/\r
52EFI_STATUS\r
53EFIAPI\r
54MenuBarInit (\r
55 IN CONST EDITOR_MENU_ITEM *Items\r
56 );\r
57\r
5a2beb74 58/**\r
59 Initialize the control hot-key with the specified items.\r
60\r
61 @param[in] Items The hot-key functions.\r
62\r
63 @retval EFI_SUCCESS The initialization was correct.\r
64**/\r
65EFI_STATUS\r
66EFIAPI\r
67ControlHotKeyInit (\r
68 IN MENU_ITEM_FUNCTION *Items\r
69 );\r
70\r
2442e62a 71/**\r
72 Cleanup function for a menu bar. frees all allocated memory.\r
73**/\r
74VOID\r
75EFIAPI\r
76MenuBarCleanup (\r
77 VOID\r
78 );\r
79\r
80/**\r
81 Refresh function for the menu bar.\r
82\r
83 @param[in] LastRow The last printable row.\r
84 @param[in] LastCol The last printable column.\r
85\r
86 @retval EFI_SUCCESS The refresh was successful.\r
87**/\r
88EFI_STATUS\r
89EFIAPI\r
90MenuBarRefresh (\r
91 IN CONST UINTN LastRow,\r
92 IN CONST UINTN LastCol\r
93 );\r
94\r
95/**\r
96 Function to dispatch the correct function based on a function key (F1...)\r
97\r
98 @param[in] Key The pressed key.\r
99\r
100 @retval EFI_NOT_FOUND The key was not a valid function key \r
101 (an error was sent to the status bar).\r
102 @return The return value from the called dispatch function.\r
103**/\r
104EFI_STATUS\r
105EFIAPI\r
106MenuBarDispatchFunctionKey (\r
107 IN CONST EFI_INPUT_KEY *Key\r
108 );\r
109\r
5a2beb74 110/**\r
111 Function to dispatch the correct function based on a control-based key (ctrl+o...)\r
112\r
113 @param[in] Key The pressed key.\r
114\r
115 @retval EFI_NOT_FOUND The key was not a valid control-based key \r
116 (an error was sent to the status bar).\r
117 @return EFI_SUCCESS.\r
118**/\r
119EFI_STATUS\r
120EFIAPI\r
121MenuBarDispatchControlHotKey (\r
122 IN CONST EFI_INPUT_KEY *Key\r
123 );\r
124\r
2442e62a 125#endif\r