summaryrefslogtreecommitdiffstats
path: root/minui/minui.h
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2017-05-10 23:11:35 +0200
committerEthan Yonker <dees_troy@teamw.in>2017-05-10 23:11:35 +0200
commit84d61ce31c48d0da495617f64edb724eeb36d3bc (patch)
tree443d459f7e0e3b0b7080522891dd1b92dfb2e6c7 /minui/minui.h
parentAdopted Storage: backup keys but do not wipe them (diff)
parentAdd a checker for signature boundary in verifier am: 54ea136fde am: 0a34b17c8b am: fb80b4f72d am: d3d5e54a45 am: 6ea9888d51 am: a055eb93c3 am: 15ca2a4763 am: ca50d7b66a am: 64f0de7a13 am: e4ec60e045 (diff)
downloadandroid_bootable_recovery-84d61ce31c48d0da495617f64edb724eeb36d3bc.tar
android_bootable_recovery-84d61ce31c48d0da495617f64edb724eeb36d3bc.tar.gz
android_bootable_recovery-84d61ce31c48d0da495617f64edb724eeb36d3bc.tar.bz2
android_bootable_recovery-84d61ce31c48d0da495617f64edb724eeb36d3bc.tar.lz
android_bootable_recovery-84d61ce31c48d0da495617f64edb724eeb36d3bc.tar.xz
android_bootable_recovery-84d61ce31c48d0da495617f64edb724eeb36d3bc.tar.zst
android_bootable_recovery-84d61ce31c48d0da495617f64edb724eeb36d3bc.zip
Diffstat (limited to 'minui/minui.h')
-rw-r--r--minui/minui.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/minui/minui.h b/minui/minui.h
index dee46411e..abef036e4 100644
--- a/minui/minui.h
+++ b/minui/minui.h
@@ -17,7 +17,7 @@
#ifndef _MINUI_H_
#define _MINUI_H_
-#ifndef TW_USE_OLD_MINUI_H
+#ifndef TW_USE_MINUI_21
#include <sys/types.h>
@@ -35,6 +35,12 @@ struct GRSurface {
unsigned char* data;
};
+struct GRFont {
+ GRSurface* texture;
+ int char_width;
+ int char_height;
+};
+
int gr_init();
void gr_exit();
@@ -47,11 +53,21 @@ void gr_fb_blank(bool blank);
void gr_clear(); // clear entire surface to current color
void gr_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
void gr_fill(int x1, int y1, int x2, int y2);
-void gr_text(int x, int y, const char *s, bool bold);
+
void gr_texticon(int x, int y, GRSurface* icon);
+#ifndef TW_USE_MINUI_CUSTOM_FONTS
+void gr_text(int x, int y, const char *s, bool bold);
int gr_measure(const char *s);
void gr_font_size(int *x, int *y);
void gr_set_font(__attribute__ ((unused))const char* name);
+#else
+
+const GRFont* gr_sys_font();
+int gr_init_font(const char* name, GRFont** dest);
+void gr_text(const GRFont* font, int x, int y, const char *s, bool bold);
+int gr_measure(const GRFont* font, const char *s);
+void gr_font_size(const GRFont* font, int *x, int *y);
+#endif
void gr_blit(GRSurface* source, int sx, int sy, int w, int h, int dx, int dy);
unsigned int gr_get_width(GRSurface* surface);
@@ -127,9 +143,9 @@ int res_create_localized_alpha_surface(const char* name, const char* locale,
// functions.
void res_free_surface(GRSurface* surface);
-#else //ifndef TW_USE_OLD_MINUI_H
+#else //ifndef TW_USE_MINUI_21
-// This the old minui.old/minui.h for compatibility with building TWRP
+// This the old minui21/minui.h for compatibility with building TWRP
// in pre 6.0 trees.
#include <stdbool.h>
@@ -217,5 +233,5 @@ void gr_clear();
}
#endif
-#endif // ifndef TW_USE_OLD_MINUI_H
+#endif // ifndef TW_USE_MINUI_21
#endif // ifndef _MINUI_H_