diff options
Diffstat (limited to 'firmware/target/hosted/sdl/buttonmap.h')
-rw-r--r-- | firmware/target/hosted/sdl/buttonmap.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/firmware/target/hosted/sdl/buttonmap.h b/firmware/target/hosted/sdl/buttonmap.h new file mode 100644 index 0000000000..e90b8a40d4 --- /dev/null +++ b/firmware/target/hosted/sdl/buttonmap.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2010 by Fred Bauer | ||
11 | * | ||
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. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #ifndef __BUTTONMAP_H__ | ||
23 | #define __BUTTONMAP_H__ | ||
24 | /* Button maps: simulated key, x, y, radius, name */ | ||
25 | /* Run sim with --mapping to get coordinates */ | ||
26 | /* or --debugbuttons to check */ | ||
27 | /* The First matching button is returned */ | ||
28 | struct button_map { | ||
29 | int button, x, y, radius; | ||
30 | char *description; | ||
31 | }; | ||
32 | |||
33 | extern struct button_map bm[]; | ||
34 | |||
35 | int xy2button( int x, int y); | ||
36 | |||
37 | /* for the sim, these function is implemented in uisimulator/buttonmap/ *.c */ | ||
38 | int key_to_button(int keyboard_button); | ||
39 | #ifdef HAVE_TOUCHSCREEN | ||
40 | int key_to_touch(int keyboard_button, unsigned int mouse_coords); | ||
41 | #endif | ||
42 | |||
43 | #endif /* __BUTTONMAP_H__ */ | ||