summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-10-31 15:32:57 +0000
committerThomas Martitz <kugel@rockbox.org>2010-10-31 15:32:57 +0000
commit49f1ec8e8ad0b4c06df01fcdd4b18037fbe3ebcc (patch)
treeb185e604dcea64865389f5b149e754ba8ffd3f75 /firmware/export
parentdbe2ac1ec6f4ed88f267d2a4df024b6dc42a87ff (diff)
downloadrockbox-49f1ec8e8ad0b4c06df01fcdd4b18037fbe3ebcc.zip
rockbox-49f1ec8e8ad0b4c06df01fcdd4b18037fbe3ebcc.tar.gz
rockbox-49f1ec8e8ad0b4c06df01fcdd4b18037fbe3ebcc.tar.bz2
rockbox-49f1ec8e8ad0b4c06df01fcdd4b18037fbe3ebcc.tar.xz
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
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/button.h15
-rw-r--r--firmware/export/config/application.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/firmware/export/button.h b/firmware/export/button.h
index 097f50a..3847d2a 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 4dc34c1..b731f0c 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