summaryrefslogtreecommitdiffstats
path: root/screen_ui.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-04-15 01:49:04 +0200
committerElliott Hughes <enh@google.com>2016-04-15 07:44:23 +0200
commit498cda6ef6c610efb055221d6c689185d49447bb (patch)
tree93254321220442262525eb80b50f60055e3cea17 /screen_ui.h
parentUse BoringSSL instead of mincrypt to speed up package verification. (diff)
downloadandroid_bootable_recovery-498cda6ef6c610efb055221d6c689185d49447bb.tar
android_bootable_recovery-498cda6ef6c610efb055221d6c689185d49447bb.tar.gz
android_bootable_recovery-498cda6ef6c610efb055221d6c689185d49447bb.tar.bz2
android_bootable_recovery-498cda6ef6c610efb055221d6c689185d49447bb.tar.lz
android_bootable_recovery-498cda6ef6c610efb055221d6c689185d49447bb.tar.xz
android_bootable_recovery-498cda6ef6c610efb055221d6c689185d49447bb.tar.zst
android_bootable_recovery-498cda6ef6c610efb055221d6c689185d49447bb.zip
Diffstat (limited to '')
-rw-r--r--screen_ui.h50
1 files changed, 32 insertions, 18 deletions
diff --git a/screen_ui.h b/screen_ui.h
index 9e1b2dfa1..233ff55e6 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -67,14 +67,23 @@ class ScreenRecoveryUI : public RecoveryUI {
};
void SetColor(UIElement e);
- private:
+ protected:
Icon currentIcon;
- int installingFrame;
+
const char* locale;
+ bool intro_done;
+ int current_frame;
+
+ GRSurface* error_icon;
+
+ GRSurface* erasing_text;
+ GRSurface* error_text;
+ GRSurface* installing_text;
+ GRSurface* no_command_text;
+
+ GRSurface** introFrames;
+ GRSurface** loopFrames;
- GRSurface* backgroundIcon[5];
- GRSurface* backgroundText[5];
- GRSurface** installation;
GRSurface* progressBarEmpty;
GRSurface* progressBarFill;
GRSurface* stageMarkerEmpty;
@@ -107,21 +116,31 @@ class ScreenRecoveryUI : public RecoveryUI {
pthread_t progress_thread_;
- // The following two are parsed from the image file
- // (e.g. '/res/images/icon_installing.png').
+ // Number of intro frames and loop frames in the animation.
+ int intro_frames;
+ int loop_frames;
+
+ // Number of frames per sec (default: 30) for both parts of the animation.
int animation_fps;
- int installing_frames;
int iconX, iconY;
int stage, max_stage;
- void draw_background_locked(Icon icon);
+ int char_width_;
+ int char_height_;
+ pthread_mutex_t updateMutex;
+ bool rtl_locale;
+
+ void draw_background_locked();
void draw_progress_locked();
void draw_screen_locked();
void update_screen_locked();
void update_progress_locked();
+ GRSurface* GetCurrentFrame();
+ GRSurface* GetCurrentText();
+
static void* ProgressThreadStartRoutine(void* data);
void ProgressThreadLoop();
@@ -130,16 +149,11 @@ class ScreenRecoveryUI : public RecoveryUI {
void PutChar(char);
void ClearText();
- void DrawHorizontalRule(int* y);
-
- void LoadBitmapArray(const char* filename, int* frames, int* fps, GRSurface*** surface);
- void LoadLocalizedBitmap(const char* filename, GRSurface** surface);
- protected:
- int char_width_;
- int char_height_;
- pthread_mutex_t updateMutex;
- bool rtl_locale;
+ void LoadAnimation();
void LoadBitmap(const char* filename, GRSurface** surface);
+ void LoadLocalizedBitmap(const char* filename, GRSurface** surface);
+
+ void DrawHorizontalRule(int* y);
void DrawTextLine(int x, int* y, const char* line, bool bold);
void DrawTextLines(int x, int* y, const char* const* lines);
};