summaryrefslogtreecommitdiffstats
path: root/minui/include
diff options
context:
space:
mode:
authorLuke Song <songwalker@google.com>2017-09-14 00:56:16 +0200
committerLuke Song <songwalker@google.com>2017-09-28 23:11:35 +0200
commit846012fc444e6076dabf874ed8cbdab358c2e0fb (patch)
treeb4ebd35d4ef31621e77de587a8f1aca4ddf24a47 /minui/include
parentMerge "Add a new option in recovery menu to test the background texts" (diff)
downloadandroid_bootable_recovery-846012fc444e6076dabf874ed8cbdab358c2e0fb.tar
android_bootable_recovery-846012fc444e6076dabf874ed8cbdab358c2e0fb.tar.gz
android_bootable_recovery-846012fc444e6076dabf874ed8cbdab358c2e0fb.tar.bz2
android_bootable_recovery-846012fc444e6076dabf874ed8cbdab358c2e0fb.tar.lz
android_bootable_recovery-846012fc444e6076dabf874ed8cbdab358c2e0fb.tar.xz
android_bootable_recovery-846012fc444e6076dabf874ed8cbdab358c2e0fb.tar.zst
android_bootable_recovery-846012fc444e6076dabf874ed8cbdab358c2e0fb.zip
Diffstat (limited to 'minui/include')
-rw-r--r--minui/include/minui/minui.h36
1 files changed, 23 insertions, 13 deletions
diff --git a/minui/include/minui/minui.h b/minui/include/minui/minui.h
index 27e603136..f9da19999 100644
--- a/minui/include/minui/minui.h
+++ b/minui/include/minui/minui.h
@@ -28,17 +28,24 @@
//
struct GRSurface {
- int width;
- int height;
- int row_bytes;
- int pixel_bytes;
- unsigned char* data;
+ int width;
+ int height;
+ int row_bytes;
+ int pixel_bytes;
+ unsigned char* data;
};
struct GRFont {
- GRSurface* texture;
- int char_width;
- int char_height;
+ GRSurface* texture;
+ int char_width;
+ int char_height;
+};
+
+enum GRRotation {
+ ROTATION_NONE = 0,
+ ROTATION_RIGHT = 1,
+ ROTATION_DOWN = 2,
+ ROTATION_LEFT = 3,
};
int gr_init();
@@ -58,14 +65,17 @@ void gr_texticon(int x, int y, GRSurface* icon);
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);
+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);
void gr_blit(GRSurface* source, int sx, int sy, int w, int h, int dx, int dy);
unsigned int gr_get_width(GRSurface* surface);
unsigned int gr_get_height(GRSurface* surface);
+// Set rotation, flips gr_fb_width/height if 90 degree rotation difference
+void gr_rotate(GRRotation rotation);
+
//
// Input events.
//
@@ -115,8 +125,8 @@ int res_create_display_surface(const char* name, GRSurface** pSurface);
// should have a 'Frames' text chunk whose value is the number of
// frames this image represents. The pixel data itself is interlaced
// by row.
-int res_create_multi_display_surface(const char* name, int* frames,
- int* fps, GRSurface*** pSurface);
+int res_create_multi_display_surface(const char* name, int* frames, int* fps,
+ GRSurface*** pSurface);
// Load a single alpha surface from a grayscale PNG image.
int res_create_alpha_surface(const char* name, GRSurface** pSurface);