summaryrefslogtreecommitdiffstats
path: root/screen_ui.h
diff options
context:
space:
mode:
authorDamien Bargiacchi <drb@google.com>2016-08-25 03:28:43 +0200
committerDamien Bargiacchi <drb@google.com>2016-09-07 11:26:50 +0200
commit5e7cfb9af64d5f6bf616d9b6fa40bd0ae82e781a (patch)
treeab6853be5f37627748b1456eec59caf1ed5a2271 /screen_ui.h
parentMerge "Support use of custom fonts in miniui" into cw-f-dev (diff)
downloadandroid_bootable_recovery-5e7cfb9af64d5f6bf616d9b6fa40bd0ae82e781a.tar
android_bootable_recovery-5e7cfb9af64d5f6bf616d9b6fa40bd0ae82e781a.tar.gz
android_bootable_recovery-5e7cfb9af64d5f6bf616d9b6fa40bd0ae82e781a.tar.bz2
android_bootable_recovery-5e7cfb9af64d5f6bf616d9b6fa40bd0ae82e781a.tar.lz
android_bootable_recovery-5e7cfb9af64d5f6bf616d9b6fa40bd0ae82e781a.tar.xz
android_bootable_recovery-5e7cfb9af64d5f6bf616d9b6fa40bd0ae82e781a.tar.zst
android_bootable_recovery-5e7cfb9af64d5f6bf616d9b6fa40bd0ae82e781a.zip
Diffstat (limited to 'screen_ui.h')
-rw-r--r--screen_ui.h45
1 files changed, 24 insertions, 21 deletions
diff --git a/screen_ui.h b/screen_ui.h
index 898775778..de7b6442e 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -37,16 +37,16 @@ class ScreenRecoveryUI : public RecoveryUI {
void SetSystemUpdateText(bool security_update);
// progress indicator
- void SetProgressType(ProgressType type);
- void ShowProgress(float portion, float seconds);
- void SetProgress(float fraction);
+ void SetProgressType(ProgressType type) override;
+ void ShowProgress(float portion, float seconds) override;
+ void SetProgress(float fraction) override;
- void SetStage(int current, int max);
+ void SetStage(int current, int max) override;
// text log
- void ShowText(bool visible);
- bool IsTextVisible();
- bool WasTextEverVisible();
+ void ShowText(bool visible) override;
+ bool IsTextVisible() override;
+ bool WasTextEverVisible() override;
// printing messages
void Print(const char* fmt, ...) __printflike(2, 3);
@@ -72,8 +72,6 @@ class ScreenRecoveryUI : public RecoveryUI {
Icon currentIcon;
const char* locale;
- bool intro_done;
- int current_frame;
// The scale factor from dp to pixels. 1.0 for mdpi, 4.0 for xxxhdpi.
float density_;
@@ -123,8 +121,11 @@ class ScreenRecoveryUI : public RecoveryUI {
pthread_t progress_thread_;
// Number of intro frames and loop frames in the animation.
- int intro_frames;
- int loop_frames;
+ size_t intro_frames;
+ size_t loop_frames;
+
+ size_t current_frame;
+ bool intro_done;
// Number of frames per sec (default: 30) for both parts of the animation.
int animation_fps;
@@ -136,11 +137,13 @@ class ScreenRecoveryUI : public RecoveryUI {
pthread_mutex_t updateMutex;
bool rtl_locale;
- void draw_background_locked();
- void draw_foreground_locked();
- void draw_screen_locked();
- void update_screen_locked();
- void update_progress_locked();
+ virtual void InitTextParams();
+
+ virtual void draw_background_locked();
+ virtual void draw_foreground_locked();
+ virtual void draw_screen_locked();
+ virtual void update_screen_locked();
+ virtual void update_progress_locked();
GRSurface* GetCurrentFrame();
GRSurface* GetCurrentText();
@@ -148,8 +151,8 @@ class ScreenRecoveryUI : public RecoveryUI {
static void* ProgressThreadStartRoutine(void* data);
void ProgressThreadLoop();
- void ShowFile(FILE*);
- void PrintV(const char*, bool, va_list);
+ virtual void ShowFile(FILE*);
+ virtual void PrintV(const char*, bool, va_list);
void PutChar(char);
void ClearText();
@@ -158,9 +161,9 @@ class ScreenRecoveryUI : public RecoveryUI {
void LoadLocalizedBitmap(const char* filename, GRSurface** surface);
int PixelsFromDp(int dp);
- int GetAnimationBaseline();
- int GetProgressBaseline();
- int GetTextBaseline();
+ virtual int GetAnimationBaseline();
+ virtual int GetProgressBaseline();
+ virtual int GetTextBaseline();
void DrawHorizontalRule(int* y);
void DrawTextLine(int x, int* y, const char* line, bool bold);