aboutsummaryrefslogtreecommitdiffstats
path: root/Library/UefiShellUfmCommandLib/dialog-box.h
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-12-11 21:50:16 +0300
committerJoursoir <chat@joursoir.net>2021-12-11 21:50:16 +0300
commitd7eaae0e2c816c0727ba0a1a5e497a934e0289b6 (patch)
treeef99720ae3c24a521f82a9dc4c17354ac1fcc0ce /Library/UefiShellUfmCommandLib/dialog-box.h
parentdac697aebc8a5c680daf8bf35ce350ae994d03e4 (diff)
downloadufm-d7eaae0e2c816c0727ba0a1a5e497a934e0289b6.tar.gz
ufm-d7eaae0e2c816c0727ba0a1a5e497a934e0289b6.tar.bz2
ufm-d7eaae0e2c816c0727ba0a1a5e497a934e0289b6.zip
dialog-box: make handling keyboard actions and highlighting of widgets
Diffstat (limited to 'Library/UefiShellUfmCommandLib/dialog-box.h')
-rw-r--r--Library/UefiShellUfmCommandLib/dialog-box.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/Library/UefiShellUfmCommandLib/dialog-box.h b/Library/UefiShellUfmCommandLib/dialog-box.h
index d6d6e43..4d7e899 100644
--- a/Library/UefiShellUfmCommandLib/dialog-box.h
+++ b/Library/UefiShellUfmCommandLib/dialog-box.h
@@ -4,10 +4,20 @@
#include <Uefi.h>
#include "widget/input.h"
+enum dbox_widgets {
+ DBOX_START_WID = 0,
+ DBOX_OK_BUTTON,
+ DBOX_CL_BUTTON,
+ DBOX_INPUT_BOX,
+ DBOX_END_WID
+};
+
struct dbox_ctx {
struct window *wbg;
struct widget_input *in;
struct window *wok, *wcl;
+
+ enum dbox_widgets active_widget;
};
/*
@@ -36,6 +46,15 @@ struct dbox_ctx *dbox_alloc(struct screen *scr, CONST CHAR16 *title,
VOID dbox_release(struct dbox_ctx *dbox);
/*
+ * Handles all keyboard actions in the dialog box
+ *
+ * dbox: the dialog box on which to operate
+ *
+ * return: TRUE if user pressed OK. Otherwise FALSE
+*/
+BOOLEAN dbox_handle(struct dbox_ctx *dbox);
+
+/*
* Does the output of dialog box to the terminal
*
* dbox: the dialog box on which to operate