From 88e965ea7fccd4c59eef23ee739b395da6281dd8 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Wed, 1 Dec 2021 19:41:08 +0300 Subject: panel: make panel_getch() --- Library/UefiShellUfmCommandLib/panel.c | 5 +++++ Library/UefiShellUfmCommandLib/panel.h | 10 ++++++++++ 2 files changed, 15 insertions(+) (limited to 'Library') diff --git a/Library/UefiShellUfmCommandLib/panel.c b/Library/UefiShellUfmCommandLib/panel.c index f920ea1..f1a9daf 100644 --- a/Library/UefiShellUfmCommandLib/panel.c +++ b/Library/UefiShellUfmCommandLib/panel.c @@ -368,3 +368,8 @@ BOOLEAN panel_mark_file(struct panel_ctx *p, UINTN line) return TRUE; } +EFI_INPUT_KEY panel_getch(struct panel_ctx *p) +{ + return wgetch(p->wbg); +} + diff --git a/Library/UefiShellUfmCommandLib/panel.h b/Library/UefiShellUfmCommandLib/panel.h index 8670f82..33d2ed6 100644 --- a/Library/UefiShellUfmCommandLib/panel.h +++ b/Library/UefiShellUfmCommandLib/panel.h @@ -91,4 +91,14 @@ VOID panel_set_active(struct panel_ctx *p, BOOLEAN active); */ BOOLEAN panel_mark_file(struct panel_ctx *p, UINTN line); +/* + * Gets character from the input device. + * + * p: the panel on which to operate + * + * return: A pointer to a buffer that is filled in with the keystroke + * information for the key that was pressed. +*/ +EFI_INPUT_KEY panel_getch(struct panel_ctx *p); + #endif /* UFM_PANEL_H */ -- cgit v1.2.3-18-g5258