Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 The Android Open Source Project |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 3 | * Copyright (C) 2019 The LineageOS Project |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | #ifndef RECOVERY_SCREEN_UI_H |
| 19 | #define RECOVERY_SCREEN_UI_H |
| 20 | |
| 21 | #include <pthread.h> |
Elliott Hughes | 95fc63e | 2015-04-10 19:12:01 -0700 | [diff] [blame] | 22 | #include <stdio.h> |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 23 | |
Tao Bao | 736d59c | 2017-01-03 10:15:33 -0800 | [diff] [blame] | 24 | #include <string> |
Tao Bao | e15d7a5 | 2017-09-07 13:38:51 -0700 | [diff] [blame] | 25 | #include <vector> |
Tao Bao | 736d59c | 2017-01-03 10:15:33 -0800 | [diff] [blame] | 26 | |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 27 | #include "ui.h" |
Tao Bao | 0ecbd76 | 2017-01-16 21:16:58 -0800 | [diff] [blame] | 28 | |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 29 | #define MAX_MENU_ITEMS 32 |
| 30 | |
Tao Bao | 0ecbd76 | 2017-01-16 21:16:58 -0800 | [diff] [blame] | 31 | // From minui/minui.h. |
| 32 | struct GRSurface; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 33 | |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 34 | class ScreenMenuItem { |
| 35 | public: |
| 36 | ScreenMenuItem() : icon_(nullptr), icon_sel_(nullptr) {} |
| 37 | explicit ScreenMenuItem(const MenuItem& mi) |
| 38 | : text_(mi.text()), |
| 39 | icon_name_(mi.icon_name()), |
| 40 | icon_(nullptr), |
| 41 | icon_name_sel_(mi.icon_name_sel()), |
| 42 | icon_sel_(nullptr) {} |
| 43 | ~ScreenMenuItem(); |
| 44 | |
| 45 | const std::string& text() const { |
| 46 | return text_; |
| 47 | } |
| 48 | GRSurface* icon(); |
| 49 | GRSurface* icon_sel(); |
| 50 | |
| 51 | private: |
| 52 | std::string text_; |
| 53 | std::string icon_name_; |
| 54 | GRSurface* icon_; |
| 55 | std::string icon_name_sel_; |
| 56 | GRSurface* icon_sel_; |
| 57 | }; |
| 58 | typedef std::vector<ScreenMenuItem> ScreenMenuItemVector; |
| 59 | |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 60 | // Implementation of RecoveryUI appropriate for devices with a screen |
| 61 | // (shows an icon + a progress bar, text logging, menu, etc.) |
| 62 | class ScreenRecoveryUI : public RecoveryUI { |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 63 | public: |
Tao Bao | 7577965 | 2017-09-10 11:28:32 -0700 | [diff] [blame] | 64 | enum UIElement { |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 65 | STATUSBAR, |
Tao Bao | 7577965 | 2017-09-10 11:28:32 -0700 | [diff] [blame] | 66 | HEADER, |
| 67 | MENU, |
| 68 | MENU_SEL_BG, |
| 69 | MENU_SEL_BG_ACTIVE, |
| 70 | MENU_SEL_FG, |
| 71 | LOG, |
| 72 | TEXT_FILL, |
| 73 | INFO |
| 74 | }; |
| 75 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 76 | ScreenRecoveryUI(); |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 77 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 78 | bool Init(const std::string& locale) override; |
Tom Marshall | cfcafa1 | 2017-09-08 19:48:46 +0000 | [diff] [blame] | 79 | void Stop() override; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 80 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 81 | // overall recovery state ("background image") |
Tao Bao | 99b2d77 | 2017-06-23 22:47:03 -0700 | [diff] [blame] | 82 | void SetBackground(Icon icon) override; |
| 83 | void SetSystemUpdateText(bool security_update) override; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 84 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 85 | // progress indicator |
| 86 | void SetProgressType(ProgressType type) override; |
| 87 | void ShowProgress(float portion, float seconds) override; |
| 88 | void SetProgress(float fraction) override; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 89 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 90 | void SetStage(int current, int max) override; |
Doug Zongker | c87bab1 | 2013-11-25 13:53:25 -0800 | [diff] [blame] | 91 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 92 | // text log |
| 93 | void ShowText(bool visible) override; |
| 94 | bool IsTextVisible() override; |
| 95 | bool WasTextEverVisible() override; |
Alessandro Astone | 20c8d41 | 2019-04-01 11:11:33 +0200 | [diff] [blame] | 96 | void UpdateScreenOnPrint(bool update) override { |
| 97 | update_screen_on_print = update; |
| 98 | } |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 99 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 100 | // printing messages |
Tao Bao | 99b2d77 | 2017-06-23 22:47:03 -0700 | [diff] [blame] | 101 | void Print(const char* fmt, ...) override __printflike(2, 3); |
| 102 | void PrintOnScreenOnly(const char* fmt, ...) override __printflike(2, 3); |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 103 | int ShowFile(const char* filename) override; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 104 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 105 | // menu display |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 106 | void StartMenu(bool is_main, menu_type_t type, const char* const* headers, |
| 107 | const MenuItemVector& items, int initial_selection) override; |
Tao Bao | 99b2d77 | 2017-06-23 22:47:03 -0700 | [diff] [blame] | 108 | int SelectMenu(int sel) override; |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 109 | int SelectMenu(const Point& point) override; |
Alessandro Astone | d6eb74e | 2019-03-28 22:02:02 +0100 | [diff] [blame] | 110 | int ScrollMenu(int updown) override; |
Tao Bao | 99b2d77 | 2017-06-23 22:47:03 -0700 | [diff] [blame] | 111 | void EndMenu() override; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 112 | |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 113 | bool MenuShowing() const { |
| 114 | return show_menu; |
| 115 | } |
| 116 | bool MenuScrollable() const { |
| 117 | return (menu_type_ == MT_LIST); |
| 118 | } |
| 119 | int MenuItemStart() const { |
| 120 | return menu_start_y_; |
| 121 | } |
| 122 | int MenuItemHeight() const { |
| 123 | return (3 * menu_char_height_); |
| 124 | } |
| 125 | |
Tao Bao | 99b2d77 | 2017-06-23 22:47:03 -0700 | [diff] [blame] | 126 | void KeyLongPress(int) override; |
Elliott Hughes | 642aaa7 | 2015-04-10 12:47:46 -0700 | [diff] [blame] | 127 | |
Tom Marshall | f780f1c | 2018-03-01 23:51:51 +0100 | [diff] [blame] | 128 | void Redraw() override; |
Doug Zongker | c0441d1 | 2013-07-31 11:28:24 -0700 | [diff] [blame] | 129 | |
Tao Bao | 99b2d77 | 2017-06-23 22:47:03 -0700 | [diff] [blame] | 130 | void SetColor(UIElement e) const; |
Doug Zongker | c0441d1 | 2013-07-31 11:28:24 -0700 | [diff] [blame] | 131 | |
Tianjie Xu | 29d5575 | 2017-09-20 17:53:46 -0700 | [diff] [blame] | 132 | // Check the background text image. Use volume up/down button to cycle through the locales |
| 133 | // embedded in the png file, and power button to go back to recovery main menu. |
| 134 | void CheckBackgroundTextImages(const std::string& saved_locale); |
| 135 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 136 | protected: |
| 137 | // The margin that we don't want to use for showing texts (e.g. round screen, or screen with |
| 138 | // rounded corners). |
| 139 | const int kMarginWidth; |
| 140 | const int kMarginHeight; |
Tao Bao | 4521b70 | 2017-06-20 18:11:21 -0700 | [diff] [blame] | 141 | |
Tao Bao | 0470cee | 2017-08-02 17:11:04 -0700 | [diff] [blame] | 142 | // Number of frames per sec (default: 30) for both parts of the animation. |
| 143 | const int kAnimationFps; |
| 144 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 145 | // The scale factor from dp to pixels. 1.0 for mdpi, 4.0 for xxxhdpi. |
Tao Bao | 7577965 | 2017-09-10 11:28:32 -0700 | [diff] [blame] | 146 | const float kDensity; |
| 147 | |
| 148 | virtual bool InitTextParams(); |
| 149 | |
| 150 | virtual void draw_background_locked(); |
Tom Marshall | f780f1c | 2018-03-01 23:51:51 +0100 | [diff] [blame] | 151 | virtual void draw_foreground_locked(int& y); |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 152 | virtual void draw_statusbar_locked(); |
| 153 | virtual void draw_header_locked(int& y); |
| 154 | virtual void draw_text_menu_locked(int& y); |
| 155 | virtual void draw_grid_menu_locked(int& y); |
Tao Bao | 7577965 | 2017-09-10 11:28:32 -0700 | [diff] [blame] | 156 | virtual void draw_screen_locked(); |
| 157 | virtual void update_screen_locked(); |
| 158 | virtual void update_progress_locked(); |
| 159 | |
| 160 | GRSurface* GetCurrentFrame() const; |
| 161 | GRSurface* GetCurrentText() const; |
| 162 | |
| 163 | static void* ProgressThreadStartRoutine(void* data); |
| 164 | void ProgressThreadLoop(); |
| 165 | |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 166 | virtual int ShowFile(FILE*); |
Tao Bao | 7577965 | 2017-09-10 11:28:32 -0700 | [diff] [blame] | 167 | virtual void PrintV(const char*, bool, va_list); |
Alessandro Astone | 20c8d41 | 2019-04-01 11:11:33 +0200 | [diff] [blame] | 168 | void NewLine(); |
Tao Bao | 7577965 | 2017-09-10 11:28:32 -0700 | [diff] [blame] | 169 | void PutChar(char); |
| 170 | void ClearText(); |
| 171 | |
| 172 | void LoadAnimation(); |
| 173 | void LoadBitmap(const char* filename, GRSurface** surface); |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 174 | void FreeBitmap(GRSurface* surface); |
Tao Bao | 7577965 | 2017-09-10 11:28:32 -0700 | [diff] [blame] | 175 | void LoadLocalizedBitmap(const char* filename, GRSurface** surface); |
| 176 | |
| 177 | int PixelsFromDp(int dp) const; |
| 178 | virtual int GetAnimationBaseline() const; |
| 179 | virtual int GetProgressBaseline() const; |
| 180 | virtual int GetTextBaseline() const; |
| 181 | |
Luke Song | 92eda4d | 2017-09-19 10:51:35 -0700 | [diff] [blame] | 182 | // Returns pixel width of draw buffer. |
| 183 | virtual int ScreenWidth() const; |
| 184 | // Returns pixel height of draw buffer. |
| 185 | virtual int ScreenHeight() const; |
| 186 | |
Tao Bao | 7577965 | 2017-09-10 11:28:32 -0700 | [diff] [blame] | 187 | // Draws a highlight bar at (x, y) - (x + width, y + height). |
| 188 | virtual void DrawHighlightBar(int x, int y, int width, int height) const; |
| 189 | // Draws a horizontal rule at Y. Returns the offset it should be moving along Y-axis. |
| 190 | virtual int DrawHorizontalRule(int y) const; |
| 191 | // Draws a line of text. Returns the offset it should be moving along Y-axis. |
| 192 | virtual int DrawTextLine(int x, int y, const char* line, bool bold) const; |
Luke Song | 92eda4d | 2017-09-19 10:51:35 -0700 | [diff] [blame] | 193 | // Draws surface portion (sx, sy, w, h) at screen location (dx, dy). |
| 194 | virtual void DrawSurface(GRSurface* surface, int sx, int sy, int w, int h, int dx, int dy) const; |
| 195 | // Draws rectangle at (x, y) - (x + w, y + h). |
| 196 | virtual void DrawFill(int x, int y, int w, int h) const; |
| 197 | // Draws given surface (surface->pixel_bytes = 1) as text at (x, y). |
| 198 | virtual void DrawTextIcon(int x, int y, GRSurface* surface) const; |
Tao Bao | 7577965 | 2017-09-10 11:28:32 -0700 | [diff] [blame] | 199 | // Draws multiple text lines. Returns the offset it should be moving along Y-axis. |
| 200 | int DrawTextLines(int x, int y, const char* const* lines) const; |
| 201 | // Similar to DrawTextLines() to draw multiple text lines, but additionally wraps long lines. |
| 202 | // Returns the offset it should be moving along Y-axis. |
| 203 | int DrawWrappedTextLines(int x, int y, const char* const* lines) const; |
Tao Bao | 171b4c4 | 2017-06-19 23:10:44 -0700 | [diff] [blame] | 204 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 205 | Icon currentIcon; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 206 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 207 | // The layout to use. |
| 208 | int layout_; |
Elliott Hughes | faf36e0 | 2016-04-20 17:22:16 -0700 | [diff] [blame] | 209 | |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 210 | GRSurface* logo_image; |
| 211 | GRSurface* ic_back; |
| 212 | GRSurface* ic_back_sel; |
| 213 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 214 | GRSurface* error_icon; |
Elliott Hughes | 498cda6 | 2016-04-14 16:49:04 -0700 | [diff] [blame] | 215 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 216 | GRSurface* erasing_text; |
| 217 | GRSurface* error_text; |
| 218 | GRSurface* installing_text; |
| 219 | GRSurface* no_command_text; |
Elliott Hughes | 498cda6 | 2016-04-14 16:49:04 -0700 | [diff] [blame] | 220 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 221 | GRSurface** introFrames; |
| 222 | GRSurface** loopFrames; |
Elliott Hughes | 498cda6 | 2016-04-14 16:49:04 -0700 | [diff] [blame] | 223 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 224 | GRSurface* progressBarEmpty; |
| 225 | GRSurface* progressBarFill; |
| 226 | GRSurface* stageMarkerEmpty; |
| 227 | GRSurface* stageMarkerFill; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 228 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 229 | ProgressType progressBarType; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 230 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 231 | float progressScopeStart, progressScopeSize, progress; |
| 232 | double progressScopeTime, progressScopeDuration; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 233 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 234 | // true when both graphics pages are the same (except for the progress bar). |
| 235 | bool pagesIdentical; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 236 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 237 | size_t text_cols_, text_rows_; |
Elliott Hughes | c049163 | 2015-05-06 12:40:05 -0700 | [diff] [blame] | 238 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 239 | // Log text overlay, displayed when a magic key is pressed. |
| 240 | char** text_; |
Tao Bao | cb5524c | 2017-09-08 21:25:32 -0700 | [diff] [blame] | 241 | size_t text_col_, text_row_; |
Elliott Hughes | c049163 | 2015-05-06 12:40:05 -0700 | [diff] [blame] | 242 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 243 | bool show_text; |
| 244 | bool show_text_ever; // has show_text ever been true? |
Alessandro Astone | 20c8d41 | 2019-04-01 11:11:33 +0200 | [diff] [blame] | 245 | bool previous_row_ended; |
| 246 | bool update_screen_on_print; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 247 | |
Tao Bao | e15d7a5 | 2017-09-07 13:38:51 -0700 | [diff] [blame] | 248 | std::vector<std::string> menu_; |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 249 | bool menu_is_main_; |
| 250 | menu_type_t menu_type_; |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 251 | const char* const* menu_headers_; |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 252 | ScreenMenuItemVector menu_items_; |
| 253 | int menu_start_y_; |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 254 | bool show_menu; |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 255 | int menu_show_start; |
| 256 | int menu_show_count; |
| 257 | int menu_sel; |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 258 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 259 | // An alternate text screen, swapped with 'text_' when we're viewing a log file. |
| 260 | char** file_viewer_text_; |
Elliott Hughes | c049163 | 2015-05-06 12:40:05 -0700 | [diff] [blame] | 261 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 262 | pthread_t progress_thread_; |
Doug Zongker | 32a0a47 | 2011-11-01 11:00:20 -0700 | [diff] [blame] | 263 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 264 | // Number of intro frames and loop frames in the animation. |
| 265 | size_t intro_frames; |
| 266 | size_t loop_frames; |
Damien Bargiacchi | 5e7cfb9 | 2016-08-24 18:28:43 -0700 | [diff] [blame] | 267 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 268 | size_t current_frame; |
| 269 | bool intro_done; |
Elliott Hughes | 498cda6 | 2016-04-14 16:49:04 -0700 | [diff] [blame] | 270 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 271 | int stage, max_stage; |
Doug Zongker | c87bab1 | 2013-11-25 13:53:25 -0800 | [diff] [blame] | 272 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 273 | int char_width_; |
| 274 | int char_height_; |
Tao Bao | 171b4c4 | 2017-06-19 23:10:44 -0700 | [diff] [blame] | 275 | |
Tom Marshall | 820517b | 2019-01-14 14:28:55 -0800 | [diff] [blame] | 276 | int menu_char_width_; |
| 277 | int menu_char_height_; |
| 278 | |
Tao Bao | efb49ad | 2017-01-31 23:03:10 -0800 | [diff] [blame] | 279 | // The locale that's used to show the rendered texts. |
| 280 | std::string locale_; |
| 281 | bool rtl_locale_; |
| 282 | |
Tao Bao | 5d2e3bd | 2017-06-23 22:23:50 -0700 | [diff] [blame] | 283 | pthread_mutex_t updateMutex; |
Tao Bao | efb49ad | 2017-01-31 23:03:10 -0800 | [diff] [blame] | 284 | |
| 285 | private: |
CEnnis91 | 0ccad61 | 2013-05-02 13:29:53 -0400 | [diff] [blame] | 286 | bool rainbow; |
| 287 | int wrap_count; |
| 288 | |
Tao Bao | efb49ad | 2017-01-31 23:03:10 -0800 | [diff] [blame] | 289 | void SetLocale(const std::string&); |
Tianjie Xu | 29d5575 | 2017-09-20 17:53:46 -0700 | [diff] [blame] | 290 | |
| 291 | // Display the background texts for "erasing", "error", "no_command" and "installing" for the |
| 292 | // selected locale. |
| 293 | void SelectAndShowBackgroundText(const std::vector<std::string>& locales_entries, size_t sel); |
CEnnis91 | 0ccad61 | 2013-05-02 13:29:53 -0400 | [diff] [blame] | 294 | |
| 295 | void OMGRainbows(); |
Doug Zongker | 211aebc | 2011-10-28 15:13:10 -0700 | [diff] [blame] | 296 | }; |
| 297 | |
| 298 | #endif // RECOVERY_UI_H |