1 /***************************************************************************
4 * Copyright (C) 2008 Henrik Rydberg <rydberg@euromail.se>
5 * Copyright (C) 2011 Ryan Bourgeois <bluedragonx@gmail.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 **************************************************************************/
42 #define GS_DRAG_READY 6
43 #define GS_DRAG_WAIT 7
44 #define GS_DRAG_ACTIVE 8
47 /* Taps, physical buttons, and gestures will trigger
48 * button events. If a bit is set, the button is down.
49 * If a bit is not set, the button is up.
54 /* Pointer movement is tracked here.
58 /* Current time and time delta. Updated after each event and after sleeping.
63 /* Internal state tracking. Not for direct access.
67 struct timeval button_delayed_time;
68 struct timeval button_delayed_delta;
72 struct timeval tap_time_down;
81 struct timeval move_wait;
82 struct timeval move_drag_wait;
83 struct timeval move_drag_expire;
87 void gestures_init(struct MTouch* mt);
88 void gestures_extract(struct MTouch* mt);
89 int gestures_delayed(struct MTouch* mt);