touchscreen: Fix kinetic scrolling when the statusbar is off.
[maemo-rb.git] / firmware / target / hosted / android / app / button-target.h
blob5430d7f600fd5a0615796fa241fdffb94ba3ece1
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Rob Purchase
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef _BUTTON_TARGET_H_
23 #define _BUTTON_TARGET_H_
25 #include <stdbool.h>
27 unsigned multimedia_to_button(int keyboard_key);
28 unsigned dpad_to_button(int keyboard_key);
29 void android_ignore_back_button(bool yes);
31 /* Main unit's buttons */
32 #define BUTTON_MENU 0x00000001
33 #define BUTTON_BACK 0x00000002
34 #define BUTTON_DPAD_LEFT 0x00000004
35 #define BUTTON_DPAD_RIGHT 0x00000008
36 #define BUTTON_DPAD_UP 0x00000010
37 #define BUTTON_DPAD_DOWN 0x00000020
38 #define BUTTON_DPAD_CENTER 0x00000040
39 #define BUTTON_VOL_UP 0x00000080
40 #define BUTTON_VOL_DOWN 0x00000100
42 /* Compatibility hacks for flipping. Needs a somewhat better fix. */
43 #define BUTTON_LEFT BUTTON_DPAD_LEFT
44 #define BUTTON_RIGHT BUTTON_DPAD_RIGHT
45 #define BUTTON_UP BUTTON_DPAD_UP
46 #define BUTTON_DOWN BUTTON_DPAD_DOWN
48 /* Touch Screen Area Buttons */
49 #define BUTTON_TOPLEFT 0x00001000
50 #define BUTTON_TOPMIDDLE 0x00002000
51 #define BUTTON_TOPRIGHT 0x00004000
52 #define BUTTON_MIDLEFT 0x00008000
53 #define BUTTON_CENTER 0x00010000
54 #define BUTTON_MIDRIGHT 0x00020000
55 #define BUTTON_BOTTOMLEFT 0x00040000
56 #define BUTTON_BOTTOMMIDDLE 0x00080000
57 #define BUTTON_BOTTOMRIGHT 0x00100000
59 #endif /* _BUTTON_TARGET_H_ */