summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-02-24 11:07:21 +0000
committerNils Wallménius <nils@rockbox.org>2007-02-24 11:07:21 +0000
commitf67a95330c8493deffab23cf38f0b240b0a1ba9c (patch)
treeb442f4ccf022331fe51774d6c8a1577986843412
parentd39b6ea1dcdcf3e62263f3384c57847d51212726 (diff)
downloadrockbox-f67a95330c8493deffab23cf38f0b240b0a1ba9c.tar.gz
rockbox-f67a95330c8493deffab23cf38f0b240b0a1ba9c.zip
Make private functions 'static'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12470 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/statusbar.c58
-rw-r--r--apps/gui/statusbar.h24
2 files changed, 42 insertions, 40 deletions
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index 0086abb484..c5f1b3e384 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -17,19 +17,15 @@
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19 19
20#include "config.h"
21#include "screen_access.h" 20#include "screen_access.h"
22#include "lcd.h"
23#include "font.h" 21#include "font.h"
24#include "kernel.h" 22#include "kernel.h"
25#include "string.h" /* for memcmp oO*/ 23#include "string.h" /* for memcmp oO*/
26#include "sprintf.h" 24#include "sprintf.h"
27#include "sound.h" 25#include "sound.h"
28#include "power.h"
29#include "settings.h" 26#include "settings.h"
30#include "icons.h" 27#include "icons.h"
31#include "powermgmt.h" 28#include "powermgmt.h"
32#include "button.h"
33#include "usb.h" 29#include "usb.h"
34#include "led.h" 30#include "led.h"
35 31
@@ -127,7 +123,37 @@
127 STATUSBAR_DISK_WIDTH 123 STATUSBAR_DISK_WIDTH
128struct gui_syncstatusbar statusbars; 124struct gui_syncstatusbar statusbars;
129 125
130void gui_statusbar_init(struct gui_statusbar * bar) 126/* Prototypes */
127#ifdef HAVE_LCD_BITMAP
128static void gui_statusbar_icon_battery(struct screen * display, int percent,
129 int batt_charge_step);
130static bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume);
131static void gui_statusbar_icon_play_state(struct screen * display, int state);
132static void gui_statusbar_icon_play_mode(struct screen * display, int mode);
133static void gui_statusbar_icon_shuffle(struct screen * display);
134static void gui_statusbar_icon_lock(struct screen * display);
135#ifdef HAS_REMOTE_BUTTON_HOLD
136static void gui_statusbar_icon_lock_remote(struct screen * display);
137#endif
138#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
139static void gui_statusbar_led(struct screen * display);
140#endif
141#ifdef HAVE_RECORDING
142static void gui_statusbar_icon_recording_info(struct screen * display);
143#endif
144#ifdef CONFIG_RTC
145static void gui_statusbar_time(struct screen * display, int hour, int minute);
146#endif
147#endif
148
149/* End prototypes */
150
151
152/*
153 * Initializes a status bar
154 * - bar : the bar to initialize
155 */
156static void gui_statusbar_init(struct gui_statusbar * bar)
131{ 157{
132 bar->redraw_volume = true; 158 bar->redraw_volume = true;
133 bar->volume_icon_switch_tick = bar->battery_icon_switch_tick = current_tick; 159 bar->volume_icon_switch_tick = bar->battery_icon_switch_tick = current_tick;
@@ -348,8 +374,8 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
348/* 374/*
349 * Print battery icon to status bar 375 * Print battery icon to status bar
350 */ 376 */
351void gui_statusbar_icon_battery(struct screen * display, int percent, 377static void gui_statusbar_icon_battery(struct screen * display, int percent,
352 int batt_charge_step) 378 int batt_charge_step)
353{ 379{
354 int fill, endfill; 380 int fill, endfill;
355 char buffer[5]; 381 char buffer[5];
@@ -426,7 +452,7 @@ void gui_statusbar_icon_battery(struct screen * display, int percent,
426/* 452/*
427 * Print volume gauge to status bar 453 * Print volume gauge to status bar
428 */ 454 */
429bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume) 455static bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume)
430{ 456{
431 int i; 457 int i;
432 int vol; 458 int vol;
@@ -492,7 +518,7 @@ bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume)
492/* 518/*
493 * Print play state to status bar 519 * Print play state to status bar
494 */ 520 */
495void gui_statusbar_icon_play_state(struct screen * display, int state) 521static void gui_statusbar_icon_play_state(struct screen * display, int state)
496{ 522{
497 display->mono_bitmap(bitmap_icons_7x8[state], STATUSBAR_PLAY_STATE_X_POS, 523 display->mono_bitmap(bitmap_icons_7x8[state], STATUSBAR_PLAY_STATE_X_POS,
498 STATUSBAR_Y_POS, STATUSBAR_PLAY_STATE_WIDTH, 524 STATUSBAR_Y_POS, STATUSBAR_PLAY_STATE_WIDTH,
@@ -502,7 +528,7 @@ void gui_statusbar_icon_play_state(struct screen * display, int state)
502/* 528/*
503 * Print play mode to status bar 529 * Print play mode to status bar
504 */ 530 */
505void gui_statusbar_icon_play_mode(struct screen * display, int mode) 531static void gui_statusbar_icon_play_mode(struct screen * display, int mode)
506{ 532{
507 display->mono_bitmap(bitmap_icons_7x8[mode], STATUSBAR_PLAY_MODE_X_POS, 533 display->mono_bitmap(bitmap_icons_7x8[mode], STATUSBAR_PLAY_MODE_X_POS,
508 STATUSBAR_Y_POS, STATUSBAR_PLAY_MODE_WIDTH, 534 STATUSBAR_Y_POS, STATUSBAR_PLAY_MODE_WIDTH,
@@ -512,7 +538,7 @@ void gui_statusbar_icon_play_mode(struct screen * display, int mode)
512/* 538/*
513 * Print shuffle mode to status bar 539 * Print shuffle mode to status bar
514 */ 540 */
515void gui_statusbar_icon_shuffle(struct screen * display) 541static void gui_statusbar_icon_shuffle(struct screen * display)
516{ 542{
517 display->mono_bitmap(bitmap_icons_7x8[Icon_Shuffle], 543 display->mono_bitmap(bitmap_icons_7x8[Icon_Shuffle],
518 STATUSBAR_SHUFFLE_X_POS, STATUSBAR_Y_POS, 544 STATUSBAR_SHUFFLE_X_POS, STATUSBAR_Y_POS,
@@ -522,7 +548,7 @@ void gui_statusbar_icon_shuffle(struct screen * display)
522/* 548/*
523 * Print lock when keys are locked 549 * Print lock when keys are locked
524 */ 550 */
525void gui_statusbar_icon_lock(struct screen * display) 551static void gui_statusbar_icon_lock(struct screen * display)
526{ 552{
527 display->mono_bitmap(bitmap_icons_5x8[Icon_Lock_Main], 553 display->mono_bitmap(bitmap_icons_5x8[Icon_Lock_Main],
528 STATUSBAR_LOCKM_X_POS, STATUSBAR_Y_POS, 554 STATUSBAR_LOCKM_X_POS, STATUSBAR_Y_POS,
@@ -533,7 +559,7 @@ void gui_statusbar_icon_lock(struct screen * display)
533/* 559/*
534 * Print remote lock when remote hold is enabled 560 * Print remote lock when remote hold is enabled
535 */ 561 */
536void gui_statusbar_icon_lock_remote(struct screen * display) 562static void gui_statusbar_icon_lock_remote(struct screen * display)
537{ 563{
538 display->mono_bitmap(bitmap_icons_5x8[Icon_Lock_Remote], 564 display->mono_bitmap(bitmap_icons_5x8[Icon_Lock_Remote],
539 STATUSBAR_LOCKR_X_POS, STATUSBAR_Y_POS, 565 STATUSBAR_LOCKR_X_POS, STATUSBAR_Y_POS,
@@ -545,7 +571,7 @@ void gui_statusbar_icon_lock_remote(struct screen * display)
545/* 571/*
546 * no real LED: disk activity in status bar 572 * no real LED: disk activity in status bar
547 */ 573 */
548void gui_statusbar_led(struct screen * display) 574static void gui_statusbar_led(struct screen * display)
549{ 575{
550 display->mono_bitmap(bitmap_icon_disk, 576 display->mono_bitmap(bitmap_icon_disk,
551 STATUSBAR_DISK_X_POS(display->width), 577 STATUSBAR_DISK_X_POS(display->width),
@@ -558,7 +584,7 @@ void gui_statusbar_led(struct screen * display)
558/* 584/*
559 * Print time to status bar 585 * Print time to status bar
560 */ 586 */
561void gui_statusbar_time(struct screen * display, int hour, int minute) 587static void gui_statusbar_time(struct screen * display, int hour, int minute)
562{ 588{
563 unsigned char buffer[6]; 589 unsigned char buffer[6];
564 unsigned int width, height; 590 unsigned int width, height;
@@ -684,7 +710,7 @@ static void gui_statusbar_write_samplerate_info(struct screen * display)
684} 710}
685#endif /* CONFIG_CODEC == SWCODEC */ 711#endif /* CONFIG_CODEC == SWCODEC */
686 712
687void gui_statusbar_icon_recording_info(struct screen * display) 713static void gui_statusbar_icon_recording_info(struct screen * display)
688{ 714{
689#if CONFIG_CODEC != SWCODEC 715#if CONFIG_CODEC != SWCODEC
690 char buffer[3]; 716 char buffer[3];
diff --git a/apps/gui/statusbar.h b/apps/gui/statusbar.h
index 9269a7efe1..11b8765b77 100644
--- a/apps/gui/statusbar.h
+++ b/apps/gui/statusbar.h
@@ -20,10 +20,8 @@
20#ifndef _GUI_STATUSBAR_H_ 20#ifndef _GUI_STATUSBAR_H_
21#define _GUI_STATUSBAR_H_ 21#define _GUI_STATUSBAR_H_
22 22
23#include "config.h"
24#include "status.h" 23#include "status.h"
25#include "screen_access.h" 24#include "screen_access.h"
26#include "button.h"
27 25
28#define STATUSBAR_X_POS 0 26#define STATUSBAR_X_POS 0
29#define STATUSBAR_Y_POS 0 /* MUST be a multiple of 8 */ 27#define STATUSBAR_Y_POS 0 /* MUST be a multiple of 8 */
@@ -76,12 +74,6 @@ struct gui_statusbar
76extern struct gui_syncstatusbar statusbars; 74extern struct gui_syncstatusbar statusbars;
77 75
78/* 76/*
79 * Initializes a status bar
80 * - bar : the bar to initialize
81 */
82extern void gui_statusbar_init(struct gui_statusbar * bar);
83
84/*
85 * Attach the status bar to a screen 77 * Attach the status bar to a screen
86 * (The previous screen attachement is lost) 78 * (The previous screen attachement is lost)
87 * - bar : the statusbar structure 79 * - bar : the statusbar structure
@@ -97,22 +89,6 @@ extern void gui_statusbar_init(struct gui_statusbar * bar);
97 */ 89 */
98extern void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw); 90extern void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw);
99 91
100void gui_statusbar_icon_battery(struct screen * display, int percent, int batt_charge_step);
101bool gui_statusbar_icon_volume(struct gui_statusbar * bar, int volume);
102void gui_statusbar_icon_play_state(struct screen * display, int state);
103void gui_statusbar_icon_play_mode(struct screen * display, int mode);
104void gui_statusbar_icon_shuffle(struct screen * display);
105void gui_statusbar_icon_lock(struct screen * display);
106void gui_statusbar_icon_lock_remote(struct screen * display);
107void gui_statusbar_led(struct screen * display);
108#ifdef HAVE_RECORDING
109void gui_statusbar_icon_recording_info(struct screen * display);
110#endif
111
112#ifdef CONFIG_RTC
113void gui_statusbar_time(struct screen * display, int hour, int minute);
114#endif
115
116 92
117struct gui_syncstatusbar 93struct gui_syncstatusbar
118{ 94{