diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-07-28 07:35:45 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-07-28 07:35:45 +0000 |
commit | 05ddd9a44eb565e936274b6f73fc76f7476113a7 (patch) | |
tree | 0c2a5a8db4c86196deb06615b246d66e920784b7 /apps | |
parent | cb36fec3922cb1317bdb06a6497370f188694d4e (diff) |
X5 remote LCD drawing. This will break target linking atm - lcd_remote_update[_rect]() are not yet implemented.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10347 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/color_picker.c | 4 | ||||
-rw-r--r-- | apps/plugin.c | 8 | ||||
-rw-r--r-- | apps/plugin.h | 14 | ||||
-rw-r--r-- | apps/plugins/snow.c | 4 | ||||
-rw-r--r-- | apps/plugins/stats.c | 24 |
5 files changed, 43 insertions, 11 deletions
diff --git a/apps/gui/color_picker.c b/apps/gui/color_picker.c index edf6a49570..f2e482c651 100644 --- a/apps/gui/color_picker.c +++ b/apps/gui/color_picker.c @@ -73,6 +73,10 @@ #define SLIDER_OK BUTTON_SELECT #define SLIDER_CANCEL BUTTON_PLAY +/* FIXME: chosen at will to make it compile */ +#define SLIDER_RC_OK BUTTON_RC_PLAY +#define SLIDER_RC_CANCEL BUTTON_RC_REC + #endif static const int max_val[3] = {LCD_MAX_RED,LCD_MAX_GREEN,LCD_MAX_BLUE}; diff --git a/apps/plugin.c b/apps/plugin.c index e7909f764b..f9f7e42b80 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -454,6 +454,14 @@ static const struct plugin_api rockbox_api = { font_get_bits, font_load, #endif +#if defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) + lcd_remote_set_foreground, + lcd_remote_get_foreground, + lcd_remote_set_background, + lcd_remote_get_background, + lcd_remote_bitmap_part, + lcd_remote_bitmap, +#endif }; int plugin_load(const char* plugin, void* parameter) diff --git a/apps/plugin.h b/apps/plugin.h index 3cd3fa6b63..0187de8678 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -104,7 +104,7 @@ #define PLUGIN_MAGIC 0x526F634B /* RocK */ /* increase this every time the api struct changes */ -#define PLUGIN_API_VERSION 24 +#define PLUGIN_API_VERSION 25 /* update this to latest version if a change to the api struct breaks backwards compatibility (and please take the opportunity to sort in any @@ -221,7 +221,7 @@ struct plugin_api { void (*lcd_remote_puts_style)(int x, int y, const unsigned char *str, int style); void (*lcd_remote_puts_scroll_style)(int x, int y, const unsigned char* string, int style); - unsigned char* lcd_remote_framebuffer; + fb_remote_data* lcd_remote_framebuffer; void (*lcd_remote_update)(void); void (*lcd_remote_update_rect)(int x, int y, int width, int height); @@ -529,6 +529,16 @@ struct plugin_api { const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code ); struct font* (*font_load)(const char *path); #endif +#if defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) + void (*lcd_remote_set_foreground)(unsigned foreground); + unsigned (*lcd_remote_get_foreground)(void); + void (*lcd_remote_set_background)(unsigned foreground); + unsigned (*lcd_remote_get_background)(void); + void (*lcd_remote_bitmap_part)(const fb_remote_data *src, int src_x, int src_y, + int stride, int x, int y, int width, int height); + void (*lcd_remote_bitmap)(const fb_remote_data *src, int x, int y, int width, + int height); +#endif }; /* plugin header */ diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c index bde8be883c..35efad70da 100644 --- a/apps/plugins/snow.c +++ b/apps/plugins/snow.c @@ -140,8 +140,8 @@ static void snow_move(void) #ifdef HAVE_REMOTE_LCD if (particles[i][0] <= LCD_REMOTE_WIDTH && particles[i][1] <= LCD_REMOTE_HEIGHT) { - rb->lcd_remote_bitmap(flake,particles[i][0],particles[i][1], - FLAKE_WIDTH,FLAKE_WIDTH); + rb->lcd_remote_mono_bitmap(flake,particles[i][0],particles[i][1], + FLAKE_WIDTH,FLAKE_WIDTH); } #endif } diff --git a/apps/plugins/stats.c b/apps/plugins/stats.c index 1e538f90b4..c6ed928de5 100644 --- a/apps/plugins/stats.c +++ b/apps/plugins/stats.c @@ -30,20 +30,30 @@ static int fontwidth, fontheight; #if CONFIG_KEYPAD == PLAYER_PAD #define STATS_STOP BUTTON_STOP -#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ - (CONFIG_KEYPAD == IPOD_3G_PAD) + +#elif (CONFIG_KEYPAD == RECORDER_PAD) \ + || (CONFIG_KEYPAD == ONDIO_PAD) +#define STATS_STOP BUTTON_OFF + +#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) \ + || (CONFIG_KEYPAD == IRIVER_H300_PAD) +#define STATS_STOP BUTTON_OFF +#define STATS_STOP_REMOTE BUTTON_RC_STOP + +#elif (CONFIG_KEYPAD == IPOD_4G_PAD) \ + || (CONFIG_KEYPAD == IPOD_3G_PAD) #define STATS_STOP BUTTON_MENU + #elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD #define STATS_STOP BUTTON_PLAY + #elif CONFIG_KEYPAD == IAUDIO_X5_PAD #define STATS_STOP BUTTON_POWER +#define STATS_STOP_REMOTE BUTTON_RC_PLAY + #elif CONFIG_KEYPAD == GIGABEAT_PAD #define STATS_STOP BUTTON_A -#else -#define STATS_STOP BUTTON_OFF -#endif -#ifdef HAVE_REMOTE_LCD -#define STATS_STOP_REMOTE BUTTON_RC_STOP + #endif /* TODO: Better get the exts from the filetypes var in tree.c */ |