2 Declares menubar interface functions.
4 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _LIB_MENU_BAR_H_
16 #define _LIB_MENU_BAR_H_
18 #define SCAN_CONTROL_E 5
19 #define SCAN_CONTROL_F 6
20 #define SCAN_CONTROL_G 7
21 #define SCAN_CONTROL_K 11
22 #define SCAN_CONTROL_O 15
23 #define SCAN_CONTROL_Q 17
24 #define SCAN_CONTROL_R 18
25 #define SCAN_CONTROL_S 19
26 #define SCAN_CONTROL_T 20
27 #define SCAN_CONTROL_U 21
28 #define SCAN_CONTROL_W 23
29 #define SCAN_CONTROL_Z 26
34 (*MENU_ITEM_FUNCTION
) (
38 typedef struct _EDITOR_MENU_ITEM
{
39 EFI_STRING_ID NameToken
;
40 CHAR16 FunctionKeyToken
;
41 MENU_ITEM_FUNCTION Function
;
45 Initializa the menu bar with the specified items.
47 @param[in] Items The items to display and their functions.
49 @retval EFI_SUCCESS The initialization was correct.
50 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
55 IN CONST EDITOR_MENU_ITEM
*Items
59 Initialize the control hot-key with the specified items.
61 @param[in] Items The hot-key functions.
63 @retval EFI_SUCCESS The initialization was correct.
68 IN MENU_ITEM_FUNCTION
*Items
72 Cleanup function for a menu bar. frees all allocated memory.
81 Refresh function for the menu bar.
83 @param[in] LastRow The last printable row.
84 @param[in] LastCol The last printable column.
86 @retval EFI_SUCCESS The refresh was successful.
91 IN CONST UINTN LastRow
,
92 IN CONST UINTN LastCol
96 Function to dispatch the correct function based on a function key (F1...)
98 @param[in] Key The pressed key.
100 @retval EFI_NOT_FOUND The key was not a valid function key
101 (an error was sent to the status bar).
102 @return The return value from the called dispatch function.
106 MenuBarDispatchFunctionKey (
107 IN CONST EFI_INPUT_KEY
*Key
111 Function to dispatch the correct function based on a control-based key (ctrl+o...)
113 @param[in] Key The pressed key.
115 @retval EFI_NOT_FOUND The key was not a valid control-based key
116 (an error was sent to the status bar).
121 MenuBarDispatchControlHotKey (
122 IN CONST EFI_INPUT_KEY
*Key