summaryrefslogtreecommitdiff
path: root/src/grail-gestures.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/grail-gestures.h')
-rw-r--r--src/grail-gestures.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/src/grail-gestures.h b/src/grail-gestures.h
new file mode 100644
index 0000000..70a5a98
--- /dev/null
+++ b/src/grail-gestures.h
@@ -0,0 +1,85 @@
1/*****************************************************************************
2 *
3 * grail - Gesture Recognition And Instantiation Library
4 *
5 * Copyright (C) 2010 Canonical Ltd.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * Authors:
21 * Henrik Rydberg <rydberg@bitmath.org>
22 *
23 ****************************************************************************/
24
25#ifndef _GRAIL_GESTURES_H
26#define _GRAIL_GESTURES_H
27
28#include "grail-inserter.h"
29
30struct move_model {
31 float xfuzz, yfuzz, rfuzz, afuzz;
32 float xbar, ybar, rbar, abar;
33 float x, y, r, a;
34 int ntouch;
35};
36
37void gru_init_motion(struct grail *ge,
38 const struct touch_dev_caps *caps);
39void gru_reset_motion(struct grail *ge,
40 const struct touch_frame *frame);
41void gru_compute_motion(struct grail *ge,
42 const struct touch_frame *frame);
43
44struct scroll_model {
45 float x, y;
46 int active, moving, geslot;
47};
48
49void gru_reset_scroll(struct grail *ge,
50 const struct touch_frame *frame);
51int gru_scroll(struct grail *ge,
52 const struct touch_frame *frame);
53
54struct zoom_model {
55 float r;
56 int active, zooming, geslot;
57};
58
59void gru_reset_zoom(struct grail *ge,
60 const struct touch_frame *frame);
61int gru_zoom(struct grail *ge,
62 const struct touch_frame *frame);
63
64struct rotate_model {
65 float a;
66 int active, rotating, geslot;
67};
68
69void gru_reset_rotate(struct grail *ge,
70 const struct touch_frame *frame);
71int gru_rotate(struct grail *ge,
72 const struct touch_frame *frame);
73
74struct combo_model {
75 float x, y, r, a;
76 int active, running, geslot;
77};
78
79void gru_reset_combo(struct grail *ge,
80 const struct touch_frame *frame);
81int gru_combo(struct grail *ge,
82 const struct touch_frame *frame);
83
84#endif
85