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