From 0dd1f8ec11f28fe34c93ba97af95eb2be2fef44f Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Tue, 6 Jun 2006 22:23:52 +0000 Subject: Work-in-progress rework of charging status reading & display: * Changed several charging related HAVE_* macros into one multi-value CONFIG_CHARGING. * Always use proper macros for charging states. * Battery symbol charging animation now starts from current level on all targets with charging. Two-colour animation kept for non-b&w targets. Round down fill level while charging as before, but round to nearest pixel value for discharging on all targets. * Charging anim fixed on player. * Some code cleanup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10080 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/statusbar.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'apps/gui/statusbar.h') diff --git a/apps/gui/statusbar.h b/apps/gui/statusbar.h index 03add6a..a03c294 100644 --- a/apps/gui/statusbar.h +++ b/apps/gui/statusbar.h @@ -31,38 +31,40 @@ struct status_info { int battlevel; + int batt_charge_step; int volume; + int playmode; + int repeat; #ifdef CONFIG_RTC int hour; int minute; #endif - int playmode; - int repeat; + +#ifdef CONFIG_CHARGING bool inserted; +#endif +#ifdef HAVE_USB_POWER + bool usb_power; +#endif + bool battery_state; bool shuffle; bool keylock; #ifdef HAS_REMOTE_BUTTON_HOLD bool keylockremote; #endif - bool battery_safe; - bool redraw_volume; /* true if the volume gauge needs updating */ #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) bool led; /* disk LED simulation in the status bar */ #endif -#ifdef HAVE_USB_POWER - bool usb_power; -#endif }; struct gui_statusbar { - /* Volume icon stuffs */ + long battery_icon_switch_tick; + long volume_icon_switch_tick; int last_volume; - - long battery_icon_switch_tick; - int animated_level; + bool redraw_volume; /* true if the volume gauge needs updating */ struct status_info info; struct status_info lastinfo; @@ -95,7 +97,7 @@ extern void gui_statusbar_init(struct gui_statusbar * bar); */ extern void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw); -void gui_statusbar_icon_battery(struct screen * display, int percent, int animated_percent); +void gui_statusbar_icon_battery(struct screen * display, int percent, int batt_charge_step); bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume); void gui_statusbar_icon_play_state(struct screen * display, int state); void gui_statusbar_icon_play_mode(struct screen * display, int mode); -- cgit v1.1