diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-03-22 10:24:28 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-03-22 10:24:28 +0000 |
commit | 29361abf744ed116cec04ca03e754ddd2794b76c (patch) | |
tree | d336dd19570faed037aef9064ce3c490c50ed6df /apps/plugins/bounce.c | |
parent | bca8edd856cee3a3b469ef9fe2770a191b590fde (diff) |
Adapt most single-file plugins to the M3 keypad and screen. It's still preliminary, as many plugins now can't be left without the remote. The plugins need to be converted to use the action API (but not pluginlib actions). Plugins are not enabled yet. * Simplify the bitmap handling in the source of some plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16737 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/bounce.c')
-rw-r--r-- | apps/plugins/bounce.c | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index f83d99306a..8216a396e9 100644 --- a/apps/plugins/bounce.c +++ b/apps/plugins/bounce.c @@ -30,18 +30,24 @@ PLUGIN_HEADER /* variable button definitions */ #if CONFIG_KEYPAD == RECORDER_PAD +#define BOUNCE_LEFT BUTTON_LEFT +#define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_UP #define BOUNCE_DOWN BUTTON_DOWN #define BOUNCE_QUIT (BUTTON_OFF | BUTTON_REL) #define BOUNCE_MODE (BUTTON_ON | BUTTON_REL) #elif CONFIG_KEYPAD == ARCHOS_AV300_PAD +#define BOUNCE_LEFT BUTTON_LEFT +#define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_UP #define BOUNCE_DOWN BUTTON_DOWN #define BOUNCE_QUIT (BUTTON_OFF | BUTTON_REL) #define BOUNCE_MODE (BUTTON_ON | BUTTON_REL) #elif CONFIG_KEYPAD == ONDIO_PAD +#define BOUNCE_LEFT BUTTON_LEFT +#define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_UP #define BOUNCE_DOWN BUTTON_DOWN #define BOUNCE_QUIT (BUTTON_OFF | BUTTON_REL) @@ -49,6 +55,8 @@ PLUGIN_HEADER #elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \ (CONFIG_KEYPAD == IRIVER_H300_PAD) +#define BOUNCE_LEFT BUTTON_LEFT +#define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_UP #define BOUNCE_DOWN BUTTON_DOWN #define BOUNCE_QUIT (BUTTON_OFF | BUTTON_REL) @@ -59,53 +67,77 @@ PLUGIN_HEADER #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ (CONFIG_KEYPAD == IPOD_3G_PAD) || \ (CONFIG_KEYPAD == IPOD_1G2G_PAD) +#define BOUNCE_LEFT BUTTON_LEFT +#define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_SCROLL_BACK #define BOUNCE_DOWN BUTTON_SCROLL_FWD #define BOUNCE_QUIT (BUTTON_MENU | BUTTON_REL) #define BOUNCE_MODE (BUTTON_SELECT | BUTTON_REL) #elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) +#define BOUNCE_LEFT BUTTON_LEFT +#define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_UP #define BOUNCE_DOWN BUTTON_DOWN #define BOUNCE_QUIT BUTTON_POWER #define BOUNCE_MODE BUTTON_PLAY #elif (CONFIG_KEYPAD == GIGABEAT_PAD) +#define BOUNCE_LEFT BUTTON_LEFT +#define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_UP #define BOUNCE_DOWN BUTTON_DOWN #define BOUNCE_QUIT BUTTON_POWER #define BOUNCE_MODE BUTTON_A #elif CONFIG_KEYPAD == SANSA_E200_PAD +#define BOUNCE_LEFT BUTTON_LEFT +#define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_SCROLL_BACK #define BOUNCE_DOWN BUTTON_SCROLL_FWD #define BOUNCE_QUIT BUTTON_POWER #define BOUNCE_MODE BUTTON_SELECT #elif CONFIG_KEYPAD == SANSA_C200_PAD +#define BOUNCE_LEFT BUTTON_LEFT +#define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_UP #define BOUNCE_DOWN BUTTON_DOWN #define BOUNCE_QUIT BUTTON_POWER #define BOUNCE_MODE BUTTON_SELECT #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) +#define BOUNCE_LEFT BUTTON_LEFT +#define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_SCROLL_UP #define BOUNCE_DOWN BUTTON_SCROLL_DOWN #define BOUNCE_QUIT BUTTON_POWER #define BOUNCE_MODE BUTTON_PLAY #elif (CONFIG_KEYPAD == GIGABEAT_S_PAD) +#define BOUNCE_LEFT BUTTON_LEFT +#define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_UP #define BOUNCE_DOWN BUTTON_DOWN #define BOUNCE_QUIT BUTTON_BACK #define BOUNCE_MODE BUTTON_MENU #elif (CONFIG_KEYPAD == MROBE100_PAD) +#define BOUNCE_LEFT BUTTON_LEFT +#define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_UP #define BOUNCE_DOWN BUTTON_DOWN #define BOUNCE_QUIT BUTTON_POWER #define BOUNCE_MODE BUTTON_DISPLAY +#elif CONFIG_KEYPAD == IAUDIO_M3_PAD +#define BOUNCE_LEFT BUTTON_RC_REW +#define BOUNCE_RIGHT BUTTON_RC_FF +#define BOUNCE_UP BUTTON_RC_VOL_UP +#define BOUNCE_DOWN BUTTON_RC_VOL_DOWN +#define BOUNCE_QUIT BUTTON_RC_REC +#define BOUNCE_MODE BUTTON_RC_MODE + #else #error No keymap defined! #endif @@ -477,12 +509,12 @@ static int loopit(void) #endif if(timeout) { switch(b) { - case BUTTON_LEFT: - case BUTTON_LEFT|BUTTON_REPEAT: + case BOUNCE_LEFT: + case BOUNCE_LEFT|BUTTON_REPEAT: values[show].num--; break; - case BUTTON_RIGHT: - case BUTTON_RIGHT|BUTTON_REPEAT: + case BOUNCE_RIGHT: + case BOUNCE_RIGHT|BUTTON_REPEAT: values[show].num++; break; case BOUNCE_UP: |