From 49f1ec8e8ad0b4c06df01fcdd4b18037fbe3ebcc Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 31 Oct 2010 15:32:57 +0000 Subject: Add support multimedia keys/buttons to the core, and adapt Rockbox on android for it (multimedia buttons are found on wired headsets and the lock screen in cyanogenmod). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28421 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/button.h | 15 +++++++++++++++ firmware/export/config/application.h | 1 + 2 files changed, 16 insertions(+) (limited to 'firmware/export') diff --git a/firmware/export/button.h b/firmware/export/button.h index 097f50a9d5..3847d2ac9f 100644 --- a/firmware/export/button.h +++ b/firmware/export/button.h @@ -69,6 +69,21 @@ int button_apply_acceleration(const unsigned int data); #define BUTTON_REL 0x02000000 #define BUTTON_REPEAT 0x04000000 #define BUTTON_TOUCHSCREEN 0x08000000 +#define BUTTON_MULTIMEDIA 0x10000000 + +#define BUTTON_MULTIMEDIA_PLAYPAUSE (BUTTON_MULTIMEDIA|0x01) +#define BUTTON_MULTIMEDIA_STOP (BUTTON_MULTIMEDIA|0x02) +#define BUTTON_MULTIMEDIA_PREV (BUTTON_MULTIMEDIA|0x04) +#define BUTTON_MULTIMEDIA_NEXT (BUTTON_MULTIMEDIA|0x08) +#define BUTTON_MULTIMEDIA_REW (BUTTON_MULTIMEDIA|0x10) +#define BUTTON_MULTIMEDIA_FFWD (BUTTON_MULTIMEDIA|0x20) + +#define BUTTON_MULTIMEDIA_ALL (BUTTON_MULTIMEDIA_PLAYPAUSE| \ + BUTTON_MULTIMEDIA_STOP| \ + BUTTON_MULTIMEDIA_PREV| \ + BUTTON_MULTIMEDIA_NEXT| \ + BUTTON_MULTIMEDIA_REW | \ + BUTTON_MULTIMEDIA_FFWD) #ifdef HAVE_TOUCHSCREEN int touchscreen_last_touch(void); diff --git a/firmware/export/config/application.h b/firmware/export/config/application.h index 4dc34c14fa..b731f0cf76 100644 --- a/firmware/export/config/application.h +++ b/firmware/export/config/application.h @@ -77,6 +77,7 @@ #if (CONFIG_PLATFORM & PLATFORM_ANDROID) #define CONFIG_KEYPAD ANDROID_PAD +#define HAVE_MULTIMEDIA_KEYS #elif (CONFIG_PLATFORM & PLATFORM_SDL) #define HAVE_SCROLLWHEEL #define CONFIG_KEYPAD SDL_PAD -- cgit v1.2.3