diff options
Diffstat (limited to 'wear_ui.h')
-rw-r--r-- | wear_ui.h | 26 |
1 files changed, 7 insertions, 19 deletions
@@ -17,19 +17,13 @@ #ifndef RECOVERY_WEAR_UI_H #define RECOVERY_WEAR_UI_H -#include <pthread.h> -#include <stdio.h> +#include "screen_ui.h" -#include "ui.h" -#include "minui/minui.h" - -class WearRecoveryUI : public RecoveryUI { +class WearRecoveryUI : public ScreenRecoveryUI { public: WearRecoveryUI(); void Init(); - void SetLocale(const char* locale); - // overall recovery state ("background image") void SetBackground(Icon icon); @@ -47,6 +41,7 @@ class WearRecoveryUI : public RecoveryUI { // printing messages void Print(const char* fmt, ...); + void PrintOnScreenOnly(const char* fmt, ...) __printflike(2, 3); void ShowFile(const char* filename); void ShowFile(FILE* fp); @@ -58,9 +53,6 @@ class WearRecoveryUI : public RecoveryUI { void Redraw(); - enum UIElement { HEADER, MENU, MENU_SEL_BG, MENU_SEL_FG, LOG, TEXT_FILL }; - virtual void SetColor(UIElement e); - protected: int progress_bar_height, progress_bar_width; @@ -79,6 +71,9 @@ class WearRecoveryUI : public RecoveryUI { int intro_frames; int loop_frames; + // Number of frames per sec (default: 30) for both of intro and loop. + int animation_fps; + private: Icon currentIcon; @@ -86,11 +81,6 @@ class WearRecoveryUI : public RecoveryUI { int current_frame; - int animation_fps; - - bool rtl_locale; - - pthread_mutex_t updateMutex; GRSurface* backgroundIcon[5]; GRSurface* *introFrames; GRSurface* *loopFrames; @@ -127,11 +117,9 @@ class WearRecoveryUI : public RecoveryUI { void update_screen_locked(); static void* progress_thread(void* cookie); void progress_loop(); - void LoadBitmap(const char* filename, GRSurface** surface); void PutChar(char); void ClearText(); - void DrawTextLine(int x, int* y, const char* line, bool bold); - void DrawTextLines(int x, int* y, const char* const* lines); + void PrintV(const char*, bool, va_list); }; #endif // RECOVERY_WEAR_UI_H |