summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2005-11-12 16:07:17 +0000
committerDave Chapman <dave@dchapman.com>2005-11-12 16:07:17 +0000
commit64e5239b4c668d7fd7b5372e9d679bc6e041028b (patch)
tree58bd95e135d132d0d5d6b80be0d7bef2e7f9381b
parentafbd4386ffdd402969cdeeeaa81e664860bb12da (diff)
iPod: Add placeholder button definitions - these need reviewing when the button usage for the iPod is decided
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7830 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/list.h4
-rw-r--r--apps/gui/select.h8
-rw-r--r--apps/menu.h10
-rw-r--r--apps/plugins/databox/databox.c3
-rw-r--r--apps/recorder/keyboard.c11
-rw-r--r--apps/settings.h6
-rw-r--r--apps/tree.h17
-rw-r--r--apps/wps.h21
8 files changed, 80 insertions, 0 deletions
diff --git a/apps/gui/list.h b/apps/gui/list.h
index 94a172f642..e587942c94 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -56,6 +56,10 @@
#define LIST_NEXT BUTTON_DOWN
#define LIST_PREV BUTTON_UP
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
+#define LIST_NEXT BUTTON_DOWN
+#define LIST_PREV BUTTON_UP
+
#elif CONFIG_KEYPAD == GMINI100_PAD
#define LIST_NEXT BUTTON_DOWN
#define LIST_PREV BUTTON_UP
diff --git a/apps/gui/select.h b/apps/gui/select.h
index a584b53991..0b67552b00 100644
--- a/apps/gui/select.h
+++ b/apps/gui/select.h
@@ -53,6 +53,14 @@
#define SELECT_CANCEL BUTTON_STOP
#define SELECT_CANCEL2 BUTTON_MENU
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
+#define SELECT_INC BUTTON_UP
+#define SELECT_DEC BUTTON_DOWN
+#define SELECT_OK BUTTON_RIGHT
+#define SELECT_OK2 BUTTON_LEFT
+#define SELECT_CANCEL BUTTON_MENU
+#define SELECT_CANCEL2 BUTTON_OFF
+
#elif CONFIG_KEYPAD == ONDIO_PAD
#define SELECT_INC BUTTON_UP
#define SELECT_DEC BUTTON_DOWN
diff --git a/apps/menu.h b/apps/menu.h
index c163e35ccc..98cbf9417c 100644
--- a/apps/menu.h
+++ b/apps/menu.h
@@ -68,6 +68,16 @@
#define MENU_ENTER BUTTON_RIGHT
#define MENU_ENTER2 BUTTON_PLAY
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
+
+/* TODO: Check menu button assignments */
+
+#define MENU_NEXT BUTTON_DOWN
+#define MENU_PREV BUTTON_UP
+#define MENU_EXIT BUTTON_LEFT
+#define MENU_EXIT_MENU BUTTON_MENU
+#define MENU_ENTER BUTTON_RIGHT
+
#endif
struct menu_item {
diff --git a/apps/plugins/databox/databox.c b/apps/plugins/databox/databox.c
index 7663a1ec82..cd51f32a49 100644
--- a/apps/plugins/databox/databox.c
+++ b/apps/plugins/databox/databox.c
@@ -29,6 +29,9 @@
#elif CONFIG_KEYPAD == ONDIO_PAD
#define DBX_SELECT BUTTON_MENU
#define DBX_STOP BUTTON_OFF
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
+#define DBX_SELECT BUTTON_MENU
+#define DBX_STOP BUTTON_OFF
#elif CONFIG_KEYPAD == PLAYER_PAD
#define DBX_SELECT BUTTON_PLAY
#define DBX_STOP BUTTON_STOP
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c
index 0b833c85dc..65178a97b4 100644
--- a/apps/recorder/keyboard.c
+++ b/apps/recorder/keyboard.c
@@ -81,6 +81,17 @@
#define KBD_ABORT BUTTON_OFF
#define KBD_BACKSPACE (BUTTON_MENU | BUTTON_PLAY)
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
+
+/* TODO: Check keyboard.c button mappings - this is a copy of Ondio */
+
+#define KBD_MODES /* Ondio uses 2 modes, picker and line edit */
+#define KBD_SELECT (BUTTON_MENU | BUTTON_REL) /* backspace in line edit */
+#define KBD_SELECT_PRE BUTTON_MENU
+#define KBD_DONE (BUTTON_MENU | BUTTON_REPEAT)
+#define KBD_ABORT BUTTON_OFF
+
+
#endif
#if KEYBOARD_PAGES == 1
diff --git a/apps/settings.h b/apps/settings.h
index 152f82cbb2..b58878be61 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -77,6 +77,12 @@
#define SETTINGS_CANCEL BUTTON_OFF
#define SETTINGS_CANCEL2 BUTTON_MENU
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
+#define SETTINGS_INC BUTTON_RIGHT
+#define SETTINGS_DEC BUTTON_LEFT
+#define SETTINGS_OK BUTTON_PLAY
+#define SETTINGS_CANCEL BUTTON_MENU
+
#endif
/* data structures */
diff --git a/apps/tree.h b/apps/tree.h
index ae2cc0bc00..86e95931d1 100644
--- a/apps/tree.h
+++ b/apps/tree.h
@@ -130,6 +130,23 @@
#define TREE_CONTEXT2 (BUTTON_ON | BUTTON_PLAY)
#define TREE_POWER_BTN BUTTON_ON
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
+
+/* TODO: Check Tree button assignments */
+
+#define TREE_NEXT BUTTON_DOWN
+#define TREE_PREV BUTTON_UP
+#define TREE_EXIT BUTTON_LEFT
+#define TREE_RUN (BUTTON_RIGHT | BUTTON_REL)
+#define TREE_RUN_PRE BUTTON_RIGHT
+#define TREE_MENU (BUTTON_MENU | BUTTON_REPEAT)
+#define TREE_MENU_PRE BUTTON_MENU
+#define TREE_WPS (BUTTON_MENU | BUTTON_REL)
+#define TREE_WPS_PRE BUTTON_MENU
+#define TREE_CONTEXT (BUTTON_RIGHT | BUTTON_REPEAT)
+#define TREE_POWER_BTN BUTTON_OFF
+
+
#endif
struct entry {
diff --git a/apps/wps.h b/apps/wps.h
index a419c809f0..61b3d002fc 100644
--- a/apps/wps.h
+++ b/apps/wps.h
@@ -166,6 +166,27 @@
#define WPS_KEYLOCK (BUTTON_MENU | BUTTON_DOWN)
#define WPS_ID3 (BUTTON_MENU | BUTTON_ON)
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
+
+/* TODO: Check WPS button assignments */
+
+#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL)
+#define WPS_NEXT_PRE BUTTON_RIGHT
+#define WPS_PREV (BUTTON_LEFT | BUTTON_REL)
+#define WPS_PREV_PRE BUTTON_LEFT
+#define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT)
+#define WPS_REW (BUTTON_LEFT | BUTTON_REPEAT)
+#define WPS_INCVOL BUTTON_UP
+#define WPS_DECVOL BUTTON_DOWN
+#define WPS_PAUSE BUTTON_OFF
+/* #define WPS_MENU iPod can't have both main menu and context menu in wps */
+#define WPS_BROWSE (BUTTON_MENU | BUTTON_REL)
+#define WPS_BROWSE_PRE BUTTON_MENU
+#define WPS_KEYLOCK (BUTTON_MENU | BUTTON_DOWN)
+#define WPS_EXIT (BUTTON_OFF | BUTTON_REPEAT)
+#define WPS_CONTEXT (BUTTON_MENU | BUTTON_REPEAT)
+
+
#endif
extern bool keys_locked;