Don't force double-buffering for sd devices. They apparently are not faster with...
[kugel-rb.git] / apps / plugins / lib / touchscreen.h
blobcd5251e46f505a7e292cf2f7ba21ce7c8d63a6b4
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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_
25 #include "plugin.h"
27 #ifdef HAVE_TOUCHSCREEN
29 struct ts_mapping
31 int tl_x; /* top left */
32 int tl_y;
33 int width;
34 int height;
37 struct ts_mappings
39 struct ts_mapping *mappings;
40 int amount;
43 unsigned int touchscreen_map(struct ts_mappings *map, int x, int y);
45 struct ts_raster
47 int tl_x; /* top left */
48 int tl_y;
49 int width;
50 int height;
51 int raster_width;
52 int raster_height;
55 struct ts_raster_result
57 int x;
58 int y;
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
79 enum{
80 TS_ACTION_NONE,
81 TS_ACTION_MOVE,
82 TS_ACTION_CLICK,
83 TS_ACTION_DOUBLE_CLICK,
84 TS_ACTION_DRAG_DROP,
85 TS_ACTION_TWO_D_MOVEMENT
86 } action;
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_ */