diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2006-08-15 12:27:07 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2006-08-15 12:27:07 +0000 |
commit | 224c0a13ebb5828b9bc06a9c1c23ae17f0ac19f9 (patch) | |
tree | bae2154b272f786983cf8e6de28d33f98f327560 /apps/gui/list.h | |
parent | c0f8b187706364f5e4bda2ac26750d14454c901d (diff) | |
download | rockbox-224c0a13ebb5828b9bc06a9c1c23ae17f0ac19f9.tar.gz rockbox-224c0a13ebb5828b9bc06a9c1c23ae17f0ac19f9.zip |
Finally, the new button action system is here, thanks to Jonathan Gordon. Some button mappings have changed and other things may break. Comments should go to the forum, http://forums.rockbox.org/index.php?topic=5829.0 or the mailing list.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10582 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/list.h')
-rw-r--r-- | apps/gui/list.h | 87 |
1 files changed, 2 insertions, 85 deletions
diff --git a/apps/gui/list.h b/apps/gui/list.h index 8d3ac9ad4c..2a80298379 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h | |||
@@ -26,89 +26,6 @@ | |||
26 | 26 | ||
27 | #define SCROLLBAR_WIDTH 6 | 27 | #define SCROLLBAR_WIDTH 6 |
28 | 28 | ||
29 | /* Key assignement */ | ||
30 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \ | ||
31 | (CONFIG_KEYPAD == IRIVER_H300_PAD) | ||
32 | #define LIST_NEXT BUTTON_DOWN | ||
33 | #define LIST_PREV BUTTON_UP | ||
34 | #define LIST_PGUP (BUTTON_ON | BUTTON_UP) | ||
35 | #define LIST_PGDN (BUTTON_ON | BUTTON_DOWN) | ||
36 | #define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT) | ||
37 | #define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT) | ||
38 | |||
39 | #ifdef CONFIG_REMOTE_KEYPAD | ||
40 | #define LIST_RC_NEXT BUTTON_RC_FF | ||
41 | #define LIST_RC_PREV BUTTON_RC_REW | ||
42 | #define LIST_RC_PGUP BUTTON_RC_SOURCE | ||
43 | #define LIST_RC_PGDN BUTTON_RC_BITRATE | ||
44 | #define LIST_RC_PGRIGHT (BUTTON_RC_VOL_UP) | ||
45 | #define LIST_RC_PGLEFT (BUTTON_RC_VOL_DOWN) | ||
46 | #endif /* CONFIG_REMOTE_KEYPAD */ | ||
47 | |||
48 | #elif CONFIG_KEYPAD == RECORDER_PAD | ||
49 | #define LIST_NEXT BUTTON_DOWN | ||
50 | #define LIST_PREV BUTTON_UP | ||
51 | #define LIST_PGUP (BUTTON_ON | BUTTON_UP) | ||
52 | #define LIST_PGDN (BUTTON_ON | BUTTON_DOWN) | ||
53 | #define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT) | ||
54 | #define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT) | ||
55 | |||
56 | #define LIST_RC_NEXT BUTTON_RC_RIGHT | ||
57 | #define LIST_RC_PREV BUTTON_RC_LEFT | ||
58 | |||
59 | #elif CONFIG_KEYPAD == PLAYER_PAD | ||
60 | #define LIST_NEXT BUTTON_RIGHT | ||
61 | #define LIST_PREV BUTTON_LEFT | ||
62 | |||
63 | #define LIST_RC_NEXT BUTTON_RC_RIGHT | ||
64 | #define LIST_RC_PREV BUTTON_RC_LEFT | ||
65 | |||
66 | #elif CONFIG_KEYPAD == ONDIO_PAD | ||
67 | #define LIST_NEXT BUTTON_DOWN | ||
68 | #define LIST_PREV BUTTON_UP | ||
69 | #define LIST_PGRIGHT (BUTTON_MENU | BUTTON_RIGHT) | ||
70 | #define LIST_PGLEFT (BUTTON_MENU | BUTTON_LEFT) | ||
71 | |||
72 | #elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD) | ||
73 | #define LIST_NEXT BUTTON_SCROLL_FWD | ||
74 | #define LIST_PREV BUTTON_SCROLL_BACK | ||
75 | #define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT) | ||
76 | #define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT) | ||
77 | |||
78 | #elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD | ||
79 | #define LIST_NEXT BUTTON_DOWN | ||
80 | #define LIST_PREV BUTTON_UP | ||
81 | //#define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_) | ||
82 | //#define LIST_PGLEFT (BUTTON_LEFT | BUTTON_) Todo: define those | ||
83 | |||
84 | #elif CONFIG_KEYPAD == GMINI100_PAD | ||
85 | #define LIST_NEXT BUTTON_DOWN | ||
86 | #define LIST_PREV BUTTON_UP | ||
87 | #define LIST_PGUP (BUTTON_ON | BUTTON_UP) | ||
88 | #define LIST_PGDN (BUTTON_ON | BUTTON_DOWN) | ||
89 | #define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT) | ||
90 | #define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT) | ||
91 | |||
92 | #elif CONFIG_KEYPAD == IAUDIO_X5_PAD | ||
93 | #define LIST_NEXT BUTTON_DOWN | ||
94 | #define LIST_PREV BUTTON_UP | ||
95 | #define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT) | ||
96 | #define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT) | ||
97 | |||
98 | #elif CONFIG_KEYPAD == GIGABEAT_PAD | ||
99 | #define LIST_NEXT BUTTON_DOWN | ||
100 | #define LIST_PREV BUTTON_UP | ||
101 | #define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT) | ||
102 | #define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT) | ||
103 | |||
104 | #elif CONFIG_KEYPAD == IRIVER_H10_PAD | ||
105 | #define LIST_NEXT BUTTON_SCROLL_DOWN | ||
106 | #define LIST_PREV BUTTON_SCROLL_UP | ||
107 | #define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT) | ||
108 | #define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT) | ||
109 | |||
110 | #endif | ||
111 | |||
112 | /* | 29 | /* |
113 | * The gui_list is based on callback functions, if you want the list | 30 | * The gui_list is based on callback functions, if you want the list |
114 | * to display something you have to provide it a function that | 31 | * to display something you have to provide it a function that |
@@ -390,8 +307,8 @@ void gui_synclist_scroll_left(struct gui_synclist * lists); | |||
390 | * - lists : the synchronized lists | 307 | * - lists : the synchronized lists |
391 | * - button : the keycode of a pressed button | 308 | * - button : the keycode of a pressed button |
392 | * returned value : | 309 | * returned value : |
393 | * - LIST_NEXT when moving forward (next item or pgup) | 310 | * - ACTION_STD_NEXT when moving forward (next item or pgup) |
394 | * - LIST_PREV when moving backward (previous item or pgdown) | 311 | * - ACTION_STD_PREV when moving backward (previous item or pgdown) |
395 | */ | 312 | */ |
396 | extern unsigned gui_synclist_do_button(struct gui_synclist * lists, unsigned button); | 313 | extern unsigned gui_synclist_do_button(struct gui_synclist * lists, unsigned button); |
397 | 314 | ||