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.tar.gz
rockbox-49f1ec8e8ad0b4c06df01fcdd4b18037fbe3ebcc.zip
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 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);
69#define BUTTON_REL 0x02000000 69#define BUTTON_REL 0x02000000
70#define BUTTON_REPEAT 0x04000000 70#define BUTTON_REPEAT 0x04000000
71#define BUTTON_TOUCHSCREEN 0x08000000 71#define BUTTON_TOUCHSCREEN 0x08000000
72#define BUTTON_MULTIMEDIA 0x10000000
73
74#define BUTTON_MULTIMEDIA_PLAYPAUSE (BUTTON_MULTIMEDIA|0x01)
75#define BUTTON_MULTIMEDIA_STOP (BUTTON_MULTIMEDIA|0x02)
76#define BUTTON_MULTIMEDIA_PREV (BUTTON_MULTIMEDIA|0x04)
77#define BUTTON_MULTIMEDIA_NEXT (BUTTON_MULTIMEDIA|0x08)
78#define BUTTON_MULTIMEDIA_REW (BUTTON_MULTIMEDIA|0x10)
79#define BUTTON_MULTIMEDIA_FFWD (BUTTON_MULTIMEDIA|0x20)
80
81#define BUTTON_MULTIMEDIA_ALL (BUTTON_MULTIMEDIA_PLAYPAUSE| \
82 BUTTON_MULTIMEDIA_STOP| \
83 BUTTON_MULTIMEDIA_PREV| \
84 BUTTON_MULTIMEDIA_NEXT| \
85 BUTTON_MULTIMEDIA_REW | \
86 BUTTON_MULTIMEDIA_FFWD)
72 87
73#ifdef HAVE_TOUCHSCREEN 88#ifdef HAVE_TOUCHSCREEN
74int touchscreen_last_touch(void); 89int 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 @@
77 77
78#if (CONFIG_PLATFORM & PLATFORM_ANDROID) 78#if (CONFIG_PLATFORM & PLATFORM_ANDROID)
79#define CONFIG_KEYPAD ANDROID_PAD 79#define CONFIG_KEYPAD ANDROID_PAD
80#define HAVE_MULTIMEDIA_KEYS
80#elif (CONFIG_PLATFORM & PLATFORM_SDL) 81#elif (CONFIG_PLATFORM & PLATFORM_SDL)
81#define HAVE_SCROLLWHEEL 82#define HAVE_SCROLLWHEEL
82#define CONFIG_KEYPAD SDL_PAD 83#define CONFIG_KEYPAD SDL_PAD