From 1c5d0b41eebdb4f8c627b1a0e5f7b699f0b08fb8 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 3 Apr 2013 16:33:23 +0200 Subject: scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api. Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c --- apps/debug_menu.c | 2 +- apps/gui/bitmap/list-skinned.c | 4 ++-- apps/gui/bitmap/list.c | 10 +++++----- apps/gui/charcell/list.c | 2 +- apps/gui/quickscreen.c | 4 ++-- apps/gui/skin_engine/skin_render.c | 5 ++--- apps/gui/splash.c | 2 +- apps/gui/usb_screen.c | 4 ++-- apps/gui/viewport.c | 2 +- apps/gui/wps.c | 6 +++--- apps/gui/yesno.c | 4 ++-- apps/plugin.c | 4 ++-- apps/plugin.h | 5 +++-- apps/plugins/boomshine.lua | 2 +- apps/plugins/chessclock.c | 2 +- apps/plugins/lrcplayer.c | 2 +- apps/plugins/resistor.c | 6 +++--- apps/plugins/splitedit.c | 2 +- apps/plugins/superdom.c | 2 +- apps/radio/radio_skin.c | 2 +- apps/screen_access.c | 8 ++++---- apps/screen_access.h | 6 +++--- apps/screens.c | 4 ++-- apps/settings.c | 1 + apps/settings_list.c | 1 + 25 files changed, 47 insertions(+), 45 deletions(-) (limited to 'apps') diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 2f50a43825..6f7de6d54e 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -2084,7 +2084,7 @@ static bool cpu_boost_log(void) } } } - lcd_stop_scroll(); + lcd_scroll_stop(); get_action(CONTEXT_STD,TIMEOUT_BLOCK); lcd_setfont(FONT_UI); return false; diff --git a/apps/gui/bitmap/list-skinned.c b/apps/gui/bitmap/list-skinned.c index d0803b5dc8..d6b868ae26 100644 --- a/apps/gui/bitmap/list-skinned.c +++ b/apps/gui/bitmap/list-skinned.c @@ -54,7 +54,7 @@ void skinlist_set_cfg(enum screen_type screen, if (listcfg[screen] != cfg) { if (listcfg[screen]) - screens[screen].scroll_stop(&listcfg[screen]->selected_item_vp.vp); + screens[screen].scroll_stop_viewport(&listcfg[screen]->selected_item_vp.vp); listcfg[screen] = cfg; current_list = NULL; current_column = -1; @@ -269,7 +269,7 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list) /* force disableing scroll because it breaks later */ if (!is_selected) { - display->scroll_stop(&skin_viewport->vp); + display->scroll_stop_viewport(&skin_viewport->vp); skin_viewport->vp.x = original_x; skin_viewport->vp.y = original_y; } diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index 191446e186..79eec60b26 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c @@ -61,9 +61,9 @@ void gui_synclist_scroll_stop(struct gui_synclist *lists) { FOR_NB_SCREENS(i) { - screens[i].scroll_stop(&list_text[i]); - screens[i].scroll_stop(&title_text[i]); - screens[i].scroll_stop(lists->parent[i]); + screens[i].scroll_stop_viewport(&list_text[i]); + screens[i].scroll_stop_viewport(&title_text[i]); + screens[i].scroll_stop_viewport(lists->parent[i]); } } @@ -100,7 +100,7 @@ static bool draw_title(struct screen *display, struct gui_synclist *list) if (sb_set_title_text(list->title, list->title_icon, screen)) return false; /* the sbs is handling the title */ - display->scroll_stop(title_text_vp); + display->scroll_stop_viewport(title_text_vp); if (!list_display_title(list, screen)) return false; *title_text_vp = *(list->parent[screen]); @@ -160,7 +160,7 @@ void list_draw(struct screen *display, struct gui_synclist *list) line_height = parent->line_height; display->set_viewport(parent); display->clear_viewport(); - display->scroll_stop(list_text_vp); + display->scroll_stop_viewport(list_text_vp); *list_text_vp = *parent; list_text_vp->line_height = line_height; if ((show_title = draw_title(display, list))) diff --git a/apps/gui/charcell/list.c b/apps/gui/charcell/list.c index 3d7f876adc..753b8ff853 100644 --- a/apps/gui/charcell/list.c +++ b/apps/gui/charcell/list.c @@ -43,7 +43,7 @@ void gui_synclist_scroll_stop(struct gui_synclist *lists) (void)lists; FOR_NB_SCREENS(i) { - screens[i].stop_scroll(); + screens[i].scroll_stop(); } } diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index 5c8a7705ae..64d938d8aa 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c @@ -323,7 +323,7 @@ static bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_ente FOR_NB_SCREENS(i) { screens[i].set_viewport(NULL); - screens[i].stop_scroll(); + screens[i].scroll_stop(); viewportmanager_theme_enable(i, true, &parent[i]); quickscreen_fix_viewports(qs, &screens[i], &parent[i], vps[i], &vp_icons[i]); gui_quickscreen_draw(qs, &screens[i], &parent[i], vps[i], &vp_icons[i]); @@ -368,7 +368,7 @@ static bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_ente FOR_NB_SCREENS(i) { /* stop scrolling before exiting */ for (int j = 0; j < QUICKSCREEN_ITEM_COUNT; j++) - screens[i].scroll_stop(&vps[i][j]); + screens[i].scroll_stop_viewport(&vps[i][j]); viewportmanager_theme_undo(i, true); } diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c index d9424b993d..67f1f0f448 100644 --- a/apps/gui/skin_engine/skin_render.c +++ b/apps/gui/skin_engine/skin_render.c @@ -427,7 +427,6 @@ static void do_tags_in_hidden_conditional(struct skin_element* branch, #endif gwps->display->set_viewport(&skin_viewport->vp); gwps->display->clear_viewport(); - gwps->display->scroll_stop(&skin_viewport->vp); gwps->display->set_viewport(&info->skin_vp->vp); skin_viewport->hidden_flags |= VP_DRAW_HIDDEN; @@ -780,7 +779,7 @@ void skin_render_viewport(struct skin_element* viewport, struct gui_wps *gwps, if (refresh_type && needs_update) { if (info.force_redraw) - display->scroll_stop_line(&skin_viewport->vp, info.line_number); + display->scroll_stop_viewport_line(&skin_viewport->vp, info.line_number); write_line(display, align, info.line_number, info.line_scrolls, info.text_style); } @@ -969,7 +968,7 @@ void skin_render_playlistviewer(struct playlistviewer* viewer, if (refresh_type && needs_update) { if (!info.force_redraw) - display->scroll_stop_line(&skin_viewport->vp, info.line_number); + display->scroll_stop_viewport_line(&skin_viewport->vp, info.line_number); write_line(display, align, info.line_number, info.line_scrolls, info.text_style); } diff --git a/apps/gui/splash.c b/apps/gui/splash.c index ad6625fec6..2608a2e02e 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c @@ -133,7 +133,7 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap) * First boundaries, then the grey filling, then the black border and finally * the text*/ - screen->stop_scroll(); + screen->scroll_stop(); #ifdef HAVE_LCD_BITMAP diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c index a02516fefb..e5bc12960e 100644 --- a/apps/gui/usb_screen.c +++ b/apps/gui/usb_screen.c @@ -156,7 +156,7 @@ static void usb_screen_fix_viewports(struct screen *screen, disable = (parent->width < logo_width || parent->height < logo_height); viewportmanager_theme_enable(screen->screen_type, !disable, parent); screen->clear_display(); - screen->stop_scroll(); + screen->scroll_stop(); *logo = *parent; logo->x = parent->x + parent->width - logo_width; @@ -308,7 +308,7 @@ void gui_usb_screen_run(bool early_usb) vp = &usb_screen_vps_ar[i].parent; #endif if (vp) - screens[i].scroll_stop(vp); + screens[i].scroll_stop_viewport(vp); } #ifdef USB_ENABLE_HID if (global_settings.usb_keypad_mode != usb_keypad_mode) diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index 760e13cff7..0b5441e02b 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c @@ -178,7 +178,7 @@ static void toggle_theme(enum screen_type screen, bool force) #if LCD_DEPTH > 1 || (defined(LCD_REMOTE_DEPTH) && LCD_REMOTE_DEPTH > 1) screens[screen].backdrop_show(NULL); #endif - screens[screen].stop_scroll(); + screens[screen].scroll_stop(); skinlist_set_cfg(screen, NULL); } /* let list initialize viewport in case viewport dimensions is changed. */ diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 726df6add4..b4c3f40e9f 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -358,7 +358,7 @@ bool ffwd_rew(int button) #endif #if CONFIG_KEYPAD == PLAYER_PAD FOR_NB_SCREENS(i) - skin_get_gwps(WPS, i)->display->stop_scroll(); + skin_get_gwps(WPS, i)->display->scroll_stop(); #endif if (direction > 0) status_set_ffmode(STATUS_FASTFORWARD); @@ -639,7 +639,7 @@ static void gwps_leave_wps(void) { FOR_NB_SCREENS(i) { - skin_get_gwps(WPS, i)->display->stop_scroll(); + skin_get_gwps(WPS, i)->display->scroll_stop(); #ifdef HAVE_BACKDROP_IMAGE skin_backdrop_show(sb_get_backdrop(i)); #endif @@ -668,7 +668,7 @@ static void gwps_enter_wps(void) { gwps = skin_get_gwps(WPS, i); display = gwps->display; - display->stop_scroll(); + display->scroll_stop(); viewportmanager_theme_enable(i, skin_has_sbs(i, skin_get_gwps(WPS, i)->data), NULL); /* Update the values in the first (default) viewport - in case the user diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c index 74e3ad05a7..b754d5e477 100644 --- a/apps/gui/yesno.c +++ b/apps/gui/yesno.c @@ -166,7 +166,7 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message, #else viewportmanager_theme_enable(i, true, yn[i].vp); #endif - screens[i].stop_scroll(); + screens[i].scroll_stop(); gui_yesno_draw(&(yn[i])); } @@ -231,7 +231,7 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message, FOR_NB_SCREENS(i) { - screens[i].scroll_stop(yn[i].vp); + screens[i].scroll_stop_viewport(yn[i].vp); viewportmanager_theme_undo(i, true); } diff --git a/apps/plugin.c b/apps/plugin.c index 658064c53e..62f9dd7558 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -143,7 +143,7 @@ static const struct plugin_api rockbox_api = { lcd_puts, lcd_putsf, lcd_puts_scroll, - lcd_stop_scroll, + lcd_scroll_stop, #ifdef HAVE_LCD_CHARCELLS lcd_define_pattern, lcd_get_locked_pattern, @@ -246,7 +246,7 @@ static const struct plugin_api rockbox_api = { lcd_remote_clear_display, lcd_remote_puts, lcd_remote_puts_scroll, - lcd_remote_stop_scroll, + lcd_remote_scroll_stop, lcd_remote_set_drawmode, lcd_remote_get_drawmode, lcd_remote_setfont, diff --git a/apps/plugin.h b/apps/plugin.h index 874b9b4a56..15f7e96946 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -62,6 +62,7 @@ void* plugin_get_buffer(size_t *buffer_size); #include "usb.h" #include "font.h" #include "lcd.h" +#include "scroll_engine.h" #include "metadata.h" #include "sound.h" #include "mpeg.h" @@ -195,7 +196,7 @@ struct plugin_api { void (*lcd_puts)(int x, int y, const unsigned char *string); void (*lcd_putsf)(int x, int y, const unsigned char *fmt, ...); void (*lcd_puts_scroll)(int x, int y, const unsigned char* string); - void (*lcd_stop_scroll)(void); + void (*lcd_scroll_stop)(void); #ifdef HAVE_LCD_CHARCELLS void (*lcd_define_pattern)(unsigned long ucs, const char *pattern); unsigned long (*lcd_get_locked_pattern)(void); @@ -327,7 +328,7 @@ struct plugin_api { void (*lcd_remote_clear_display)(void); void (*lcd_remote_puts)(int x, int y, const unsigned char *string); void (*lcd_remote_puts_scroll)(int x, int y, const unsigned char* string); - void (*lcd_remote_stop_scroll)(void); + void (*lcd_remote_scroll_stop)(void); void (*lcd_remote_set_drawmode)(int mode); int (*lcd_remote_get_drawmode)(void); void (*lcd_remote_setfont)(int font); diff --git a/apps/plugins/boomshine.lua b/apps/plugins/boomshine.lua index fe73e8cb66..2eb43dedbd 100644 --- a/apps/plugins/boomshine.lua +++ b/apps/plugins/boomshine.lua @@ -345,7 +345,7 @@ function display_message(to, ...) rb.sleep(to) end - rb.lcd_stop_scroll() -- Stop our scrolling message + rb.lcd_scroll_stop() -- Stop our scrolling message end if HAS_TOUCHSCREEN then diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c index be4d90e81a..3a454b7714 100644 --- a/apps/plugins/chessclock.c +++ b/apps/plugins/chessclock.c @@ -776,7 +776,7 @@ static int chessclock_set_int(char* string, *variable = min; } - rb->lcd_stop_scroll(); + rb->lcd_scroll_stop(); return CHCL_OK; } diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c index 051d7adbb2..6e0394fa51 100644 --- a/apps/plugins/lrcplayer.c +++ b/apps/plugins/lrcplayer.c @@ -2200,7 +2200,7 @@ static int timetag_editor(void) } FOR_NB_SCREENS(idx) - rb->screens[idx]->stop_scroll(); + rb->screens[idx]->scroll_stop(); if (current.changed_lrc) { diff --git a/apps/plugins/resistor.c b/apps/plugins/resistor.c index 8dea817898..16374b3d18 100644 --- a/apps/plugins/resistor.c +++ b/apps/plugins/resistor.c @@ -771,7 +771,7 @@ static void led_resistance_calc(void) } } display->set_viewport(&text_vp); - rb->lcd_stop_scroll(); + rb->lcd_scroll_stop(); display->set_viewport(&screen_vp); rb->lcd_clear_display(); } @@ -908,7 +908,7 @@ static void resistance_to_color(void) } } display->set_viewport(&text_vp); - rb->lcd_stop_scroll(); + rb->lcd_scroll_stop(); display->set_viewport(&screen_vp); rb->lcd_clear_display(); } @@ -989,7 +989,7 @@ static void color_to_resistance(void) } } display->set_viewport(&text_vp); - rb->lcd_stop_scroll(); + rb->lcd_scroll_stop(); display->set_viewport(&screen_vp); rb->lcd_clear_display(); return; diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c index d44e2d1f51..1e117b153b 100644 --- a/apps/plugins/splitedit.c +++ b/apps/plugins/splitedit.c @@ -874,7 +874,7 @@ static void save_editor(struct mp3entry *mp3, int splittime) break; case SE_SAVE: - rb->lcd_stop_scroll(); + rb->lcd_scroll_stop(); rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); rb->lcd_fillrect(0, 6*8, LCD_WIDTH, LCD_HEIGHT); rb->lcd_set_drawmode(DRMODE_SOLID); diff --git a/apps/plugins/superdom.c b/apps/plugins/superdom.c index 1ef99dee30..9d06d9a4e3 100644 --- a/apps/plugins/superdom.c +++ b/apps/plugins/superdom.c @@ -889,7 +889,7 @@ static int get_number(char* param, int* value, int max) { rb->lcd_update(); } rb->lcd_setfont(FONT_UI); - rb->lcd_stop_scroll(); + rb->lcd_scroll_stop(); if (ret == RET_VAL_QUIT_ERR) rb->splash(HZ, "Cancelled"); return ret; diff --git a/apps/radio/radio_skin.c b/apps/radio/radio_skin.c index 87bef25d3a..90aa977e56 100644 --- a/apps/radio/radio_skin.c +++ b/apps/radio/radio_skin.c @@ -78,7 +78,7 @@ void fms_fix_displays(enum fms_exiting toggle_state) } else { - screens[i].stop_scroll(); + screens[i].scroll_stop(); #ifdef HAVE_BACKDROP_IMAGE skin_backdrop_show(sb_get_backdrop(i)); #endif diff --git a/apps/screen_access.c b/apps/screen_access.c index 152f96f7fa..161e596aa2 100644 --- a/apps/screen_access.c +++ b/apps/screen_access.c @@ -245,11 +245,11 @@ struct screen screens[NB_SCREENS] = .puts_scroll_offset=&lcd_puts_scroll_offset, .scroll_speed=&lcd_scroll_speed, .scroll_delay=&lcd_scroll_delay, - .stop_scroll=&lcd_stop_scroll, .clear_display=&lcd_clear_display, .clear_viewport=&lcd_clear_viewport, .scroll_stop=&lcd_scroll_stop, - .scroll_stop_line=&lcd_scroll_stop_line, + .scroll_stop_viewport=&lcd_scroll_stop_viewport, + .scroll_stop_viewport_line=&lcd_scroll_stop_viewport_line, .update=&lcd_update, .update_viewport=&lcd_update_viewport, .backlight_on=&backlight_on, @@ -346,11 +346,11 @@ struct screen screens[NB_SCREENS] = .puts_scroll_offset=&lcd_remote_puts_scroll_offset, .scroll_speed=&lcd_remote_scroll_speed, .scroll_delay=&lcd_remote_scroll_delay, - .stop_scroll=&lcd_remote_stop_scroll, .clear_display=&lcd_remote_clear_display, .clear_viewport=&lcd_remote_clear_viewport, .scroll_stop=&lcd_remote_scroll_stop, - .scroll_stop_line=&lcd_remote_scroll_stop_line, + .scroll_stop_viewport=&lcd_remote_scroll_stop_viewport, + .scroll_stop_viewport_line=&lcd_remote_scroll_stop_viewport_line, .update=&lcd_remote_update, .update_viewport=&lcd_remote_update_viewport, .backlight_on=&remote_backlight_on, diff --git a/apps/screen_access.h b/apps/screen_access.h index ea05a2294d..448437c637 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h @@ -145,11 +145,11 @@ struct screen int x_offset); void (*scroll_speed)(int speed); void (*scroll_delay)(int ms); - void (*stop_scroll)(void); void (*clear_display)(void); void (*clear_viewport)(void); - void (*scroll_stop)(const struct viewport* vp); - void (*scroll_stop_line)(const struct viewport* vp, int y); + void (*scroll_stop)(void); + void (*scroll_stop_viewport)(const struct viewport *vp); + void (*scroll_stop_viewport_line)(const struct viewport *vp, int line); void (*update)(void); void (*update_viewport)(void); void (*backlight_on)(void); diff --git a/apps/screens.c b/apps/screens.c index d02f29b4fe..a069bf19d9 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -566,7 +566,7 @@ bool set_time_screen(const char* title, struct tm *tm) } } FOR_NB_SCREENS(s) - screens[s].scroll_stop(&viewports[s]); + screens[s].scroll_stop_viewport(&viewports[s]); #ifdef HAVE_TOUCHSCREEN touchscreen_set_mode(old_mode); #endif @@ -581,7 +581,7 @@ bool shutdown_screen(void) bool done = false; long time_entered = current_tick; - lcd_stop_scroll(); + lcd_scroll_stop(); splash(0, str(LANG_CONFIRM_SHUTDOWN)); diff --git a/apps/settings.c b/apps/settings.c index cf51b0793c..1d92df270b 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -72,6 +72,7 @@ #include "viewport.h" #include "statusbar-skinned.h" #include "bootchart.h" +#include "scroll_engine.h" #if CONFIG_CODEC == MAS3507D void dac_line_in(bool enable); diff --git a/apps/settings_list.c b/apps/settings_list.c index 53e79fae04..6ffb2b551b 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -27,6 +27,7 @@ #include "lang.h" #include "talk.h" #include "lcd.h" +#include "scroll_engine.h" #include "button.h" #include "backlight.h" #include "sound.h" -- cgit v1.2.3