From fc34983b91dcababe019ca63721ea2bcd2ac1b6a Mon Sep 17 00:00:00 2001 From: Joursoir Date: Mon, 29 Nov 2021 01:15:12 +0300 Subject: panel: add macros for highlight --- Library/UefiShellUfmCommandLib/panel.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Library/UefiShellUfmCommandLib/panel.c b/Library/UefiShellUfmCommandLib/panel.c index d242df6..a828689 100644 --- a/Library/UefiShellUfmCommandLib/panel.c +++ b/Library/UefiShellUfmCommandLib/panel.c @@ -14,6 +14,15 @@ #define SIZE_COLS 7 #define MODIFYTIME_COLS 12 +#define HIGHLIGHT_LINE_AS_CURRENT(panel, line) \ + highlight_line(panel, line, -1, EFI_CYAN) +#define UNHIGHLIGHT_LINE_AS_CURRENT(panel, line) \ + highlight_line(panel, line, -1, EFI_BLACK) +#define HIGHLIGHT_LINE_AS_MARK(panel, line) \ + highlight_line(panel, line, EFI_YELLOW, -1) +#define UNHIGHLIGHT_LINE_AS_MARK(panel, line) \ + highlight_line(panel, line, EFI_LIGHTGRAY, -1) + STATIC VOID highlight_line(struct panel_ctx *p, UINTN line, INT32 fg, INT32 bg) { CHAR16 *str; -- cgit v1.2.3-18-g5258