summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-04-16 02:31:20 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-04-16 02:31:20 +0000
commit05674b039a15459da4418dbb56708ccba42aabb0 (patch)
tree122b04582f01c8a7f4647c0ded41fc20e4234751 /apps/plugins
parent90a3d5801325dc8c39f98d15f3a9dfa7b4cf1633 (diff)
more touchpad changes... both targets should be using the same action tables except for their real buttons.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17137 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/lib/pluginlib_actions.c49
1 files changed, 31 insertions, 18 deletions
diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c
index c5bc36dd69..2750cc9cad 100644
--- a/apps/plugins/lib/pluginlib_actions.c
+++ b/apps/plugins/lib/pluginlib_actions.c
@@ -65,6 +65,16 @@ const struct button_mapping remote_directions[] =
const struct button_mapping generic_directions[] =
{
+#ifdef HAVE_TOUCHPAD
+ { PLA_UP, BUTTON_TOPMIDDLE, BUTTON_NONE},
+ { PLA_DOWN, BUTTON_BOTTOMMIDDLE, BUTTON_NONE},
+ { PLA_LEFT, BUTTON_MIDLEFT, BUTTON_NONE},
+ { PLA_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE},
+ { PLA_UP_REPEAT, BUTTON_TOPMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_DOWN_REPEAT, BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_LEFT_REPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_RIGHT_REPEAT, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE},
+#endif
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) \
|| (CONFIG_KEYPAD == IRIVER_H300_PAD) \
|| (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \
@@ -132,14 +142,6 @@ const struct button_mapping generic_directions[] =
{ PLA_LEFT_REPEAT, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_RIGHT_REPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == COWOND2_PAD)
- { PLA_UP, BUTTON_TOPMIDDLE, BUTTON_NONE},
- { PLA_DOWN, BUTTON_BOTTOMMIDDLE, BUTTON_NONE},
- { PLA_LEFT, BUTTON_MIDLEFT, BUTTON_NONE},
- { PLA_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE},
- { PLA_UP_REPEAT, BUTTON_TOPMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
- { PLA_DOWN_REPEAT, BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
- { PLA_LEFT_REPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE},
- { PLA_RIGHT_REPEAT, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE},
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
{ PLA_UP, BUTTON_RC_VOL_UP, BUTTON_NONE},
{ PLA_DOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE},
@@ -157,6 +159,14 @@ const struct button_mapping generic_directions[] =
const struct button_mapping generic_left_right_fire[] =
{
+#ifdef HAVE_TOUCPAD
+ { PLA_LEFT, BUTTON_MIDLEFT, BUTTON_NONE},
+ { PLA_LEFT_REPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE},
+ { PLA_RIGHT_REPEAT, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_FIRE, BUTTON_CENTER, BUTTON_NONE},
+ { PLA_FIRE_REPEAT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_NONE},
+#endif
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) \
|| (CONFIG_KEYPAD == IRIVER_H300_PAD) \
|| (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \
@@ -231,17 +241,11 @@ const struct button_mapping generic_left_right_fire[] =
{ PLA_FIRE_REPEAT, BUTTON_RC_HEART|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == COWOND2_PAD)
{ PLA_LEFT, BUTTON_MINUS, BUTTON_NONE},
- { PLA_LEFT, BUTTON_MIDLEFT, BUTTON_NONE},
{ PLA_LEFT_REPEAT, BUTTON_MINUS|BUTTON_REPEAT, BUTTON_NONE},
- { PLA_LEFT_REPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_RIGHT, BUTTON_PLUS, BUTTON_NONE},
- { PLA_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE},
{ PLA_RIGHT_REPEAT, BUTTON_PLUS|BUTTON_REPEAT, BUTTON_NONE},
- { PLA_RIGHT_REPEAT, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE},
{ PLA_FIRE, BUTTON_MENU, BUTTON_NONE},
- { PLA_FIRE, BUTTON_CENTER, BUTTON_NONE},
{ PLA_FIRE_REPEAT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE},
- { PLA_FIRE_REPEAT, BUTTON_CENTER|BUTTON_REPEAT, BUTTON_NONE},
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
{ PLA_LEFT, BUTTON_RC_REW, BUTTON_NONE},
{ PLA_RIGHT, BUTTON_RC_FF, BUTTON_NONE},
@@ -258,6 +262,13 @@ const struct button_mapping generic_left_right_fire[] =
/* these were taken from the bubbles plugin, so may need tweaking */
const struct button_mapping generic_actions[] =
{
+#ifdef HAVE_TOUCHPAD
+ {PLA_QUIT, BUTTON_BOTTOMRIGHT, BUTTON_NONE},
+ {PLA_START, BUTTON_CENTER, BUTTON_NONE},
+ {PLA_MENU, BUTTON_TOPLEFT, BUTTON_NONE},
+ {PLA_FIRE, BUTTON_BOTTOMMIDDLE, BUTTON_NONE},
+ {PLA_FIRE_REPEAT, BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
+#endif
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
{PLA_QUIT, BUTTON_OFF, BUTTON_NONE},
{PLA_QUIT, BUTTON_RC_STOP, BUTTON_NONE},
@@ -378,6 +389,12 @@ const struct button_mapping generic_actions[] =
const struct button_mapping generic_increase_decrease[] =
{
+#ifdef HAVE_TOUCHPAD
+ {PLA_INC, BUTTON_TOPMIDDLE, BUTTON_NONE},
+ {PLA_DEC, BUTTON_BOTTOMMIDDLE, BUTTON_NONE},
+ {PLA_INC_REPEAT, BUTTON_TOPMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
+ {PLA_DEC_REPEAT, BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
+#endif
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) \
|| (CONFIG_KEYPAD == IRIVER_H300_PAD) \
|| (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \
@@ -425,13 +442,9 @@ const struct button_mapping generic_increase_decrease[] =
{PLA_DEC_REPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
#elif CONFIG_KEYPAD == COWOND2_PAD
{PLA_INC, BUTTON_PLUS, BUTTON_NONE},
- {PLA_INC, BUTTON_TOPMIDDLE, BUTTON_NONE},
{PLA_DEC, BUTTON_MINUS, BUTTON_NONE},
- {PLA_DEC, BUTTON_BOTTOMMIDDLE, BUTTON_NONE},
{PLA_INC_REPEAT, BUTTON_PLUS|BUTTON_REPEAT, BUTTON_NONE},
- {PLA_INC_REPEAT, BUTTON_TOPMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
{PLA_DEC_REPEAT, BUTTON_MINUS|BUTTON_REPEAT, BUTTON_NONE},
- {PLA_DEC_REPEAT, BUTTON_BOTTOMMIDDLE|BUTTON_REPEAT, BUTTON_NONE},
#else
#error pluginlib_actions: Unsupported keypad
#endif