1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2005 by Kevin Ferrare
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef _GUI_STATUSBAR_H_
21 #define _GUI_STATUSBAR_H_
25 #include "screen_access.h"
28 #define STATUSBAR_X_POS 0
29 #define STATUSBAR_Y_POS 0 /* MUST be a multiple of 8 */
30 #define STATUSBAR_HEIGHT 8
43 #ifdef CONFIG_CHARGING
52 #ifdef HAS_REMOTE_BUTTON_HOLD
55 #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
56 bool led
; /* disk LED simulation in the status bar */
63 long battery_icon_switch_tick
;
65 long volume_icon_switch_tick
;
67 bool redraw_volume
; /* true if the volume gauge needs updating */
69 struct status_info info
;
70 struct status_info lastinfo
;
72 struct screen
* display
;
76 extern struct gui_syncstatusbar statusbars
;
79 * Initializes a status bar
80 * - bar : the bar to initialize
82 extern void gui_statusbar_init(struct gui_statusbar
* bar
);
85 * Attach the status bar to a screen
86 * (The previous screen attachement is lost)
87 * - bar : the statusbar structure
88 * - display : the screen to attach
90 #define gui_statusbar_set_screen(gui_statusbar, _display) \
91 (gui_statusbar)->display = (_display);
95 * Draws the status bar on the attached screen
96 * - bar : the statusbar structure
98 extern void gui_statusbar_draw(struct gui_statusbar
* bar
, bool force_redraw
);
100 void gui_statusbar_icon_battery(struct screen
* display
, int percent
, int batt_charge_step
);
101 bool gui_statusbar_icon_volume(struct gui_statusbar
* bar
, int volume
);
102 void gui_statusbar_icon_play_state(struct screen
* display
, int state
);
103 void gui_statusbar_icon_play_mode(struct screen
* display
, int mode
);
104 void gui_statusbar_icon_shuffle(struct screen
* display
);
105 void gui_statusbar_icon_lock(struct screen
* display
);
106 void gui_statusbar_icon_lock_remote(struct screen
* display
);
107 void gui_statusbar_led(struct screen
* display
);
108 #ifdef HAVE_RECORDING
109 void gui_statusbar_icon_recording_info(struct screen
* display
);
113 void gui_statusbar_time(struct screen
* display
, int hour
, int minute
);
117 struct gui_syncstatusbar
119 struct gui_statusbar statusbars
[NB_SCREENS
];
122 extern void gui_syncstatusbar_init(struct gui_syncstatusbar
* bars
);
123 extern void gui_syncstatusbar_draw(struct gui_syncstatusbar
* bars
, bool force_redraw
);
125 #endif /*_GUI_STATUSBAR_H_*/