Index: proxy/src/api.h =================================================================== --- proxy/src/api.h (revision 73) +++ proxy/src/api.h (working copy) @@ -59,6 +59,8 @@ int (*read_bmp_file)(const char* filename,int *width, int *height); void (*set_wpsstate)(struct wpsstate state); void (*set_mp3state)(struct mp3state state); + void (*set_next_mp3state)(struct mp3state state); + void (*set_audio_status)(int status); pfdebugf debugf; int verbose; Index: proxy/src/wpsstate.h =================================================================== --- proxy/src/wpsstate.h (revision 73) +++ proxy/src/wpsstate.h (working copy) @@ -29,5 +29,6 @@ int fontheight; int fontwidth; int battery_level; + int audio_status; }; #endif Index: proxy/src/proxy.c =================================================================== --- proxy/src/proxy.c (revision 73) +++ proxy/src/proxy.c (working copy) @@ -12,6 +12,7 @@ struct wps_data wpsdata; struct gui_wps gwps; struct mp3entry id3; +struct mp3entry nid3; int wps_init(const char* filename,struct proxy_api *api, bool isfile){ @@ -30,13 +31,12 @@ } DEBUGF1("WPS parsed OK\n"); DEBUGF1("\n-------------------------------------------------\n"); - //id3.artist = "artist"; - //id3.title = "title"; wps_state.paused = true; gwps.data = &wpsdata; gwps.display = &screens[0]; gwps.state = &wps_state; gwps.state->id3 = &id3; + gwps.state->nid3 = &nid3; gui_wps[0] = gwps; return res; } Index: proxy/src/dummies.c =================================================================== --- proxy/src/dummies.c (revision 73) +++ proxy/src/dummies.c (working copy) @@ -13,6 +13,8 @@ struct playlist_info current_playlist; struct font sysfont; int battery_percent = 100; +struct mp3entry current_song, next_song; +int _audio_status; charger_input_state_type charger_input_state; #if CONFIG_CHARGING >= CHARGING_MONITOR @@ -62,7 +64,10 @@ void audio_resume(void){} void audio_next(void){} void audio_prev(void){} -int audio_status(void){return 0;} +int audio_status(void) +{ + return _audio_status; +} #if CONFIG_CODEC == SWCODEC int audio_track_count(void){return 0;} /* SWCODEC only */ Index: proxy/src/dummies.h =================================================================== --- proxy/src/dummies.h (revision 73) +++ proxy/src/dummies.h (working copy) @@ -23,8 +23,13 @@ extern struct gui_syncstatusbar statusbars; extern struct playlist_info current_playlist; extern int battery_percent; +extern struct mp3entry current_song, next_song; +extern int _audio_status; charger_input_state_type charger_input_state; +#if CONFIG_CHARGING >= CHARGING_MONITOR +extern charge_state_type charge_state; +#endif #if defined(CPU_PP) && defined(BOOTLOADER) /* We don't enable interrupts in the iPod bootloader, so we need to fake Index: proxy/src/api.c =================================================================== --- proxy/src/api.c (revision 73) +++ proxy/src/api.c (working copy) @@ -74,8 +74,8 @@ DEBUGF3("update\n"); } -void clear_viewport(void) { - DEBUGF3("clear_viewport\n"); +void clear_viewport(int x, int y, int w, int h, int color) { + DEBUGF3("clear_viewport(int x=%d, int y=%d, int w=%d, int h=%d, int color=%d)\n", x, y, w, h, color); }; int getstringsize(const unsigned char *str, int *w, int *h) { @@ -90,6 +90,7 @@ sysfont.maxwidth = state.fontwidth; global_settings.volume = state.volume; battery_percent = state.battery_level; + _audio_status = state.audio_status; } void set_mp3state(struct mp3state state){ @@ -100,6 +101,20 @@ gui_wps[0].state->id3->length = state.length; } +void set_next_mp3state(struct mp3state state) +{ + gui_wps[0].state->nid3->title = state.title; + gui_wps[0].state->nid3->artist = state.artist; + gui_wps[0].state->nid3->album = state.album; + gui_wps[0].state->nid3->elapsed = state.elapsed; + gui_wps[0].state->nid3->length = state.length; +} + +void set_audio_status(int status) +{ + _audio_status = status; +} + void test_api(struct proxy_api *api) { if (!api->stop_scroll) api->stop_scroll=stop_scroll; @@ -208,6 +223,8 @@ api->get_current_vp = get_current_vp; api->set_wpsstate = set_wpsstate; api->set_mp3state = set_mp3state; + api->set_next_mp3state= set_next_mp3state; + api->set_audio_status= set_audio_status; xapi = api; return 0; }