From e1c7b3b8f72becc9079c04253a2985f577850a48 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Tue, 30 Apr 2013 07:41:05 +0200 Subject: [PATCH] lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport. These where used for line styling during scrolling, which is now done in apps/, The viewport struct doesn't need to record these anymore. Change-Id: I810d9dcb2644b00a798c6e75acab69c74a78e77f --- apps/gui/skin_engine/skin_parser.c | 6 +++--- apps/gui/skin_engine/skin_render.c | 5 ----- apps/gui/viewport.c | 5 ----- apps/plugins/lua/rocklib.c | 5 ----- apps/plugins/reversi/reversi-gui.c | 3 --- apps/plugins/test_viewports.c | 20 -------------------- apps/screen_access.c | 5 ----- apps/screen_access.h | 5 ----- apps/settings.c | 3 --- firmware/drivers/lcd-16bit-common.c | 18 ------------------ firmware/export/lcd.h | 5 ----- 11 files changed, 3 insertions(+), 77 deletions(-) diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 1945bfbc57..1946e179c0 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -1957,9 +1957,9 @@ static int convert_viewport(struct wps_data *data, struct skin_element* element) skin_vp->start_bgcolour = skin_vp->vp.bg_pattern; #endif #ifdef HAVE_LCD_COLOR - skin_vp->start_gradient.start = skin_vp->vp.lss_pattern; - skin_vp->start_gradient.end = skin_vp->vp.lse_pattern; - skin_vp->start_gradient.text = skin_vp->vp.lst_pattern; + skin_vp->start_gradient.start = global_settings.lss_color; + skin_vp->start_gradient.end = global_settings.lse_color; + skin_vp->start_gradient.text = global_settings.lst_color; #endif diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c index f40c3b90e0..43914699d6 100644 --- a/apps/gui/skin_engine/skin_render.c +++ b/apps/gui/skin_engine/skin_render.c @@ -859,11 +859,6 @@ void skin_render(struct gui_wps *gwps, unsigned refresh_mode) skin_backdrop_show(data->backdrop_id); } #endif -#ifdef HAVE_LCD_COLOR - skin_viewport->vp.lss_pattern = skin_viewport->start_gradient.start; - skin_viewport->vp.lse_pattern = skin_viewport->start_gradient.end; - skin_viewport->vp.lst_pattern = skin_viewport->start_gradient.text; -#endif /* dont redraw the viewport if its disabled */ if (skin_viewport->hidden_flags&VP_NEVER_VISIBLE) diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index b91c7441dd..aeb884a95d 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c @@ -329,11 +329,6 @@ void viewport_set_fullscreen(struct viewport *vp, { vp->fg_pattern = FG_FALLBACK; vp->bg_pattern = BG_FALLBACK; -#ifdef HAVE_LCD_COLOR - vp->lss_pattern = global_settings.lss_color; - vp->lse_pattern = global_settings.lse_color; - vp->lst_pattern = global_settings.lst_color; -#endif } #endif diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index 1290a7f298..27c1177748 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c @@ -240,11 +240,6 @@ static struct viewport* opt_viewport(lua_State *L, int narg, struct viewport* al #if LCD_DEPTH > 1 check_tablevalue(L, "fg_pattern", tablepos, &vp->fg_pattern, true); check_tablevalue(L, "bg_pattern", tablepos, &vp->bg_pattern, true); -#ifdef HAVE_LCD_COLOR - check_tablevalue(L, "lss_pattern", tablepos, &vp->lss_pattern, true); - check_tablevalue(L, "lse_pattern", tablepos, &vp->lse_pattern, true); - check_tablevalue(L, "lst_pattern", tablepos, &vp->lst_pattern, true); -#endif #endif return vp; diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c index e59a91e341..39a7d2d91c 100644 --- a/apps/plugins/reversi/reversi-gui.c +++ b/apps/plugins/reversi/reversi-gui.c @@ -188,9 +188,6 @@ static bool game_finished; * int drawmode- Modes defined in lcd.h * unsigned fg_pattern - foreground color * unsigned bg_pattern - backbround color - * unsigned lss_pattern - Selector colors (currently unused) - * unsigned lse_pattern - | - * unsigned lst_pattern - \/ * * The rest of the touch button elements are: * bool repeat - requires the area be held for the action diff --git a/apps/plugins/test_viewports.c b/apps/plugins/test_viewports.c index be61c7792e..9fc9caa451 100644 --- a/apps/plugins/test_viewports.c +++ b/apps/plugins/test_viewports.c @@ -47,11 +47,6 @@ static struct viewport vp0 = .fg_pattern = LCD_DEFAULT_FG, .bg_pattern = BGCOLOR_1, #endif -#ifdef HAVE_LCD_COLOR - .lss_pattern = LCD_DEFAULT_BG, - .lse_pattern = LCD_DEFAULT_BG, - .lst_pattern = LCD_DEFAULT_BG, -#endif }; static struct viewport vp1 = @@ -65,11 +60,6 @@ static struct viewport vp1 = #if LCD_DEPTH > 1 .fg_pattern = LCD_DEFAULT_FG, .bg_pattern = LCD_DEFAULT_BG, -#ifdef HAVE_LCD_COLOR - .lss_pattern = LCD_DEFAULT_BG, - .lse_pattern = LCD_DEFAULT_BG, - .lst_pattern = LCD_DEFAULT_BG, -#endif #endif }; @@ -84,11 +74,6 @@ static struct viewport vp2 = #if LCD_DEPTH > 1 .fg_pattern = FGCOLOR_1, .bg_pattern = BGCOLOR_2, -#ifdef HAVE_LCD_COLOR - .lss_pattern = LCD_DEFAULT_BG, - .lse_pattern = LCD_DEFAULT_BG, - .lst_pattern = LCD_DEFAULT_BG, -#endif #endif }; @@ -104,11 +89,6 @@ static struct viewport vp3 = #if LCD_DEPTH > 1 .fg_pattern = LCD_BLACK, .bg_pattern = LCD_WHITE, -#ifdef HAVE_LCD_COLOR - .lss_pattern = LCD_DEFAULT_BG, - .lse_pattern = LCD_DEFAULT_BG, - .lst_pattern = LCD_DEFAULT_BG, -#endif #endif }; diff --git a/apps/screen_access.c b/apps/screen_access.c index 31a946080c..1c339d9705 100644 --- a/apps/screen_access.c +++ b/apps/screen_access.c @@ -231,11 +231,6 @@ struct screen screens[NB_SCREENS] = .get_foreground=&lcd_get_foreground, .set_background=&lcd_set_background, .set_foreground=&lcd_set_foreground, -#ifdef HAVE_LCD_COLOR - .set_selector_start=&lcd_set_selector_start, - .set_selector_end=&lcd_set_selector_end, - .set_selector_text=&lcd_set_selector_text, -#endif #endif /* LCD_DEPTH > 1 */ .update_rect=&lcd_update_rect, .update_viewport_rect=&lcd_update_viewport_rect, diff --git a/apps/screen_access.h b/apps/screen_access.h index c5684fc0c7..7efc38b174 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h @@ -102,11 +102,6 @@ struct screen void (*set_background)(unsigned background); void (*set_foreground)(unsigned foreground); #endif /* (LCD_DEPTH > 1) || (LCD_REMOTE_DEPTH > 1) */ -#if defined(HAVE_LCD_COLOR) - void (*set_selector_start)(unsigned selector); - void (*set_selector_end)(unsigned selector); - void (*set_selector_text)(unsigned selector_text); -#endif void (*update_rect)(int x, int y, int width, int height); void (*update_viewport_rect)(int x, int y, int width, int height); void (*fillrect)(int x, int y, int width, int height); diff --git a/apps/settings.c b/apps/settings.c index 1d92df270b..e4a44dafe1 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -994,9 +994,6 @@ void settings_apply(bool read_disk) #ifdef HAVE_LCD_COLOR screens[SCREEN_MAIN].set_foreground(global_settings.fg_color); screens[SCREEN_MAIN].set_background(global_settings.bg_color); - screens[SCREEN_MAIN].set_selector_start(global_settings.lss_color); - screens[SCREEN_MAIN].set_selector_end(global_settings.lse_color); - screens[SCREEN_MAIN].set_selector_text(global_settings.lst_color); #endif #ifdef HAVE_LCD_BITMAP diff --git a/firmware/drivers/lcd-16bit-common.c b/firmware/drivers/lcd-16bit-common.c index 9d36499418..93e7c2e012 100644 --- a/firmware/drivers/lcd-16bit-common.c +++ b/firmware/drivers/lcd-16bit-common.c @@ -52,9 +52,6 @@ static struct viewport default_vp = .drawmode = DRMODE_SOLID, .fg_pattern = LCD_DEFAULT_FG, .bg_pattern = LCD_DEFAULT_BG, - .lss_pattern = LCD_DEFAULT_BG, - .lse_pattern = LCD_DEFAULT_BG, - .lst_pattern = LCD_DEFAULT_BG, }; static struct viewport* current_vp IDATA_ATTR = &default_vp; @@ -181,21 +178,6 @@ unsigned lcd_get_background(void) return current_vp->bg_pattern; } -void lcd_set_selector_start(unsigned color) -{ - current_vp->lss_pattern = color; -} - -void lcd_set_selector_end(unsigned color) -{ - current_vp->lse_pattern = color; -} - -void lcd_set_selector_text(unsigned color) -{ - current_vp->lst_pattern = color; -} - void lcd_set_drawinfo(int mode, unsigned fg_color, unsigned bg_color) { lcd_set_drawmode(mode); diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index e7a75e893a..9efec9da4d 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -48,11 +48,6 @@ struct viewport { #if LCD_DEPTH > 1 unsigned fg_pattern; unsigned bg_pattern; -#ifdef HAVE_LCD_COLOR - unsigned lss_pattern; - unsigned lse_pattern; - unsigned lst_pattern; -#endif #endif };