summaryrefslogtreecommitdiff
path: root/apps/radio
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-06-21 06:04:19 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-06-21 06:04:19 +0000
commita398c2846aa86650aa386a68cb51929477b6aa23 (patch)
tree4fa695ba8ea3a2b0e0c1f1c1ab5ac9ce27430804 /apps/radio
parent2b0ef19900295ef4e8da0fa52a13a04ccf76cb65 (diff)
Touchregion support for the Base Skin and FM Skins. display obviously needs to be in stylus mode for this to work. Just about all screens should be mostly useable if your sbs has the next/prev/select/cancel/menu regions defined.
Plenty of room to add new action abilities if they are wanted. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27004 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/radio')
-rw-r--r--apps/radio/radio_skin.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/apps/radio/radio_skin.c b/apps/radio/radio_skin.c
index 838d1f96da..c7994b3135 100644
--- a/apps/radio/radio_skin.c
+++ b/apps/radio/radio_skin.c
@@ -108,8 +108,32 @@ void fms_skin_init(void)
int fms_do_button_loop(bool update_screen)
{
- return skin_wait_for_action(fms_skin, CONTEXT_FM,
+ int button = skin_wait_for_action(fms_skin, CONTEXT_FM,
update_screen ? TIMEOUT_NOBLOCK : HZ);
+#ifdef HAVE_TOUCHSCREEN
+ int offset;
+ if (button == ACTION_TOUCHSCREEN)
+ button = skin_get_touchaction(&fms_skin_data[SCREEN_MAIN], &offset);
+ switch (button)
+ {
+ case ACTION_WPS_STOP:
+ return ACTION_FM_STOP;
+ case ACTION_STD_CANCEL:
+ return ACTION_FM_EXIT;
+ case ACTION_WPS_VOLUP:
+ return ACTION_SETTINGS_INC;
+ case ACTION_WPS_VOLDOWN:
+ return ACTION_SETTINGS_DEC;
+ case ACTION_WPS_PLAY:
+ return ACTION_FM_PLAY;
+ case ACTION_STD_MENU:
+ return ACTION_FM_MENU;
+ case WPS_TOUCHREGION_SCROLLBAR:
+ /* TODO */
+ break;
+ }
+#endif
+ return button;
}
struct gui_wps *fms_get(enum screen_type screen)