From 8c5b07148433fb4a4a822766ab2965b8ba0ee7ca Mon Sep 17 00:00:00 2001 From: Christopher Tarry Date: Fri, 19 Jan 2024 14:57:14 -0500 Subject: [PATCH] remove unnecessary BAGL defines --- src/sia_ux.h | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/src/sia_ux.h b/src/sia_ux.h index f11bf44..6041cae 100644 --- a/src/sia_ux.h +++ b/src/sia_ux.h @@ -57,50 +57,6 @@ typedef union { } commandContext; extern commandContext global; -// These are helper macros for defining UI elements. There are four basic UI -// elements: the background, which is a black rectangle that fills the whole -// screen; icons on the left and right sides of the screen, typically used for -// navigation or approval; and text, which can be anywhere. The UI_TEXT macro -// uses Open Sans Regular 11px, which I've found to be adequate for all text -// elements; if other fonts are desired, I suggest defining a separate macro -// for each of them (e.g. UI_TEXT_BOLD). -// -// In the event that you want to define your own UI elements from scratch, -// you'll want to read include/bagl.h and include/os_io_seproxyhal.h in the -// nanos-secure-sdk repo to learn what each of the fields are used for. -#define UI_BACKGROUND() \ - { \ - {BAGL_RECTANGLE, 0, 0, 0, 128, 32, 0, 0, BAGL_FILL, 0, 0xFFFFFF, 0, 0}, NULL, 0, 0, 0, \ - NULL, NULL, NULL \ - } -#define UI_ICON_LEFT(userid, glyph) \ - { \ - {BAGL_ICON, userid, 3, 12, 7, 7, 0, 0, 0, 0xFFFFFF, 0, 0, glyph}, NULL, 0, 0, 0, NULL, \ - NULL, NULL \ - } -#define UI_ICON_RIGHT(userid, glyph) \ - { \ - {BAGL_ICON, userid, 117, 13, 8, 6, 0, 0, 0, 0xFFFFFF, 0, 0, glyph}, NULL, 0, 0, 0, NULL, \ - NULL, NULL \ - } -#define UI_TEXT(userid, x, y, w, text) \ - { \ - {BAGL_LABELINE, \ - userid, \ - x, \ - y, \ - w, \ - 12, \ - 0, \ - 0, \ - 0, \ - 0xFFFFFF, \ - 0, \ - BAGL_FONT_OPEN_SANS_REGULAR_11px | BAGL_FONT_ALIGNMENT_CENTER, \ - 0}, \ - (char *) text, 0, 0, 0, NULL, NULL, NULL \ - } - // ui_idle displays the main menu screen. Command handlers should call ui_idle // when they finish. void ui_idle(void);