forked from len0rd/rockbox
Remove the "invert scroll" code since it's not used anywhere anymore (and it was broken on color targets with gradients anyway). Closes FS #7875.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15125 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2490700867
commit
d66b3c0f61
9 changed files with 1 additions and 85 deletions
|
@ -84,7 +84,6 @@ static void gui_list_init(struct gui_list * gui_list,
|
||||||
gui_list->start_item = 0;
|
gui_list->start_item = 0;
|
||||||
gui_list->limit_scroll = false;
|
gui_list->limit_scroll = false;
|
||||||
gui_list->data=data;
|
gui_list->data=data;
|
||||||
gui_list->cursor_flash_state=false;
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
gui_list->offset_position = 0;
|
gui_list->offset_position = 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -129,44 +128,6 @@ static void gui_list_set_display(struct gui_list * gui_list, struct screen * dis
|
||||||
gui_list_select_at_offset(gui_list, 0);
|
gui_list_select_at_offset(gui_list, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* One call on 2, the selected lune will either blink the cursor or
|
|
||||||
* invert/display normal the selected line
|
|
||||||
* - gui_list : the list structure
|
|
||||||
*/
|
|
||||||
static void gui_list_flash(struct gui_list * gui_list)
|
|
||||||
{
|
|
||||||
struct screen * display=gui_list->display;
|
|
||||||
gui_list->cursor_flash_state=!gui_list->cursor_flash_state;
|
|
||||||
int selected_line=gui_list->selected_item-gui_list->start_item+SHOW_LIST_TITLE;
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
int line_ypos=display->getymargin()+display->char_height*selected_line;
|
|
||||||
if (global_settings.cursor_style)
|
|
||||||
{
|
|
||||||
int line_xpos=display->getxmargin();
|
|
||||||
display->set_drawmode(DRMODE_COMPLEMENT);
|
|
||||||
display->fillrect(line_xpos, line_ypos, display->width,
|
|
||||||
display->char_height);
|
|
||||||
display->set_drawmode(DRMODE_SOLID);
|
|
||||||
display->invertscroll(0, selected_line);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int cursor_xpos=(global_settings.scrollbar &&
|
|
||||||
display->nb_lines < gui_list->nb_items)?1:0;
|
|
||||||
screen_put_cursorxy(display, cursor_xpos, selected_line,
|
|
||||||
gui_list->cursor_flash_state);
|
|
||||||
}
|
|
||||||
display->update_rect(0, line_ypos,display->width,
|
|
||||||
display->char_height);
|
|
||||||
#else
|
|
||||||
screen_put_cursorxy(display, 0, selected_line,
|
|
||||||
gui_list->cursor_flash_state);
|
|
||||||
gui_textarea_update(display);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
static int gui_list_get_item_offset(struct gui_list * gui_list, int item_width,
|
static int gui_list_get_item_offset(struct gui_list * gui_list, int item_width,
|
||||||
int text_pos)
|
int text_pos)
|
||||||
|
@ -886,13 +847,6 @@ void gui_synclist_set_title(struct gui_synclist * lists,
|
||||||
gui_list_set_title(&(lists->gui_list[i]), title, icon);
|
gui_list_set_title(&(lists->gui_list[i]), title, icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gui_synclist_flash(struct gui_synclist * lists)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
gui_list_flash(&(lists->gui_list[i]));
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
static void gui_synclist_scroll_right(struct gui_synclist * lists)
|
static void gui_synclist_scroll_right(struct gui_synclist * lists)
|
||||||
{
|
{
|
||||||
|
|
|
@ -82,7 +82,6 @@ struct gui_list
|
||||||
/* wether the text of the whole items of the list have to be
|
/* wether the text of the whole items of the list have to be
|
||||||
* scrolled or only for the selected item */
|
* scrolled or only for the selected item */
|
||||||
bool scroll_all;
|
bool scroll_all;
|
||||||
bool cursor_flash_state;
|
|
||||||
|
|
||||||
int nb_items;
|
int nb_items;
|
||||||
int selected_item;
|
int selected_item;
|
||||||
|
|
|
@ -194,7 +194,6 @@ static const struct plugin_api rockbox_api = {
|
||||||
gui_synclist_add_item,
|
gui_synclist_add_item,
|
||||||
gui_synclist_del_item,
|
gui_synclist_del_item,
|
||||||
gui_synclist_limit_scroll,
|
gui_synclist_limit_scroll,
|
||||||
gui_synclist_flash,
|
|
||||||
gui_synclist_do_button,
|
gui_synclist_do_button,
|
||||||
gui_synclist_set_title,
|
gui_synclist_set_title,
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
/* update this to latest version if a change to the api struct breaks
|
/* update this to latest version if a change to the api struct breaks
|
||||||
backwards compatibility (and please take the opportunity to sort in any
|
backwards compatibility (and please take the opportunity to sort in any
|
||||||
new function which are "waiting" at the end of the function table) */
|
new function which are "waiting" at the end of the function table) */
|
||||||
#define PLUGIN_MIN_API_VERSION 76
|
#define PLUGIN_MIN_API_VERSION 79
|
||||||
|
|
||||||
/* plugin return codes */
|
/* plugin return codes */
|
||||||
enum plugin_status {
|
enum plugin_status {
|
||||||
|
@ -279,7 +279,6 @@ struct plugin_api {
|
||||||
void (*gui_synclist_add_item)(struct gui_synclist * lists);
|
void (*gui_synclist_add_item)(struct gui_synclist * lists);
|
||||||
void (*gui_synclist_del_item)(struct gui_synclist * lists);
|
void (*gui_synclist_del_item)(struct gui_synclist * lists);
|
||||||
void (*gui_synclist_limit_scroll)(struct gui_synclist * lists, bool scroll);
|
void (*gui_synclist_limit_scroll)(struct gui_synclist * lists, bool scroll);
|
||||||
void (*gui_synclist_flash)(struct gui_synclist * lists);
|
|
||||||
bool (*gui_synclist_do_button)(struct gui_synclist * lists,
|
bool (*gui_synclist_do_button)(struct gui_synclist * lists,
|
||||||
unsigned *action, enum list_wrap wrap);
|
unsigned *action, enum list_wrap wrap);
|
||||||
void (*gui_synclist_set_title)(struct gui_synclist *lists, char* title, int icon);
|
void (*gui_synclist_set_title)(struct gui_synclist *lists, char* title, int icon);
|
||||||
|
|
|
@ -91,7 +91,6 @@ struct screen screens[NB_SCREENS] =
|
||||||
.vline=&lcd_vline,
|
.vline=&lcd_vline,
|
||||||
.hline=&lcd_hline,
|
.hline=&lcd_hline,
|
||||||
.scroll_step=&lcd_scroll_step,
|
.scroll_step=&lcd_scroll_step,
|
||||||
.invertscroll=&lcd_invertscroll,
|
|
||||||
.puts_style_offset=&lcd_puts_style_offset,
|
.puts_style_offset=&lcd_puts_style_offset,
|
||||||
.puts_scroll_style=&lcd_puts_scroll_style,
|
.puts_scroll_style=&lcd_puts_scroll_style,
|
||||||
.puts_scroll_style_offset=&lcd_puts_scroll_style_offset,
|
.puts_scroll_style_offset=&lcd_puts_scroll_style_offset,
|
||||||
|
@ -167,7 +166,6 @@ struct screen screens[NB_SCREENS] =
|
||||||
.vline=&lcd_remote_vline,
|
.vline=&lcd_remote_vline,
|
||||||
.hline=&lcd_remote_hline,
|
.hline=&lcd_remote_hline,
|
||||||
.scroll_step=&lcd_remote_scroll_step,
|
.scroll_step=&lcd_remote_scroll_step,
|
||||||
.invertscroll=&lcd_remote_invertscroll,
|
|
||||||
.puts_style_offset=&lcd_remote_puts_style_offset,
|
.puts_style_offset=&lcd_remote_puts_style_offset,
|
||||||
.puts_scroll_style=&lcd_remote_puts_scroll_style,
|
.puts_scroll_style=&lcd_remote_puts_scroll_style,
|
||||||
.puts_scroll_style_offset=&lcd_remote_puts_scroll_style_offset,
|
.puts_scroll_style_offset=&lcd_remote_puts_scroll_style_offset,
|
||||||
|
|
|
@ -119,7 +119,6 @@ struct screen
|
||||||
void (*drawline)(int x1, int y1, int x2, int y2);
|
void (*drawline)(int x1, int y1, int x2, int y2);
|
||||||
void (*vline)(int x, int y1, int y2);
|
void (*vline)(int x, int y1, int y2);
|
||||||
void (*hline)(int x1, int x2, int y);
|
void (*hline)(int x1, int x2, int y);
|
||||||
void (*invertscroll) (int x, int y);
|
|
||||||
#endif /* HAVE_LCD_BITMAP || HAVE_REMOTE_LCD */
|
#endif /* HAVE_LCD_BITMAP || HAVE_REMOTE_LCD */
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS /* no charcell remote LCDs so far */
|
#ifdef HAVE_LCD_CHARCELLS /* no charcell remote LCDs so far */
|
||||||
|
|
|
@ -166,7 +166,6 @@ extern void lcd_remote_bitmap(const fb_remote_data *src, int x, int y,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
extern void lcd_remote_putsxy(int x, int y, const unsigned char *str);
|
extern void lcd_remote_putsxy(int x, int y, const unsigned char *str);
|
||||||
|
|
||||||
extern void lcd_remote_invertscroll(int x, int y);
|
|
||||||
extern void lcd_remote_bidir_scroll(int threshold);
|
extern void lcd_remote_bidir_scroll(int threshold);
|
||||||
extern void lcd_remote_scroll_step(int pixels);
|
extern void lcd_remote_scroll_step(int pixels);
|
||||||
|
|
||||||
|
|
|
@ -355,7 +355,6 @@ extern void lcd_bitmap_part(const fb_data *src, int src_x, int src_y,
|
||||||
extern void lcd_bitmap(const fb_data *src, int x, int y, int width,
|
extern void lcd_bitmap(const fb_data *src, int x, int y, int width,
|
||||||
int height);
|
int height);
|
||||||
|
|
||||||
extern void lcd_invertscroll(int x, int y);
|
|
||||||
extern void lcd_scroll_step(int pixels);
|
extern void lcd_scroll_step(int pixels);
|
||||||
|
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
|
|
|
@ -88,21 +88,6 @@ void lcd_scroll_speed(int speed)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_LCD_BITMAP)
|
#if defined(HAVE_LCD_BITMAP)
|
||||||
/* Reverse the invert setting of the scrolling line (if any) at given char
|
|
||||||
position. Setting will go into affect next time line scrolls. */
|
|
||||||
void lcd_invertscroll(int x, int y)
|
|
||||||
{
|
|
||||||
struct scrollinfo *s;
|
|
||||||
|
|
||||||
(void)x;
|
|
||||||
|
|
||||||
if((unsigned)y>=LCD_SCROLLABLE_LINES) return;
|
|
||||||
|
|
||||||
s = &lcd_scroll_info.scroll[y];
|
|
||||||
s->style = !s->style; /* FIXME: now that the setting isn't bool this seems
|
|
||||||
flawed. */
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_scroll_step(int step)
|
void lcd_scroll_step(int step)
|
||||||
{
|
{
|
||||||
lcd_scroll_info.step = step;
|
lcd_scroll_info.step = step;
|
||||||
|
@ -132,21 +117,6 @@ void lcd_jump_scroll_delay(int ms)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_REMOTE_LCD
|
#ifdef HAVE_REMOTE_LCD
|
||||||
/* Reverse the invert setting of the scrolling line (if any) at given char
|
|
||||||
position. Setting will go into affect next time line scrolls. */
|
|
||||||
void lcd_remote_invertscroll(int x, int y)
|
|
||||||
{
|
|
||||||
struct scrollinfo *s;
|
|
||||||
|
|
||||||
(void)x;
|
|
||||||
|
|
||||||
if((unsigned)y>=LCD_REMOTE_SCROLLABLE_LINES) return;
|
|
||||||
|
|
||||||
s = &lcd_remote_scroll_info.scroll[y];
|
|
||||||
s->style = !s->style; /* FIXME: now that the setting isn't bool this seems
|
|
||||||
flawed. */
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_remote_stop_scroll(void)
|
void lcd_remote_stop_scroll(void)
|
||||||
{
|
{
|
||||||
lcd_remote_scroll_info.lines = 0;
|
lcd_remote_scroll_info.lines = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue