scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api.
Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
This commit is contained in:
parent
47c8d3c14d
commit
1c5d0b41ee
34 changed files with 100 additions and 87 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -776,7 +776,7 @@ static int chessclock_set_int(char* string,
|
|||
*variable = min;
|
||||
|
||||
}
|
||||
rb->lcd_stop_scroll();
|
||||
rb->lcd_scroll_stop();
|
||||
|
||||
return CHCL_OK;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -144,13 +144,9 @@ void lcd_clear_viewport(void)
|
|||
}
|
||||
|
||||
if (current_vp == &default_vp)
|
||||
{
|
||||
lcd_scroll_info.lines = 0;
|
||||
}
|
||||
lcd_scroll_stop();
|
||||
else
|
||||
{
|
||||
lcd_scroll_stop(current_vp);
|
||||
}
|
||||
lcd_scroll_stop_viewport(current_vp);
|
||||
}
|
||||
|
||||
/*** parameter handling ***/
|
||||
|
|
|
@ -226,7 +226,7 @@ void LCDFN(clear_viewport)(void)
|
|||
|
||||
current_vp->drawmode = oldmode;
|
||||
|
||||
LCDFN(scroll_stop)(current_vp);
|
||||
LCDFN(scroll_stop_viewport)(current_vp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,6 +178,12 @@ void LCDFN(set_viewport)(struct viewport* vp)
|
|||
#endif
|
||||
}
|
||||
|
||||
struct viewport *LCDFN(get_viewport)(bool *is_default)
|
||||
{
|
||||
*is_default = (current_vp == &default_vp);
|
||||
return current_vp;
|
||||
}
|
||||
|
||||
void LCDFN(update_viewport)(void)
|
||||
{
|
||||
LCDFN(update_rect)(current_vp->x, current_vp->y,
|
||||
|
@ -405,7 +411,7 @@ void LCDFN(puts_style_xyoffset)(int x, int y, const unsigned char *str,
|
|||
int style, int x_offset, int y_offset)
|
||||
{
|
||||
int xpos, ypos, h;
|
||||
LCDFN(scroll_stop_line)(current_vp, y);
|
||||
LCDFN(scroll_stop_viewport_line)(current_vp, y);
|
||||
if(!str)
|
||||
return;
|
||||
|
||||
|
@ -491,7 +497,7 @@ void LCDFN(puts_scroll_style_xyoffset)(int x, int y, const unsigned char *string
|
|||
if (restart)
|
||||
{
|
||||
/* remove any previously scrolling line at the same location */
|
||||
LCDFN(scroll_stop_line)(current_vp, y);
|
||||
LCDFN(scroll_stop_viewport_line)(current_vp, y);
|
||||
|
||||
if (LCDFN(scroll_info).lines >= LCDM(SCROLLABLE_LINES)) return;
|
||||
LCDFN(puts_style_xyoffset)(x, y, string, style, x_offset, y_offset);
|
||||
|
|
|
@ -377,7 +377,7 @@ void lcd_clear_viewport(void)
|
|||
for (y = 0; y < current_vp->height; y++)
|
||||
lcd_putxchar(x, y, xspace);
|
||||
|
||||
lcd_scroll_stop(current_vp);
|
||||
lcd_scroll_stop_viewport(current_vp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -486,7 +486,7 @@ void lcd_puts_offset(int x, int y, const unsigned char *str, int offset)
|
|||
return;
|
||||
|
||||
/* make sure scrolling is turned off on the line we are updating */
|
||||
lcd_scroll_stop_line(current_vp, y);
|
||||
lcd_scroll_stop_viewport_line(current_vp, y);
|
||||
|
||||
x = lcd_putsxyofs(x, y, offset, str);
|
||||
while (x < current_vp->width)
|
||||
|
@ -509,7 +509,7 @@ void lcd_puts_scroll_offset(int x, int y, const unsigned char *string,
|
|||
return;
|
||||
|
||||
/* remove any previously scrolling line at the same location */
|
||||
lcd_scroll_stop_line(current_vp, y);
|
||||
lcd_scroll_stop_viewport_line(current_vp, y);
|
||||
|
||||
if (lcd_scroll_info.lines >= LCD_SCROLLABLE_LINES) return;
|
||||
|
||||
|
|
|
@ -187,9 +187,6 @@ extern void lcd_remote_puts_style_offset(int x, int y, const unsigned char *str,
|
|||
extern void lcd_remote_puts_style_xyoffset(int x, int y, const unsigned char *str,
|
||||
int style, int x_offset, int y_offset);
|
||||
extern void lcd_remote_putc(int x, int y, unsigned short ch);
|
||||
extern void lcd_remote_stop_scroll(void);
|
||||
extern void lcd_remote_scroll_speed(int speed);
|
||||
extern void lcd_remote_scroll_delay(int ms);
|
||||
extern void lcd_remote_puts_scroll(int x, int y, const unsigned char *str);
|
||||
extern void lcd_remote_puts_scroll_style(int x, int y, const unsigned char *str,
|
||||
int style);
|
||||
|
|
|
@ -207,10 +207,6 @@ extern void lcd_puts_offset(int x, int y, const unsigned char *str, int offset);
|
|||
extern void lcd_puts_scroll_offset(int x, int y, const unsigned char *string,
|
||||
int offset);
|
||||
extern void lcd_putc(int x, int y, unsigned long ucs);
|
||||
extern void lcd_stop_scroll(void);
|
||||
extern void lcd_bidir_scroll(int threshold);
|
||||
extern void lcd_scroll_speed(int speed);
|
||||
extern void lcd_scroll_delay(int ms);
|
||||
extern void lcd_puts_scroll(int x, int y, const unsigned char* string);
|
||||
extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string,
|
||||
int style);
|
||||
|
|
|
@ -29,14 +29,24 @@
|
|||
#include <lcd.h>
|
||||
#include "file.h"
|
||||
|
||||
void scroll_init(void) INIT_ATTR;
|
||||
void lcd_scroll_stop(const struct viewport* vp);
|
||||
void lcd_scroll_stop_line(const struct viewport* vp, int y);
|
||||
void lcd_scroll_fn(void);
|
||||
extern void scroll_init(void) INIT_ATTR;
|
||||
|
||||
extern void lcd_bidir_scroll(int threshold);
|
||||
extern void lcd_scroll_speed(int speed);
|
||||
extern void lcd_scroll_delay(int ms);
|
||||
|
||||
extern void lcd_scroll_stop(void);
|
||||
extern void lcd_scroll_stop_viewport(const struct viewport *vp);
|
||||
extern void lcd_scroll_stop_viewport_line(const struct viewport *vp, int line);
|
||||
extern void lcd_scroll_fn(void);
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
void lcd_remote_scroll_fn(void);
|
||||
void lcd_remote_scroll_stop(const struct viewport* vp);
|
||||
void lcd_remote_scroll_stop_line(const struct viewport* vp, int y);
|
||||
extern void lcd_remote_scroll_speed(int speed);
|
||||
extern void lcd_remote_scroll_delay(int ms);
|
||||
|
||||
extern void lcd_remote_scroll_stop(void);
|
||||
extern void lcd_remote_scroll_stop_viewport(const struct viewport *vp);
|
||||
extern void lcd_remote_scroll_stop_viewport_line(const struct viewport *vp, int line);
|
||||
extern void lcd_remote_scroll_fn(void);
|
||||
#endif
|
||||
|
||||
/* internal usage, but in multiple drivers */
|
||||
|
|
|
@ -115,7 +115,7 @@ static void rolo_error(const char *text)
|
|||
button_get(true);
|
||||
button_get(true);
|
||||
button_get(true);
|
||||
lcd_stop_scroll();
|
||||
lcd_scroll_stop();
|
||||
}
|
||||
|
||||
#if CONFIG_CPU == SH7034 || CONFIG_CPU == IMX31L || CONFIG_CPU == RK27XX
|
||||
|
|
|
@ -41,6 +41,10 @@ static const char scroll_tick_table[18] = {
|
|||
100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3, 2, 1
|
||||
};
|
||||
|
||||
/* imported private functions from lcd-bitmap-common.c */
|
||||
extern struct viewport *lcd_get_viewport(void);
|
||||
extern struct viewport *lcd_remote_get_viewport(void);
|
||||
|
||||
static void scroll_thread(void);
|
||||
static char scroll_stack[DEFAULT_STACK_SIZE*3];
|
||||
static const char scroll_name[] = "scroll";
|
||||
|
@ -80,20 +84,21 @@ struct scroll_screen_info lcd_remote_scroll_info =
|
|||
};
|
||||
#endif /* HAVE_REMOTE_LCD */
|
||||
|
||||
void lcd_stop_scroll(void)
|
||||
void lcd_scroll_stop(void)
|
||||
{
|
||||
lcd_scroll_info.lines = 0;
|
||||
}
|
||||
|
||||
/* Stop scrolling line y in the specified viewport, or all lines if y < 0 */
|
||||
void lcd_scroll_stop_line(const struct viewport* current_vp, int y)
|
||||
void lcd_scroll_stop_viewport_line(const struct viewport *current_vp, int line)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
while (i < lcd_scroll_info.lines)
|
||||
{
|
||||
if ((lcd_scroll_info.scroll[i].vp == current_vp) &&
|
||||
((y < 0) || (lcd_scroll_info.scroll[i].y == y)))
|
||||
struct viewport *vp = lcd_scroll_info.scroll[i].vp;
|
||||
if (((vp == current_vp)) &&
|
||||
((line < 0) || (lcd_scroll_info.scroll[i].y == line)))
|
||||
{
|
||||
/* If i is not the last active line in the array, then move
|
||||
the last item to position i */
|
||||
|
@ -106,7 +111,7 @@ void lcd_scroll_stop_line(const struct viewport* current_vp, int y)
|
|||
|
||||
/* A line can only appear once, so we're done,
|
||||
* unless we are clearing the whole viewport */
|
||||
if (y >= 0)
|
||||
if (line >= 0)
|
||||
return ;
|
||||
}
|
||||
else
|
||||
|
@ -117,9 +122,9 @@ void lcd_scroll_stop_line(const struct viewport* current_vp, int y)
|
|||
}
|
||||
|
||||
/* Stop all scrolling lines in the specified viewport */
|
||||
void lcd_scroll_stop(const struct viewport* vp)
|
||||
void lcd_scroll_stop_viewport(const struct viewport *current_vp)
|
||||
{
|
||||
lcd_scroll_stop_line(vp, -1);
|
||||
lcd_scroll_stop_viewport_line(current_vp, -1);
|
||||
}
|
||||
|
||||
void lcd_scroll_speed(int speed)
|
||||
|
@ -157,20 +162,21 @@ void lcd_jump_scroll_delay(int ms)
|
|||
#endif
|
||||
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
void lcd_remote_stop_scroll(void)
|
||||
void lcd_remote_scroll_stop(void)
|
||||
{
|
||||
lcd_remote_scroll_info.lines = 0;
|
||||
}
|
||||
|
||||
/* Stop scrolling line y in the specified viewport, or all lines if y < 0 */
|
||||
void lcd_remote_scroll_stop_line(const struct viewport* current_vp, int y)
|
||||
void lcd_remote_scroll_stop_viewport_line(const struct viewport *current_vp, int line)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
while (i < lcd_remote_scroll_info.lines)
|
||||
while (i < lcd_scroll_info.lines)
|
||||
{
|
||||
if ((lcd_remote_scroll_info.scroll[i].vp == current_vp) &&
|
||||
((y < 0) || (lcd_remote_scroll_info.scroll[i].y == y)))
|
||||
struct viewport *vp = lcd_remote_scroll_info.scroll[i].vp;
|
||||
if (((vp == current_vp)) &&
|
||||
((line < 0) || (lcd_remote_scroll_info.scroll[i].y == line)))
|
||||
{
|
||||
/* If i is not the last active line in the array, then move
|
||||
the last item to position i */
|
||||
|
@ -183,7 +189,7 @@ void lcd_remote_scroll_stop_line(const struct viewport* current_vp, int y)
|
|||
|
||||
/* A line can only appear once, so we're done,
|
||||
* unless we are clearing the whole viewport */
|
||||
if (y >= 0)
|
||||
if (line >= 0)
|
||||
return ;
|
||||
}
|
||||
else
|
||||
|
@ -194,9 +200,9 @@ void lcd_remote_scroll_stop_line(const struct viewport* current_vp, int y)
|
|||
}
|
||||
|
||||
/* Stop all scrolling lines in the specified viewport */
|
||||
void lcd_remote_scroll_stop(const struct viewport* vp)
|
||||
void lcd_remote_scroll_stop_viewport(const struct viewport *current_vp)
|
||||
{
|
||||
lcd_remote_scroll_stop_line(vp, -1);
|
||||
lcd_remote_scroll_stop_viewport_line(current_vp, -1);
|
||||
}
|
||||
|
||||
void lcd_remote_scroll_speed(int speed)
|
||||
|
|
Loading…
Reference in a new issue