1
0
Fork 0
forked from len0rd/rockbox

Make private functions 'static'.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12470 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2007-02-24 11:07:21 +00:00
parent d39b6ea1dc
commit f67a95330c
2 changed files with 42 additions and 40 deletions

View file

@ -17,19 +17,15 @@
* *
****************************************************************************/ ****************************************************************************/
#include "config.h"
#include "screen_access.h" #include "screen_access.h"
#include "lcd.h"
#include "font.h" #include "font.h"
#include "kernel.h" #include "kernel.h"
#include "string.h" /* for memcmp oO*/ #include "string.h" /* for memcmp oO*/
#include "sprintf.h" #include "sprintf.h"
#include "sound.h" #include "sound.h"
#include "power.h"
#include "settings.h" #include "settings.h"
#include "icons.h" #include "icons.h"
#include "powermgmt.h" #include "powermgmt.h"
#include "button.h"
#include "usb.h" #include "usb.h"
#include "led.h" #include "led.h"
@ -127,7 +123,37 @@
STATUSBAR_DISK_WIDTH STATUSBAR_DISK_WIDTH
struct gui_syncstatusbar statusbars; struct gui_syncstatusbar statusbars;
void gui_statusbar_init(struct gui_statusbar * bar) /* Prototypes */
#ifdef HAVE_LCD_BITMAP
static void gui_statusbar_icon_battery(struct screen * display, int percent,
int batt_charge_step);
static bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume);
static void gui_statusbar_icon_play_state(struct screen * display, int state);
static void gui_statusbar_icon_play_mode(struct screen * display, int mode);
static void gui_statusbar_icon_shuffle(struct screen * display);
static void gui_statusbar_icon_lock(struct screen * display);
#ifdef HAS_REMOTE_BUTTON_HOLD
static void gui_statusbar_icon_lock_remote(struct screen * display);
#endif
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
static void gui_statusbar_led(struct screen * display);
#endif
#ifdef HAVE_RECORDING
static void gui_statusbar_icon_recording_info(struct screen * display);
#endif
#ifdef CONFIG_RTC
static void gui_statusbar_time(struct screen * display, int hour, int minute);
#endif
#endif
/* End prototypes */
/*
* Initializes a status bar
* - bar : the bar to initialize
*/
static void gui_statusbar_init(struct gui_statusbar * bar)
{ {
bar->redraw_volume = true; bar->redraw_volume = true;
bar->volume_icon_switch_tick = bar->battery_icon_switch_tick = current_tick; bar->volume_icon_switch_tick = bar->battery_icon_switch_tick = current_tick;
@ -348,7 +374,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
/* /*
* Print battery icon to status bar * Print battery icon to status bar
*/ */
void gui_statusbar_icon_battery(struct screen * display, int percent, static void gui_statusbar_icon_battery(struct screen * display, int percent,
int batt_charge_step) int batt_charge_step)
{ {
int fill, endfill; int fill, endfill;
@ -426,7 +452,7 @@ void gui_statusbar_icon_battery(struct screen * display, int percent,
/* /*
* Print volume gauge to status bar * Print volume gauge to status bar
*/ */
bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume) static bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume)
{ {
int i; int i;
int vol; int vol;
@ -492,7 +518,7 @@ bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume)
/* /*
* Print play state to status bar * Print play state to status bar
*/ */
void gui_statusbar_icon_play_state(struct screen * display, int state) static void gui_statusbar_icon_play_state(struct screen * display, int state)
{ {
display->mono_bitmap(bitmap_icons_7x8[state], STATUSBAR_PLAY_STATE_X_POS, display->mono_bitmap(bitmap_icons_7x8[state], STATUSBAR_PLAY_STATE_X_POS,
STATUSBAR_Y_POS, STATUSBAR_PLAY_STATE_WIDTH, STATUSBAR_Y_POS, STATUSBAR_PLAY_STATE_WIDTH,
@ -502,7 +528,7 @@ void gui_statusbar_icon_play_state(struct screen * display, int state)
/* /*
* Print play mode to status bar * Print play mode to status bar
*/ */
void gui_statusbar_icon_play_mode(struct screen * display, int mode) static void gui_statusbar_icon_play_mode(struct screen * display, int mode)
{ {
display->mono_bitmap(bitmap_icons_7x8[mode], STATUSBAR_PLAY_MODE_X_POS, display->mono_bitmap(bitmap_icons_7x8[mode], STATUSBAR_PLAY_MODE_X_POS,
STATUSBAR_Y_POS, STATUSBAR_PLAY_MODE_WIDTH, STATUSBAR_Y_POS, STATUSBAR_PLAY_MODE_WIDTH,
@ -512,7 +538,7 @@ void gui_statusbar_icon_play_mode(struct screen * display, int mode)
/* /*
* Print shuffle mode to status bar * Print shuffle mode to status bar
*/ */
void gui_statusbar_icon_shuffle(struct screen * display) static void gui_statusbar_icon_shuffle(struct screen * display)
{ {
display->mono_bitmap(bitmap_icons_7x8[Icon_Shuffle], display->mono_bitmap(bitmap_icons_7x8[Icon_Shuffle],
STATUSBAR_SHUFFLE_X_POS, STATUSBAR_Y_POS, STATUSBAR_SHUFFLE_X_POS, STATUSBAR_Y_POS,
@ -522,7 +548,7 @@ void gui_statusbar_icon_shuffle(struct screen * display)
/* /*
* Print lock when keys are locked * Print lock when keys are locked
*/ */
void gui_statusbar_icon_lock(struct screen * display) static void gui_statusbar_icon_lock(struct screen * display)
{ {
display->mono_bitmap(bitmap_icons_5x8[Icon_Lock_Main], display->mono_bitmap(bitmap_icons_5x8[Icon_Lock_Main],
STATUSBAR_LOCKM_X_POS, STATUSBAR_Y_POS, STATUSBAR_LOCKM_X_POS, STATUSBAR_Y_POS,
@ -533,7 +559,7 @@ void gui_statusbar_icon_lock(struct screen * display)
/* /*
* Print remote lock when remote hold is enabled * Print remote lock when remote hold is enabled
*/ */
void gui_statusbar_icon_lock_remote(struct screen * display) static void gui_statusbar_icon_lock_remote(struct screen * display)
{ {
display->mono_bitmap(bitmap_icons_5x8[Icon_Lock_Remote], display->mono_bitmap(bitmap_icons_5x8[Icon_Lock_Remote],
STATUSBAR_LOCKR_X_POS, STATUSBAR_Y_POS, STATUSBAR_LOCKR_X_POS, STATUSBAR_Y_POS,
@ -545,7 +571,7 @@ void gui_statusbar_icon_lock_remote(struct screen * display)
/* /*
* no real LED: disk activity in status bar * no real LED: disk activity in status bar
*/ */
void gui_statusbar_led(struct screen * display) static void gui_statusbar_led(struct screen * display)
{ {
display->mono_bitmap(bitmap_icon_disk, display->mono_bitmap(bitmap_icon_disk,
STATUSBAR_DISK_X_POS(display->width), STATUSBAR_DISK_X_POS(display->width),
@ -558,7 +584,7 @@ void gui_statusbar_led(struct screen * display)
/* /*
* Print time to status bar * Print time to status bar
*/ */
void gui_statusbar_time(struct screen * display, int hour, int minute) static void gui_statusbar_time(struct screen * display, int hour, int minute)
{ {
unsigned char buffer[6]; unsigned char buffer[6];
unsigned int width, height; unsigned int width, height;
@ -684,7 +710,7 @@ static void gui_statusbar_write_samplerate_info(struct screen * display)
} }
#endif /* CONFIG_CODEC == SWCODEC */ #endif /* CONFIG_CODEC == SWCODEC */
void gui_statusbar_icon_recording_info(struct screen * display) static void gui_statusbar_icon_recording_info(struct screen * display)
{ {
#if CONFIG_CODEC != SWCODEC #if CONFIG_CODEC != SWCODEC
char buffer[3]; char buffer[3];

View file

@ -20,10 +20,8 @@
#ifndef _GUI_STATUSBAR_H_ #ifndef _GUI_STATUSBAR_H_
#define _GUI_STATUSBAR_H_ #define _GUI_STATUSBAR_H_
#include "config.h"
#include "status.h" #include "status.h"
#include "screen_access.h" #include "screen_access.h"
#include "button.h"
#define STATUSBAR_X_POS 0 #define STATUSBAR_X_POS 0
#define STATUSBAR_Y_POS 0 /* MUST be a multiple of 8 */ #define STATUSBAR_Y_POS 0 /* MUST be a multiple of 8 */
@ -75,12 +73,6 @@ struct gui_statusbar
extern struct gui_syncstatusbar statusbars; extern struct gui_syncstatusbar statusbars;
/*
* Initializes a status bar
* - bar : the bar to initialize
*/
extern void gui_statusbar_init(struct gui_statusbar * bar);
/* /*
* Attach the status bar to a screen * Attach the status bar to a screen
* (The previous screen attachement is lost) * (The previous screen attachement is lost)
@ -97,22 +89,6 @@ extern void gui_statusbar_init(struct gui_statusbar * bar);
*/ */
extern void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw); extern void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw);
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);
void gui_statusbar_icon_shuffle(struct screen * display);
void gui_statusbar_icon_lock(struct screen * display);
void gui_statusbar_icon_lock_remote(struct screen * display);
void gui_statusbar_led(struct screen * display);
#ifdef HAVE_RECORDING
void gui_statusbar_icon_recording_info(struct screen * display);
#endif
#ifdef CONFIG_RTC
void gui_statusbar_time(struct screen * display, int hour, int minute);
#endif
struct gui_syncstatusbar struct gui_syncstatusbar
{ {