1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2008 by Maurus Cuelenaere
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 _PLUGIN_LIB_TOUCHSCREEN_H_
23 #define _PLUGIN_LIB_TOUCHSCREEN_H_
27 #ifdef HAVE_TOUCHSCREEN
31 int tl_x
; /* top left */
39 struct ts_mapping
*mappings
;
43 unsigned int touchscreen_map(struct ts_mappings
*map
, int x
, int y
);
47 int tl_x
; /* top left */
55 struct ts_raster_result
61 unsigned int touchscreen_map_raster(struct ts_raster
*map
, int x
, int y
, struct ts_raster_result
*result
);
63 struct ts_raster_button_mapping
65 struct ts_raster
*raster
;
66 bool drag_drop_enable
; /* ... */
67 bool double_click_enable
; /* ... */
68 bool click_enable
; /* ... */
69 bool move_progress_enable
; /* ... */
70 bool two_d_movement_enable
; /* ... */
71 struct ts_raster_result two_d_from
; /* ... */
72 int _prev_x
; /* Internal: DO NOT MODIFY! */
73 int _prev_y
; /* Internal: DO NOT MODIFY! */
74 int _prev_btn_state
; /* Internal: DO NOT MODIFY! */
77 struct ts_raster_button_result
83 TS_ACTION_DOUBLE_CLICK
,
85 TS_ACTION_TWO_D_MOVEMENT
87 struct ts_raster_result from
;
88 struct ts_raster_result to
;
91 struct ts_raster_button_result
touchscreen_raster_map_button(struct ts_raster_button_mapping
*map
, int x
, int y
, int button
);
93 #endif /* HAVE_TOUCHSCREEN */
94 #endif /* _PLUGIN_LIB_TOUCHSCREEN_H_ */