]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.h
ShellPkg: Fix GCC 4.4 build issues
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / EditMenuBar.h
1 /** @file
2 Declares menubar interface functions.
3
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
9
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.
12
13 **/
14
15 #ifndef _LIB_MENU_BAR_H_
16 #define _LIB_MENU_BAR_H_
17
18 typedef
19 EFI_STATUS
20 (*MENU_ITEM_FUNCTION) (
21 VOID
22 );
23
24 typedef struct _EDITOR_MENU_ITEM {
25 EFI_STRING_ID NameToken;
26 CHAR16 FunctionKeyToken;
27 MENU_ITEM_FUNCTION Function;
28 } EDITOR_MENU_ITEM;
29
30 /**
31 Initializa the menu bar with the specified items.
32
33 @param[in] Items The items to display and their functions.
34
35 @retval EFI_SUCCESS The initialization was correct.
36 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
37 **/
38 EFI_STATUS
39 EFIAPI
40 MenuBarInit (
41 IN CONST EDITOR_MENU_ITEM *Items
42 );
43
44 /**
45 Cleanup function for a menu bar. frees all allocated memory.
46 **/
47 VOID
48 EFIAPI
49 MenuBarCleanup (
50 VOID
51 );
52
53 /**
54 Refresh function for the menu bar.
55
56 @param[in] LastRow The last printable row.
57 @param[in] LastCol The last printable column.
58
59 @retval EFI_SUCCESS The refresh was successful.
60 **/
61 EFI_STATUS
62 EFIAPI
63 MenuBarRefresh (
64 IN CONST UINTN LastRow,
65 IN CONST UINTN LastCol
66 );
67
68 /**
69 Function to dispatch the correct function based on a function key (F1...)
70
71 @param[in] Key The pressed key.
72
73 @retval EFI_NOT_FOUND The key was not a valid function key
74 (an error was sent to the status bar).
75 @return The return value from the called dispatch function.
76 **/
77 EFI_STATUS
78 EFIAPI
79 MenuBarDispatchFunctionKey (
80 IN CONST EFI_INPUT_KEY *Key
81 );
82
83 #endif