WpsEditor: add support for greyscale targets.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18424 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Wenger 2008-09-05 18:57:47 +00:00
parent c1e86f7531
commit 66b211addd
3 changed files with 31 additions and 6 deletions

View file

@ -177,7 +177,7 @@ void cue_draw_markers(struct screen *screen, unsigned long tracklen,
int x1, int x2, int y, int h){}
#endif
#ifdef HAVE_ALBUMART
void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear)
{
if (!gwps || !gwps->data || !gwps->display || handle_id < 0)
@ -240,7 +240,7 @@ void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear)
gwps->display->set_drawmode(DRMODE_SOLID);
}
}
#endif
/* Update the "data" pointer to make the handle's data available to the caller.
Return the length of the available linear data or < 0 for failure (handle
not found).
@ -273,6 +273,10 @@ bool force_redraw)
void unload_wps_backdrop(void)
{
}
void unload_remote_wps_backdrop(void)
{
}
#if CONFIG_CODEC == SWCODEC
@ -299,6 +303,8 @@ int rtc_write_datetime(unsigned char* buf){return 0;}
void backlight_on(void){}
void backlight_off(void){}
void remote_backlight_on(void){}
void remote_backlight_off(void){}
void debugf(const char *fmt, ...)
{}

View file

@ -12,13 +12,19 @@ static struct viewport default_vp =
.y = 0,
.width = LCD_WIDTH,
.height = LCD_HEIGHT,
#ifdef HAVE_LCD_BITMAP
.font = FONT_SYSFIXED,
.drawmode = DRMODE_SOLID,
#endif
#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
};
struct viewport* current_vp = &default_vp;
@ -65,7 +71,7 @@ int lcd_get_drawmode(void)
{
return current_vp->drawmode;
}
#if LCD_DEPTH > 1
void lcd_set_foreground(unsigned color)
{
current_vp->fg_pattern = color;
@ -86,6 +92,7 @@ unsigned lcd_get_background(void)
return current_vp->bg_pattern;
}
#ifdef HAVE_LCD_COLOR
void lcd_set_selector_start(unsigned color)
{
current_vp->lss_pattern = color;
@ -107,7 +114,8 @@ void lcd_set_drawinfo(int mode, unsigned fg_color, unsigned bg_color)
current_vp->fg_pattern = fg_color;
current_vp->bg_pattern = bg_color;
}
#endif
#endif
int lcd_getwidth(void)
{
return current_vp->width;