No Description

wear_ui.h 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (C) 2014 The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef RECOVERY_WEAR_UI_H
  17. #define RECOVERY_WEAR_UI_H
  18. #include "screen_ui.h"
  19. class WearRecoveryUI : public ScreenRecoveryUI {
  20. public:
  21. WearRecoveryUI();
  22. void SetStage(int current, int max) override;
  23. // menu display
  24. void StartMenu(bool is_main,
  25. menu_type_t type,
  26. const char* const* headers,
  27. const MenuItemVector& items,
  28. int initial_selection) override;
  29. int SelectMenu(int sel) override;
  30. int SelectMenu(const Point& point) override;
  31. protected:
  32. // progress bar vertical position, it's centered horizontally
  33. const int kProgressBarBaseline;
  34. // Unusable rows when displaying the recovery menu, including the lines for headers (Android
  35. // Recovery, build id and etc) and the bottom lines that may otherwise go out of the screen.
  36. const int kMenuUnusableRows;
  37. int GetProgressBaseline() const override;
  38. void update_progress_locked() override;
  39. private:
  40. void draw_background_locked() override;
  41. void draw_screen_locked() override;
  42. int menu_start, menu_end;
  43. };
  44. #endif // RECOVERY_WEAR_UI_H