summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2007-10-15 20:42:51 +0000
committerAntoine Cellerier <dionoea@videolan.org>2007-10-15 20:42:51 +0000
commitd66b3c0f61fad357fa4a30b1ebf5ddb070099f7e (patch)
treeda74d26469318831e45015170e21eb70b8f66488
parent24907008678ae5d5e609c7d72d073886d7b0010f (diff)
downloadrockbox-d66b3c0f61fad357fa4a30b1ebf5ddb070099f7e.tar.gz
rockbox-d66b3c0f61fad357fa4a30b1ebf5ddb070099f7e.zip
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
-rw-r--r--apps/gui/list.c46
-rw-r--r--apps/gui/list.h1
-rw-r--r--apps/plugin.c1
-rw-r--r--apps/plugin.h3
-rw-r--r--apps/screen_access.c2
-rw-r--r--apps/screen_access.h1
-rw-r--r--firmware/export/lcd-remote.h1
-rw-r--r--firmware/export/lcd.h1
-rw-r--r--firmware/scroll_engine.c30
9 files changed, 1 insertions, 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,
84 gui_list->start_item = 0; 84 gui_list->start_item = 0;
85 gui_list->limit_scroll = false; 85 gui_list->limit_scroll = false;
86 gui_list->data=data; 86 gui_list->data=data;
87 gui_list->cursor_flash_state=false;
88#ifdef HAVE_LCD_BITMAP 87#ifdef HAVE_LCD_BITMAP
89 gui_list->offset_position = 0; 88 gui_list->offset_position = 0;
90#endif 89#endif
@@ -129,44 +128,6 @@ static void gui_list_set_display(struct gui_list * gui_list, struct screen * dis
129 gui_list_select_at_offset(gui_list, 0); 128 gui_list_select_at_offset(gui_list, 0);
130} 129}
131 130
132/*
133 * One call on 2, the selected lune will either blink the cursor or
134 * invert/display normal the selected line
135 * - gui_list : the list structure
136 */
137static void gui_list_flash(struct gui_list * gui_list)
138{
139 struct screen * display=gui_list->display;
140 gui_list->cursor_flash_state=!gui_list->cursor_flash_state;
141 int selected_line=gui_list->selected_item-gui_list->start_item+SHOW_LIST_TITLE;
142#ifdef HAVE_LCD_BITMAP
143 int line_ypos=display->getymargin()+display->char_height*selected_line;
144 if (global_settings.cursor_style)
145 {
146 int line_xpos=display->getxmargin();
147 display->set_drawmode(DRMODE_COMPLEMENT);
148 display->fillrect(line_xpos, line_ypos, display->width,
149 display->char_height);
150 display->set_drawmode(DRMODE_SOLID);
151 display->invertscroll(0, selected_line);
152 }
153 else
154 {
155 int cursor_xpos=(global_settings.scrollbar &&
156 display->nb_lines < gui_list->nb_items)?1:0;
157 screen_put_cursorxy(display, cursor_xpos, selected_line,
158 gui_list->cursor_flash_state);
159 }
160 display->update_rect(0, line_ypos,display->width,
161 display->char_height);
162#else
163 screen_put_cursorxy(display, 0, selected_line,
164 gui_list->cursor_flash_state);
165 gui_textarea_update(display);
166#endif
167}
168
169
170#ifdef HAVE_LCD_BITMAP 131#ifdef HAVE_LCD_BITMAP
171static int gui_list_get_item_offset(struct gui_list * gui_list, int item_width, 132static int gui_list_get_item_offset(struct gui_list * gui_list, int item_width,
172 int text_pos) 133 int text_pos)
@@ -886,13 +847,6 @@ void gui_synclist_set_title(struct gui_synclist * lists,
886 gui_list_set_title(&(lists->gui_list[i]), title, icon); 847 gui_list_set_title(&(lists->gui_list[i]), title, icon);
887} 848}
888 849
889void gui_synclist_flash(struct gui_synclist * lists)
890{
891 int i;
892 FOR_NB_SCREENS(i)
893 gui_list_flash(&(lists->gui_list[i]));
894}
895
896#ifdef HAVE_LCD_BITMAP 850#ifdef HAVE_LCD_BITMAP
897static void gui_synclist_scroll_right(struct gui_synclist * lists) 851static void gui_synclist_scroll_right(struct gui_synclist * lists)
898{ 852{
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
82 /* wether the text of the whole items of the list have to be 82 /* wether the text of the whole items of the list have to be
83 * scrolled or only for the selected item */ 83 * scrolled or only for the selected item */
84 bool scroll_all; 84 bool scroll_all;
85 bool cursor_flash_state;
86 85
87 int nb_items; 86 int nb_items;
88 int selected_item; 87 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 = {
194 gui_synclist_add_item, 194 gui_synclist_add_item,
195 gui_synclist_del_item, 195 gui_synclist_del_item,
196 gui_synclist_limit_scroll, 196 gui_synclist_limit_scroll,
197 gui_synclist_flash,
198 gui_synclist_do_button, 197 gui_synclist_do_button,
199 gui_synclist_set_title, 198 gui_synclist_set_title,
200 199
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 @@
117/* update this to latest version if a change to the api struct breaks 117/* update this to latest version if a change to the api struct breaks
118 backwards compatibility (and please take the opportunity to sort in any 118 backwards compatibility (and please take the opportunity to sort in any
119 new function which are "waiting" at the end of the function table) */ 119 new function which are "waiting" at the end of the function table) */
120#define PLUGIN_MIN_API_VERSION 76 120#define PLUGIN_MIN_API_VERSION 79
121 121
122/* plugin return codes */ 122/* plugin return codes */
123enum plugin_status { 123enum plugin_status {
@@ -279,7 +279,6 @@ struct plugin_api {
279 void (*gui_synclist_add_item)(struct gui_synclist * lists); 279 void (*gui_synclist_add_item)(struct gui_synclist * lists);
280 void (*gui_synclist_del_item)(struct gui_synclist * lists); 280 void (*gui_synclist_del_item)(struct gui_synclist * lists);
281 void (*gui_synclist_limit_scroll)(struct gui_synclist * lists, bool scroll); 281 void (*gui_synclist_limit_scroll)(struct gui_synclist * lists, bool scroll);
282 void (*gui_synclist_flash)(struct gui_synclist * lists);
283 bool (*gui_synclist_do_button)(struct gui_synclist * lists, 282 bool (*gui_synclist_do_button)(struct gui_synclist * lists,
284 unsigned *action, enum list_wrap wrap); 283 unsigned *action, enum list_wrap wrap);
285 void (*gui_synclist_set_title)(struct gui_synclist *lists, char* title, int icon); 284 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] =
91 .vline=&lcd_vline, 91 .vline=&lcd_vline,
92 .hline=&lcd_hline, 92 .hline=&lcd_hline,
93 .scroll_step=&lcd_scroll_step, 93 .scroll_step=&lcd_scroll_step,
94 .invertscroll=&lcd_invertscroll,
95 .puts_style_offset=&lcd_puts_style_offset, 94 .puts_style_offset=&lcd_puts_style_offset,
96 .puts_scroll_style=&lcd_puts_scroll_style, 95 .puts_scroll_style=&lcd_puts_scroll_style,
97 .puts_scroll_style_offset=&lcd_puts_scroll_style_offset, 96 .puts_scroll_style_offset=&lcd_puts_scroll_style_offset,
@@ -167,7 +166,6 @@ struct screen screens[NB_SCREENS] =
167 .vline=&lcd_remote_vline, 166 .vline=&lcd_remote_vline,
168 .hline=&lcd_remote_hline, 167 .hline=&lcd_remote_hline,
169 .scroll_step=&lcd_remote_scroll_step, 168 .scroll_step=&lcd_remote_scroll_step,
170 .invertscroll=&lcd_remote_invertscroll,
171 .puts_style_offset=&lcd_remote_puts_style_offset, 169 .puts_style_offset=&lcd_remote_puts_style_offset,
172 .puts_scroll_style=&lcd_remote_puts_scroll_style, 170 .puts_scroll_style=&lcd_remote_puts_scroll_style,
173 .puts_scroll_style_offset=&lcd_remote_puts_scroll_style_offset, 171 .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
119 void (*drawline)(int x1, int y1, int x2, int y2); 119 void (*drawline)(int x1, int y1, int x2, int y2);
120 void (*vline)(int x, int y1, int y2); 120 void (*vline)(int x, int y1, int y2);
121 void (*hline)(int x1, int x2, int y); 121 void (*hline)(int x1, int x2, int y);
122 void (*invertscroll) (int x, int y);
123#endif /* HAVE_LCD_BITMAP || HAVE_REMOTE_LCD */ 122#endif /* HAVE_LCD_BITMAP || HAVE_REMOTE_LCD */
124 123
125#ifdef HAVE_LCD_CHARCELLS /* no charcell remote LCDs so far */ 124#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,
166 int width, int height); 166 int width, int height);
167extern void lcd_remote_putsxy(int x, int y, const unsigned char *str); 167extern void lcd_remote_putsxy(int x, int y, const unsigned char *str);
168 168
169extern void lcd_remote_invertscroll(int x, int y);
170extern void lcd_remote_bidir_scroll(int threshold); 169extern void lcd_remote_bidir_scroll(int threshold);
171extern void lcd_remote_scroll_step(int pixels); 170extern void lcd_remote_scroll_step(int pixels);
172 171
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,
355extern void lcd_bitmap(const fb_data *src, int x, int y, int width, 355extern void lcd_bitmap(const fb_data *src, int x, int y, int width,
356 int height); 356 int height);
357 357
358extern void lcd_invertscroll(int x, int y);
359extern void lcd_scroll_step(int pixels); 358extern void lcd_scroll_step(int pixels);
360 359
361#if LCD_DEPTH > 1 360#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)
88} 88}
89 89
90#if defined(HAVE_LCD_BITMAP) 90#if defined(HAVE_LCD_BITMAP)
91/* Reverse the invert setting of the scrolling line (if any) at given char
92 position. Setting will go into affect next time line scrolls. */
93void lcd_invertscroll(int x, int y)
94{
95 struct scrollinfo *s;
96
97 (void)x;
98
99 if((unsigned)y>=LCD_SCROLLABLE_LINES) return;
100
101 s = &lcd_scroll_info.scroll[y];
102 s->style = !s->style; /* FIXME: now that the setting isn't bool this seems
103 flawed. */
104}
105
106void lcd_scroll_step(int step) 91void lcd_scroll_step(int step)
107{ 92{
108 lcd_scroll_info.step = step; 93 lcd_scroll_info.step = step;
@@ -132,21 +117,6 @@ void lcd_jump_scroll_delay(int ms)
132#endif 117#endif
133 118
134#ifdef HAVE_REMOTE_LCD 119#ifdef HAVE_REMOTE_LCD
135/* Reverse the invert setting of the scrolling line (if any) at given char
136 position. Setting will go into affect next time line scrolls. */
137void lcd_remote_invertscroll(int x, int y)
138{
139 struct scrollinfo *s;
140
141 (void)x;
142
143 if((unsigned)y>=LCD_REMOTE_SCROLLABLE_LINES) return;
144
145 s = &lcd_remote_scroll_info.scroll[y];
146 s->style = !s->style; /* FIXME: now that the setting isn't bool this seems
147 flawed. */
148}
149
150void lcd_remote_stop_scroll(void) 120void lcd_remote_stop_scroll(void)
151{ 121{
152 lcd_remote_scroll_info.lines = 0; 122 lcd_remote_scroll_info.lines = 0;