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_
24 #include "screen_access.h"
26 #define STATUSBAR_X_POS 0
27 #define STATUSBAR_Y_POS 0 /* MUST be a multiple of 8 */
28 #define STATUSBAR_HEIGHT 8
45 #ifdef HAS_REMOTE_BUTTON_HOLD
48 #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
49 bool led
; /* disk LED simulation in the status bar */
56 long battery_icon_switch_tick
;
58 long volume_icon_switch_tick
;
60 bool redraw_volume
; /* true if the volume gauge needs updating */
62 struct status_info info
;
63 struct status_info lastinfo
;
68 struct screen
* display
;
72 extern struct gui_syncstatusbar statusbars
;
75 * Attach the status bar to a screen
76 * (The previous screen attachement is lost)
77 * - bar : the statusbar structure
78 * - display : the screen to attach
80 #define gui_statusbar_set_screen(gui_statusbar, _display) \
81 (gui_statusbar)->display = (_display);
85 * Draws the status bar on the attached screen
86 * - bar : the statusbar structure
88 extern void gui_statusbar_draw(struct gui_statusbar
* bar
, bool force_redraw
);
91 struct gui_syncstatusbar
93 struct gui_statusbar statusbars
[NB_SCREENS
];
96 extern void gui_syncstatusbar_init(struct gui_syncstatusbar
* bars
);
97 extern void gui_syncstatusbar_draw(struct gui_syncstatusbar
* bars
, bool force_redraw
);
99 #endif /*_GUI_STATUSBAR_H_*/