VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.h@ 101297

Last change on this file since 101297 was 99404, checked in by vboxsync, 20 months ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
1/** @file
2 Declares menubar interface functions.
3
4 Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#ifndef _LIB_MENU_BAR_H_
10#define _LIB_MENU_BAR_H_
11
12#define SCAN_CONTROL_E 5
13#define SCAN_CONTROL_F 6
14#define SCAN_CONTROL_G 7
15#define SCAN_CONTROL_K 11
16#define SCAN_CONTROL_O 15
17#define SCAN_CONTROL_Q 17
18#define SCAN_CONTROL_R 18
19#define SCAN_CONTROL_S 19
20#define SCAN_CONTROL_T 20
21#define SCAN_CONTROL_U 21
22#define SCAN_CONTROL_W 23
23#define SCAN_CONTROL_Z 26
24
25typedef
26EFI_STATUS
27(*MENU_ITEM_FUNCTION) (
28 VOID
29 );
30
31typedef struct _EDITOR_MENU_ITEM {
32 EFI_STRING_ID NameToken;
33 CHAR16 FunctionKeyToken;
34 MENU_ITEM_FUNCTION Function;
35} EDITOR_MENU_ITEM;
36
37/**
38 Initializa the menu bar with the specified items.
39
40 @param[in] Items The items to display and their functions.
41
42 @retval EFI_SUCCESS The initialization was correct.
43 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
44**/
45EFI_STATUS
46MenuBarInit (
47 IN CONST EDITOR_MENU_ITEM *Items
48 );
49
50/**
51 Initialize the control hot-key with the specified items.
52
53 @param[in] Items The hot-key functions.
54
55 @retval EFI_SUCCESS The initialization was correct.
56**/
57EFI_STATUS
58ControlHotKeyInit (
59 IN MENU_ITEM_FUNCTION *Items
60 );
61
62/**
63 Cleanup function for a menu bar. frees all allocated memory.
64**/
65VOID
66MenuBarCleanup (
67 VOID
68 );
69
70/**
71 Refresh function for the menu bar.
72
73 @param[in] LastRow The last printable row.
74 @param[in] LastCol The last printable column.
75
76 @retval EFI_SUCCESS The refresh was successful.
77**/
78EFI_STATUS
79MenuBarRefresh (
80 IN CONST UINTN LastRow,
81 IN CONST UINTN LastCol
82 );
83
84/**
85 Function to dispatch the correct function based on a function key (F1...)
86
87 @param[in] Key The pressed key.
88
89 @retval EFI_NOT_FOUND The key was not a valid function key
90 (an error was sent to the status bar).
91 @return The return value from the called dispatch function.
92**/
93EFI_STATUS
94MenuBarDispatchFunctionKey (
95 IN CONST EFI_INPUT_KEY *Key
96 );
97
98/**
99 Function to dispatch the correct function based on a control-based key (ctrl+o...)
100
101 @param[in] KeyData The pressed key.
102
103 @retval EFI_NOT_FOUND The key was not a valid control-based key
104 (an error was sent to the status bar).
105 @return EFI_SUCCESS.
106**/
107EFI_STATUS
108MenuBarDispatchControlHotKey (
109 IN CONST EFI_KEY_DATA *KeyData
110 );
111
112#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette