summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/android/app/button-target.h
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2010-08-16 20:12:06 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2010-08-16 20:12:06 +0000
commit934a5a5808c7a0b0dff469ad2c3a523e78a4ef4b (patch)
tree0aec8be568bea16b68ac87086387ba73089d931f /firmware/target/hosted/android/app/button-target.h
parente726e53da68d3ff53a79023d5dc5cfcc020fb864 (diff)
Android port: add support for hardware keys
* Forward Java KeyEvents to C layer and translate them to Rockbox BUTTON_*. * Add a basic Android keymap git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27832 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/hosted/android/app/button-target.h')
-rw-r--r--firmware/target/hosted/android/app/button-target.h43
1 files changed, 20 insertions, 23 deletions
diff --git a/firmware/target/hosted/android/app/button-target.h b/firmware/target/hosted/android/app/button-target.h
index 329ed651af..6c7bd271e9 100644
--- a/firmware/target/hosted/android/app/button-target.h
+++ b/firmware/target/hosted/android/app/button-target.h
@@ -30,35 +30,32 @@ void button_init_device(void);
int button_read_device(int *data);
/* Main unit's buttons */
-#define BUTTON_POWER 0x00000001
-#define BUTTON_PLUS 0x00000002
-#define BUTTON_MINUS 0x00000004
-#define BUTTON_MENU 0x00000008
+#define BUTTON_MENU 0x00000001
+#define BUTTON_BACK 0x00000002
+#define BUTTON_DPAD_LEFT 0x00000004
+#define BUTTON_DPAD_RIGHT 0x00000008
+#define BUTTON_DPAD_UP 0x00000010
+#define BUTTON_DPAD_DOWN 0x00000020
+#define BUTTON_DPAD_CENTER 0x00000040
/* Compatibility hacks for flipping. Needs a somewhat better fix. */
-#define BUTTON_LEFT BUTTON_MIDLEFT
-#define BUTTON_RIGHT BUTTON_MIDRIGHT
-#define BUTTON_UP BUTTON_TOPMIDDLE
-#define BUTTON_DOWN BUTTON_BOTTOMMIDDLE
+#define BUTTON_LEFT BUTTON_DPAD_LEFT
+#define BUTTON_RIGHT BUTTON_DPAD_RIGHT
+#define BUTTON_UP BUTTON_DPAD_UP
+#define BUTTON_DOWN BUTTON_DPAD_DOWN
/* Touch Screen Area Buttons */
-#define BUTTON_TOPLEFT 0x00000010
-#define BUTTON_TOPMIDDLE 0x00000020
-#define BUTTON_TOPRIGHT 0x00000040
-#define BUTTON_MIDLEFT 0x00000080
-#define BUTTON_CENTER 0x00000100
-#define BUTTON_MIDRIGHT 0x00000200
-#define BUTTON_BOTTOMLEFT 0x00000400
-#define BUTTON_BOTTOMMIDDLE 0x00000800
-#define BUTTON_BOTTOMRIGHT 0x00001000
-
-#define BUTTON_MAIN 0x1FFF
+#define BUTTON_TOPLEFT 0x00001000
+#define BUTTON_TOPMIDDLE 0x00002000
+#define BUTTON_TOPRIGHT 0x00004000
+#define BUTTON_MIDLEFT 0x00008000
+#define BUTTON_CENTER 0x00010000
+#define BUTTON_MIDRIGHT 0x00020000
+#define BUTTON_BOTTOMLEFT 0x00040000
+#define BUTTON_BOTTOMMIDDLE 0x00080000
+#define BUTTON_BOTTOMRIGHT 0x00100000
/* No remote */
#define BUTTON_REMOTE 0
-
-/* Software power-off */
-#define POWEROFF_BUTTON BUTTON_POWER
-#define POWEROFF_COUNT 10
#endif /* _BUTTON_TARGET_H_ */