aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-12-01 19:41:08 +0300
committerJoursoir <chat@joursoir.net>2021-12-01 19:41:08 +0300
commit88e965ea7fccd4c59eef23ee739b395da6281dd8 (patch)
treec2e7967e96cda4c545ecb302ea4aa7aa3f30d446
parent5b90554b7604b76c1ba912cb585e30876d6042ba (diff)
downloadufm-88e965ea7fccd4c59eef23ee739b395da6281dd8.tar.gz
ufm-88e965ea7fccd4c59eef23ee739b395da6281dd8.tar.bz2
ufm-88e965ea7fccd4c59eef23ee739b395da6281dd8.zip
panel: make panel_getch()
-rw-r--r--Library/UefiShellUfmCommandLib/panel.c5
-rw-r--r--Library/UefiShellUfmCommandLib/panel.h10
2 files changed, 15 insertions, 0 deletions
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 */