1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2005 by Kevin Ferrare
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef _GUI_STATUSBAR_H_
23 #define _GUI_STATUSBAR_H_
26 #include "screen_access.h"
29 #define STATUSBAR_X_POS 0
30 #define STATUSBAR_Y_POS 0 /* MUST be a multiple of 8 */
31 #define STATUSBAR_HEIGHT 8
48 #ifdef HAS_REMOTE_BUTTON_HOLD
51 #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
52 bool led
; /* disk LED simulation in the status bar */
59 long battery_icon_switch_tick
;
61 long volume_icon_switch_tick
;
63 bool redraw_volume
; /* true if the volume gauge needs updating */
65 struct status_info info
;
66 struct status_info lastinfo
;
71 struct screen
* display
;
75 extern struct gui_syncstatusbar statusbars
;
78 * Attach the status bar to a screen
79 * (The previous screen attachement is lost)
80 * - bar : the statusbar structure
81 * - display : the screen to attach
83 #define gui_statusbar_set_screen(gui_statusbar, _display) \
84 (gui_statusbar)->display = (_display);
88 * Draws the status bar on the attached screen
89 * - bar : the statusbar structure
91 extern void gui_statusbar_draw(struct gui_statusbar
* bar
, bool force_redraw
);
94 struct gui_syncstatusbar
96 struct gui_statusbar statusbars
[NB_SCREENS
];
99 extern void gui_syncstatusbar_init(struct gui_syncstatusbar
* bars
);
100 extern void gui_syncstatusbar_draw(struct gui_syncstatusbar
* bars
, bool force_redraw
);
101 void gui_statusbar_changed(bool enabled
);
103 #endif /*_GUI_STATUSBAR_H_*/