summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2006-12-13 11:52:21 +0000
committerNils Wallménius <nils@rockbox.org>2006-12-13 11:52:21 +0000
commit20338ca60dffd886ec75461072d590939ed62569 (patch)
treecbc5667766304f6597eb78a4ad48e295ddc8484a
parent5d9adb1c3c7dad4c4624ed5ec0f63b7d79833f47 (diff)
downloadrockbox-20338ca60dffd886ec75461072d590939ed62569.tar.gz
rockbox-20338ca60dffd886ec75461072d590939ed62569.zip
Removed unused button defines and made private functions static
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11750 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/gwps.c21
-rw-r--r--apps/gui/gwps.h278
2 files changed, 18 insertions, 281 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c
index 9dabe2c733..ec9a5351ea 100644
--- a/apps/gui/gwps.c
+++ b/apps/gui/gwps.c
@@ -68,6 +68,17 @@ static struct wps_data wps_datas[NB_SCREENS];
/* change the path to the current played track */
static void wps_state_update_ctp(const char *path);
+/* initial setup of wps_data */
+static void wps_state_init(void);
+/* initial setup of a wps */
+static void gui_wps_init(struct gui_wps *gui_wps);
+/* connects a wps with a format-description of the displayed content */
+static void gui_wps_set_data(struct gui_wps *gui_wps, struct wps_data *data);
+/* connects a wps with a screen */
+static void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display);
+/* connects a wps with a statusbar*/
+static void gui_wps_set_statusbar(struct gui_wps *gui_wps, struct gui_statusbar *statusbar);
+
#ifdef HAVE_LCD_BITMAP
static void gui_wps_set_margin(struct gui_wps *gwps)
@@ -787,7 +798,7 @@ bool wps_data_load(struct wps_data *wps_data,
/* wps_state */
-void wps_state_init(void)
+static void wps_state_init(void)
{
wps_state.ff_rewind = false;
wps_state.paused = false;
@@ -823,7 +834,7 @@ static void wps_state_update_ctp(const char *path)
/* wps_state end*/
/* initial setup of a wps */
-void gui_wps_init(struct gui_wps *gui_wps)
+static void gui_wps_init(struct gui_wps *gui_wps)
{
gui_wps->data = NULL;
gui_wps->display = NULL;
@@ -834,18 +845,18 @@ void gui_wps_init(struct gui_wps *gui_wps)
}
/* connects a wps with a format-description of the displayed content */
-void gui_wps_set_data(struct gui_wps *gui_wps, struct wps_data *data)
+static void gui_wps_set_data(struct gui_wps *gui_wps, struct wps_data *data)
{
gui_wps->data = data;
}
/* connects a wps with a screen */
-void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display)
+static void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display)
{
gui_wps->display = display;
}
-void gui_wps_set_statusbar(struct gui_wps *gui_wps, struct gui_statusbar *statusbar)
+static void gui_wps_set_statusbar(struct gui_wps *gui_wps, struct gui_statusbar *statusbar)
{
gui_wps->statusbar = statusbar;
}
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index 0e298bca74..ff4e128d4e 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -24,267 +24,6 @@
#include "id3.h"
#include "playlist.h"
-
-/* button definitions */
-#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
- (CONFIG_KEYPAD == IRIVER_H300_PAD)
-#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL)
-#define WPS_NEXT_PRE BUTTON_RIGHT
-#define WPS_PREV (BUTTON_LEFT | BUTTON_REL)
-#define WPS_PREV_PRE BUTTON_LEFT
-#define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT)
-#define WPS_REW (BUTTON_LEFT | BUTTON_REPEAT)
-#define WPS_INCVOL BUTTON_UP
-#define WPS_DECVOL BUTTON_DOWN
-#define WPS_PAUSE (BUTTON_ON | BUTTON_REL)
-#define WPS_PAUSE_PRE BUTTON_ON
-#define WPS_MENU (BUTTON_MODE | BUTTON_REL)
-#define WPS_MENU_PRE BUTTON_MODE
-#define WPS_BROWSE (BUTTON_SELECT | BUTTON_REL)
-#define WPS_BROWSE_PRE BUTTON_SELECT
-#define WPS_EXIT (BUTTON_OFF | BUTTON_REL)
-#define WPS_EXIT_PRE BUTTON_OFF
-#define WPS_ID3 (BUTTON_MODE | BUTTON_ON)
-#define WPS_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT)
-#define WPS_QUICK (BUTTON_MODE | BUTTON_REPEAT)
-#define WPS_NEXT_DIR (BUTTON_RIGHT | BUTTON_ON)
-#define WPS_PREV_DIR (BUTTON_LEFT | BUTTON_ON)
-
-#define WPS_RC_NEXT_DIR BUTTON_RC_BITRATE
-#define WPS_RC_PREV_DIR BUTTON_RC_SOURCE
-#define WPS_RC_NEXT (BUTTON_RC_FF | BUTTON_REL)
-#define WPS_RC_NEXT_PRE BUTTON_RC_FF
-#define WPS_RC_PREV (BUTTON_RC_REW | BUTTON_REL)
-#define WPS_RC_PREV_PRE BUTTON_RC_REW
-#define WPS_RC_FFWD (BUTTON_RC_FF | BUTTON_REPEAT)
-#define WPS_RC_REW (BUTTON_RC_REW | BUTTON_REPEAT)
-#define WPS_RC_PAUSE BUTTON_RC_ON
-#define WPS_RC_INCVOL BUTTON_RC_VOL_UP
-#define WPS_RC_DECVOL BUTTON_RC_VOL_DOWN
-#define WPS_RC_EXIT (BUTTON_RC_STOP | BUTTON_REL)
-#define WPS_RC_EXIT_PRE BUTTON_RC_STOP
-#define WPS_RC_MENU (BUTTON_RC_MODE | BUTTON_REL)
-#define WPS_RC_MENU_PRE BUTTON_RC_MODE
-#define WPS_RC_BROWSE (BUTTON_RC_MENU | BUTTON_REL)
-#define WPS_RC_BROWSE_PRE BUTTON_RC_MENU
-#define WPS_RC_CONTEXT (BUTTON_RC_MENU | BUTTON_REPEAT)
-#define WPS_RC_QUICK (BUTTON_RC_MODE | BUTTON_REPEAT)
-
-#ifdef AB_REPEAT_ENABLE
-#define WPS_AB_SHARE_DIR_BUTTONS
-#define WPS_AB_RESET_AB_MARKERS (BUTTON_ON | BUTTON_SELECT)
-#endif
-
-#define HAVE_DIR_NAVIGATION
-
-#elif CONFIG_KEYPAD == RECORDER_PAD
-#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL)
-#define WPS_NEXT_PRE BUTTON_RIGHT
-#define WPS_PREV (BUTTON_LEFT | BUTTON_REL)
-#define WPS_PREV_PRE BUTTON_LEFT
-#define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT)
-#define WPS_REW (BUTTON_LEFT | BUTTON_REPEAT)
-#define WPS_INCVOL BUTTON_UP
-#define WPS_DECVOL BUTTON_DOWN
-#define WPS_PAUSE_PRE BUTTON_PLAY
-#define WPS_PAUSE (BUTTON_PLAY | BUTTON_REL)
-#define WPS_MENU (BUTTON_F1 | BUTTON_REL)
-#define WPS_MENU_PRE BUTTON_F1
-#define WPS_BROWSE (BUTTON_ON | BUTTON_REL)
-#define WPS_BROWSE_PRE BUTTON_ON
-#define WPS_EXIT BUTTON_OFF
-#define WPS_KEYLOCK (BUTTON_F1 | BUTTON_DOWN)
-#define WPS_ID3 (BUTTON_F1 | BUTTON_ON)
-#define WPS_CONTEXT (BUTTON_PLAY | BUTTON_REPEAT)
-#define WPS_QUICK BUTTON_F2
-
-#ifdef AB_REPEAT_ENABLE
-#define WPS_AB_SET_A_MARKER (BUTTON_ON | BUTTON_LEFT)
-#define WPS_AB_SET_B_MARKER (BUTTON_ON | BUTTON_RIGHT)
-#define WPS_AB_RESET_AB_MARKERS (BUTTON_ON | BUTTON_OFF)
-#endif
-
-#define WPS_RC_NEXT BUTTON_RC_RIGHT
-#define WPS_RC_PREV BUTTON_RC_LEFT
-#define WPS_RC_PAUSE BUTTON_RC_PLAY
-#define WPS_RC_INCVOL BUTTON_RC_VOL_UP
-#define WPS_RC_DECVOL BUTTON_RC_VOL_DOWN
-#define WPS_RC_EXIT BUTTON_RC_STOP
-
-#elif CONFIG_KEYPAD == PLAYER_PAD
-#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL)
-#define WPS_NEXT_PRE BUTTON_RIGHT
-#define WPS_PREV (BUTTON_LEFT | BUTTON_REL)
-#define WPS_PREV_PRE BUTTON_LEFT
-#define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT)
-#define WPS_REW (BUTTON_LEFT | BUTTON_REPEAT)
-#define WPS_INCVOL (BUTTON_MENU | BUTTON_RIGHT)
-#define WPS_DECVOL (BUTTON_MENU | BUTTON_LEFT)
-#define WPS_PAUSE_PRE BUTTON_PLAY
-#define WPS_PAUSE (BUTTON_PLAY | BUTTON_REL)
-#define WPS_MENU (BUTTON_MENU | BUTTON_REL)
-#define WPS_MENU_PRE BUTTON_MENU
-#define WPS_BROWSE (BUTTON_ON | BUTTON_REL)
-#define WPS_BROWSE_PRE BUTTON_ON
-#define WPS_EXIT BUTTON_STOP
-#define WPS_KEYLOCK (BUTTON_MENU | BUTTON_STOP)
-#define WPS_ID3 (BUTTON_MENU | BUTTON_ON)
-#define WPS_CONTEXT (BUTTON_PLAY | BUTTON_REPEAT)
-
-#ifdef AB_REPEAT_ENABLE
-#define WPS_AB_SET_A_MARKER (BUTTON_ON | BUTTON_LEFT)
-#define WPS_AB_SET_B_MARKER (BUTTON_ON | BUTTON_RIGHT)
-#define WPS_AB_RESET_AB_MARKERS (BUTTON_ON | BUTTON_STOP)
-#endif
-
-#define WPS_RC_NEXT BUTTON_RC_RIGHT
-#define WPS_RC_PREV BUTTON_RC_LEFT
-#define WPS_RC_PAUSE BUTTON_RC_PLAY
-#define WPS_RC_INCVOL BUTTON_RC_VOL_UP
-#define WPS_RC_DECVOL BUTTON_RC_VOL_DOWN
-#define WPS_RC_EXIT BUTTON_RC_STOP
-
-#elif CONFIG_KEYPAD == ONDIO_PAD
-#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL)
-#define WPS_NEXT_PRE BUTTON_RIGHT
-#define WPS_PREV (BUTTON_LEFT | BUTTON_REL)
-#define WPS_PREV_PRE BUTTON_LEFT
-#define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT)
-#define WPS_REW (BUTTON_LEFT | BUTTON_REPEAT)
-#define WPS_INCVOL BUTTON_UP
-#define WPS_DECVOL BUTTON_DOWN
-#define WPS_PAUSE BUTTON_OFF
-/* #define WPS_MENU Ondio can't have both main menu and context menu in wps */
-#define WPS_BROWSE (BUTTON_MENU | BUTTON_REL)
-#define WPS_BROWSE_PRE BUTTON_MENU
-#define WPS_KEYLOCK (BUTTON_MENU | BUTTON_DOWN)
-#define WPS_EXIT (BUTTON_OFF | BUTTON_REPEAT)
-#define WPS_CONTEXT (BUTTON_MENU | BUTTON_REPEAT)
-
-#elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD)
-
-/* TODO: Check WPS button assignments */
-
-#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL)
-#define WPS_NEXT_PRE BUTTON_RIGHT
-#define WPS_PREV (BUTTON_LEFT | BUTTON_REL)
-#define WPS_PREV_PRE BUTTON_LEFT
-#define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT)
-#define WPS_REW (BUTTON_LEFT | BUTTON_REPEAT)
-#define WPS_INCVOL BUTTON_SCROLL_FWD
-#define WPS_DECVOL BUTTON_SCROLL_BACK
-#define WPS_PAUSE BUTTON_PLAY | BUTTON_REL
-#define WPS_MENU (BUTTON_MENU | BUTTON_REL)
-#define WPS_MENU_PRE BUTTON_MENU
-#define WPS_BROWSE (BUTTON_SELECT | BUTTON_REL)
-#define WPS_BROWSE_PRE BUTTON_SELECT
-#define WPS_EXIT (BUTTON_PLAY | BUTTON_REPEAT)
-#define WPS_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT)
-#define WPS_QUICK (BUTTON_MENU | BUTTON_REPEAT)
-
-#define WPS_NEXT_DIR (BUTTON_SELECT | BUTTON_RIGHT)
-#define WPS_PREV_DIR (BUTTON_SELECT | BUTTON_LEFT)
-
-#ifdef AB_REPEAT_ENABLE
-#define WPS_AB_SET_A_MARKER (BUTTON_MENU | BUTTON_LEFT)
-#define WPS_AB_SET_B_MARKER (BUTTON_MENU | BUTTON_RIGHT)
-#define WPS_AB_RESET_AB_MARKERS (BUTTON_LEFT | BUTTON_RIGHT)
-#endif
-
-#define HAVE_DIR_NAVIGATION
-
-#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
-
-/* TODO: Check WPS button assignments */
-
-#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL)
-#define WPS_NEXT_PRE BUTTON_RIGHT
-#define WPS_PREV (BUTTON_LEFT | BUTTON_REL)
-#define WPS_PREV_PRE BUTTON_LEFT
-#define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT)
-#define WPS_REW (BUTTON_LEFT | BUTTON_REPEAT)
-#define WPS_INCVOL BUTTON_UP
-#define WPS_DECVOL BUTTON_DOWN
-#define WPS_PAUSE BUTTON_PLAY
-/* #define WPS_MENU iFP7xx can't have both main menu and context menu in wps */
-#define WPS_BROWSE (BUTTON_SELECT | BUTTON_REL)
-#define WPS_BROWSE_PRE BUTTON_SELECT
-#define WPS_EXIT (BUTTON_PLAY | BUTTON_REPEAT)
-#define WPS_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT)
-
-#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
-
-/* TODO: Check WPS button assignments */
-
-#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL)
-#define WPS_NEXT_PRE BUTTON_RIGHT
-#define WPS_PREV (BUTTON_LEFT | BUTTON_REL)
-#define WPS_PREV_PRE BUTTON_LEFT
-#define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT)
-#define WPS_REW (BUTTON_LEFT | BUTTON_REPEAT)
-#define WPS_INCVOL BUTTON_UP
-#define WPS_DECVOL BUTTON_DOWN
-#define WPS_PAUSE BUTTON_PLAY
-#define WPS_MENU (BUTTON_REC|BUTTON_REL)
-#define WPS_MENU_PRE BUTTON_REC
-#define WPS_BROWSE (BUTTON_SELECT | BUTTON_REL)
-#define WPS_BROWSE_PRE BUTTON_SELECT
-#define WPS_EXIT (BUTTON_PLAY | BUTTON_REPEAT)
-#define WPS_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT)
-#define WPS_QUICK (BUTTON_REC | BUTTON_REPEAT)
-
-#define HAVE_DIR_NAVIGATION
-
-#elif CONFIG_KEYPAD == GIGABEAT_PAD
-
-#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL)
-#define WPS_NEXT_PRE BUTTON_RIGHT
-#define WPS_PREV (BUTTON_LEFT | BUTTON_REL)
-#define WPS_PREV_PRE BUTTON_LEFT
-#define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT)
-#define WPS_REW (BUTTON_LEFT | BUTTON_REPEAT)
-#define WPS_INCVOL BUTTON_UP
-#define WPS_DECVOL BUTTON_DOWN
-#define WPS_PAUSE (BUTTON_POWER | BUTTON_REL)
-#define WPS_PAUSE_PRE BUTTON_POWER
-#define WPS_MENU (BUTTON_MENU | BUTTON_REL)
-#define WPS_MENU_PRE BUTTON_MENU
-#define WPS_BROWSE (BUTTON_SELECT | BUTTON_REL)
-#define WPS_BROWSE_PRE BUTTON_SELECT
-#define WPS_EXIT BUTTON_A
-#define WPS_ID3 (BUTTON_MENU | BUTTON_POWER)
-#define WPS_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT)
-#define WPS_QUICK (BUTTON_MENU | BUTTON_REPEAT)
-#define WPS_NEXT_DIR (BUTTON_RIGHT | BUTTON_POWER)
-#define WPS_PREV_DIR (BUTTON_LEFT | BUTTON_POWER)
-
-#define HAVE_DIR_NAVIGATION
-
-#elif CONFIG_KEYPAD == IRIVER_H10_PAD
-
-/* TODO: Check WPS button assignments */
-
-#define WPS_NEXT (BUTTON_FF | BUTTON_REL)
-#define WPS_NEXT_PRE BUTTON_FF
-#define WPS_PREV (BUTTON_REW | BUTTON_REL)
-#define WPS_PREV_PRE BUTTON_REW
-#define WPS_FFWD (BUTTON_FF | BUTTON_REPEAT)
-#define WPS_REW (BUTTON_REW | BUTTON_REPEAT)
-#define WPS_INCVOL BUTTON_SCROLL_UP
-#define WPS_DECVOL BUTTON_SCROLL_DOWN
-#define WPS_PAUSE BUTTON_PLAY
-#define WPS_MENU (BUTTON_RIGHT | BUTTON_REL)
-#define WPS_MENU_PRE BUTTON_RIGHT
-#define WPS_BROWSE (BUTTON_LEFT | BUTTON_REL)
-#define WPS_BROWSE_PRE BUTTON_LEFT
-#define WPS_EXIT (BUTTON_PLAY | BUTTON_REPEAT)
-#define WPS_CONTEXT (BUTTON_LEFT | BUTTON_REPEAT)
-#define WPS_QUICK (BUTTON_RIGHT | BUTTON_REPEAT)
-
-#define HAVE_DIR_NAVIGATION
-
-#endif
-
/* constants used in line_type and as refresh_mode for wps_refresh */
#define WPS_REFRESH_STATIC 1 /* line doesn't change over time */
#define WPS_REFRESH_DYNAMIC 2 /* line may change (e.g. time flag) */
@@ -397,17 +136,15 @@ struct wps_state
char current_track_path[MAX_PATH+1];
};
-/* initial setup of wps_data */
-void wps_state_init(void);
/* change the ff/rew-status
if ff_rew = true then we are in skipping mode
else we are in normal mode */
-void wps_state_update_ff_rew(bool ff_rew);
+/* void wps_state_update_ff_rew(bool ff_rew); Currently unused */
/* change the tag-information of the current played track
and the following track */
-void wps_state_update_id3_nid3(struct mp3entry *id3, struct mp3entry *nid3);
+/* void wps_state_update_id3_nid3(struct mp3entry *id3, struct mp3entry *nid3); Currently unused */
/* wps_state end*/
/* gui_wps
@@ -421,17 +158,6 @@ struct gui_wps
struct gui_statusbar *statusbar;
};
-/* initial setup of a wps */
-void gui_wps_init(struct gui_wps *gui_wps);
-
-/* connects a wps with a format-description of the displayed content */
-void gui_wps_set_data(struct gui_wps *gui_wps, struct wps_data *data);
-
-/* connects a wps with a screen */
-void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display);
-
-/* connects a wps with a statusbar*/
-void gui_wps_set_statusbar(struct gui_wps *gui_wps, struct gui_statusbar *statusbar);
/* gui_wps end */
long gui_wps_show(void);