summaryrefslogtreecommitdiffstats
path: root/minuitwrp/minui.h
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2014-09-07 15:01:56 +0200
committerDees Troy <dees_troy@teamw.in>2014-10-14 15:06:56 +0200
commit76ee903d84d5b477016fb6ed6bdee1a21e237903 (patch)
treeb5e773d53ce727911db18ba12d1e96b690c78c54 /minuitwrp/minui.h
parentFix exfat-fuse handling (diff)
downloadandroid_bootable_recovery-76ee903d84d5b477016fb6ed6bdee1a21e237903.tar
android_bootable_recovery-76ee903d84d5b477016fb6ed6bdee1a21e237903.tar.gz
android_bootable_recovery-76ee903d84d5b477016fb6ed6bdee1a21e237903.tar.bz2
android_bootable_recovery-76ee903d84d5b477016fb6ed6bdee1a21e237903.tar.lz
android_bootable_recovery-76ee903d84d5b477016fb6ed6bdee1a21e237903.tar.xz
android_bootable_recovery-76ee903d84d5b477016fb6ed6bdee1a21e237903.tar.zst
android_bootable_recovery-76ee903d84d5b477016fb6ed6bdee1a21e237903.zip
Diffstat (limited to '')
-rw-r--r--minuitwrp/minui.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/minuitwrp/minui.h b/minuitwrp/minui.h
index f04f518b5..cb9f8a385 100644
--- a/minuitwrp/minui.h
+++ b/minuitwrp/minui.h
@@ -20,6 +20,12 @@
typedef void* gr_surface;
typedef unsigned short gr_pixel;
+#define FONT_TYPE_TWRP 0
+
+#ifndef TW_DISABLE_TTF
+#define FONT_TYPE_TTF 1
+#endif
+
int gr_init(void);
void gr_exit(void);
@@ -35,16 +41,25 @@ void gr_fill(int x, int y, int w, int h);
int gr_textEx(int x, int y, const char *s, void* font);
int gr_textExW(int x, int y, const char *s, void* font, int max_width);
int gr_textExWH(int x, int y, const char *s, void* pFont, int max_width, int max_height);
-int twgr_text(int x, int y, const char *s);
static inline int gr_text(int x, int y, const char *s) { return gr_textEx(x, y, s, NULL); }
int gr_measureEx(const char *s, void* font);
static inline int gr_measure(const char *s) { return gr_measureEx(s, NULL); }
int gr_maxExW(const char *s, void* font, int max_width);
-int gr_getFontDetails(void* font, unsigned* cheight, unsigned* maxwidth);
-static inline void gr_font_size(int *x, int *y) { gr_getFontDetails(NULL, (unsigned*) y, (unsigned*) x); }
+int gr_getMaxFontHeight(void *font);
void* gr_loadFont(const char* fontName);
+void gr_freeFont(void *font);
+
+#ifndef TW_DISABLE_TTF
+void *gr_ttf_loadFont(const char *filename, int size, int dpi);
+void gr_ttf_freeFont(void *font);
+int gr_ttf_textExWH(void *context, int x, int y, const char *s, void *pFont, int max_width, int max_height);
+int gr_ttf_measureEx(const char *s, void *font);
+int gr_ttf_maxExW(const char *s, void *font, int max_width);
+int gr_ttf_getMaxFontHeight(void *font);
+void gr_ttf_dump_stats(void);
+#endif
void gr_blit(gr_surface source, int sx, int sy, int w, int h, int dx, int dy);
unsigned int gr_get_width(gr_surface surface);