From d66b3c0f61fad357fa4a30b1ebf5ddb070099f7e Mon Sep 17 00:00:00 2001 From: Antoine Cellerier Date: Mon, 15 Oct 2007 20:42:51 +0000 Subject: 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 --- apps/gui/list.c | 46 -------------------------------------------- apps/gui/list.h | 1 - apps/plugin.c | 1 - apps/plugin.h | 3 +-- apps/screen_access.c | 2 -- apps/screen_access.h | 1 - firmware/export/lcd-remote.h | 1 - firmware/export/lcd.h | 1 - firmware/scroll_engine.c | 30 ----------------------------- 9 files changed, 1 insertion(+), 85 deletions(-) diff --git a/apps/gui/list.c b/apps/gui/list.c index 107ce5a71a..41bde5802b 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -84,7 +84,6 @@ static void gui_list_init(struct gui_list * gui_list, gui_list->start_item = 0; gui_list->limit_scroll = false; gui_list->data=data; - gui_list->cursor_flash_state=false; #ifdef HAVE_LCD_BITMAP gui_list->offset_position = 0; #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); } -/* - * 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 static int gui_list_get_item_offset(struct gui_list * gui_list, int item_width, 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); } -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 static void gui_synclist_scroll_right(struct gui_synclist * lists) { diff --git a/apps/gui/list.h b/apps/gui/list.h index 1046492b0d..9aaa18ed08 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h @@ -82,7 +82,6 @@ struct gui_list /* wether the text of the whole items of the list have to be * scrolled or only for the selected item */ bool scroll_all; - bool cursor_flash_state; int nb_items; int selected_item; diff --git a/apps/plugin.c b/apps/plugin.c index adc955fb06..685dab960f 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -194,7 +194,6 @@ static const struct plugin_api rockbox_api = { gui_synclist_add_item, gui_synclist_del_item, gui_synclist_limit_scroll, - gui_synclist_flash, gui_synclist_do_button, gui_synclist_set_title, diff --git a/apps/plugin.h b/apps/plugin.h index 55ebd5a83e..7994f51abd 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -117,7 +117,7 @@ /* update this to latest version if a change to the api struct breaks backwards compatibility (and please take the opportunity to sort in any 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 */ enum plugin_status { @@ -279,7 +279,6 @@ struct plugin_api { void (*gui_synclist_add_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_flash)(struct gui_synclist * lists); bool (*gui_synclist_do_button)(struct gui_synclist * lists, unsigned *action, enum list_wrap wrap); void (*gui_synclist_set_title)(struct gui_synclist *lists, char* title, int icon); diff --git a/apps/screen_access.c b/apps/screen_access.c index a10e96475e..9017cda787 100644 --- a/apps/screen_access.c +++ b/apps/screen_access.c @@ -91,7 +91,6 @@ struct screen screens[NB_SCREENS] = .vline=&lcd_vline, .hline=&lcd_hline, .scroll_step=&lcd_scroll_step, - .invertscroll=&lcd_invertscroll, .puts_style_offset=&lcd_puts_style_offset, .puts_scroll_style=&lcd_puts_scroll_style, .puts_scroll_style_offset=&lcd_puts_scroll_style_offset, @@ -167,7 +166,6 @@ struct screen screens[NB_SCREENS] = .vline=&lcd_remote_vline, .hline=&lcd_remote_hline, .scroll_step=&lcd_remote_scroll_step, - .invertscroll=&lcd_remote_invertscroll, .puts_style_offset=&lcd_remote_puts_style_offset, .puts_scroll_style=&lcd_remote_puts_scroll_style, .puts_scroll_style_offset=&lcd_remote_puts_scroll_style_offset, diff --git a/apps/screen_access.h b/apps/screen_access.h index 6333251d29..35bcdef0a2 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h @@ -119,7 +119,6 @@ struct screen void (*drawline)(int x1, int y1, int x2, int y2); void (*vline)(int x, int y1, int y2); void (*hline)(int x1, int x2, int y); - void (*invertscroll) (int x, int y); #endif /* HAVE_LCD_BITMAP || HAVE_REMOTE_LCD */ #ifdef HAVE_LCD_CHARCELLS /* no charcell remote LCDs so far */ diff --git a/firmware/export/lcd-remote.h b/firmware/export/lcd-remote.h index 44f809a838..3be23747ea 100644 --- a/firmware/export/lcd-remote.h +++ b/firmware/export/lcd-remote.h @@ -166,7 +166,6 @@ extern void lcd_remote_bitmap(const fb_remote_data *src, int x, int y, int width, int height); 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_scroll_step(int pixels); diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index b64e506981..eedfc651c7 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -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, int height); -extern void lcd_invertscroll(int x, int y); extern void lcd_scroll_step(int pixels); #if LCD_DEPTH > 1 diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c index cb8585cbba..63ca8883de 100644 --- a/firmware/scroll_engine.c +++ b/firmware/scroll_engine.c @@ -88,21 +88,6 @@ void lcd_scroll_speed(int speed) } #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) { lcd_scroll_info.step = step; @@ -132,21 +117,6 @@ void lcd_jump_scroll_delay(int ms) #endif #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) { lcd_remote_scroll_info.lines = 0; -- cgit v1.2.3