summaryrefslogtreecommitdiff
path: root/src/grail-gestures.h
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-08-06 21:11:17 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-08-06 21:11:17 +0200
commit7db9d8d76ff61c4802ac15559dcea6fa54ff567a (patch)
treeb67e040c0abeb0ab1fca72754a767dc9ab851461 /src/grail-gestures.h
initial bzr repo at rev 27
Diffstat (limited to 'src/grail-gestures.h')
-rw-r--r--src/grail-gestures.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/grail-gestures.h b/src/grail-gestures.h
new file mode 100644
index 0000000..663d357
--- /dev/null
+++ b/src/grail-gestures.h
@@ -0,0 +1,77 @@
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
30#define PRIO_POINTER 1
31#define PRIO_GESTURE 2
32#define PRIO_TAP 3
33
34struct filter_model {
35 float delta, val, orig, fuzz, bar;
36 int tickle, active;
37};
38
39struct move_model {
40 struct filter_model x, y, r, a;
41 int multi, ntouch;
42 float dx, dy, dr, da;
43 grail_time_t time;
44};
45
46void gru_init_motion(struct grail *ge);
47void gru_motion(struct grail *ge,
48 const struct touch_frame *frame);
49void gru_event(struct grail *ge, int gid,
50 const struct move_model *move,
51 const grail_prop_t *prop, int nprop);
52
53struct combo_model {
54 int active, gid;
55};
56
57int gru_pan(struct grail *ge,
58 const struct touch_frame *frame);
59int gru_pinch(struct grail *ge,
60 const struct touch_frame *frame);
61int gru_rotate(struct grail *ge,
62 const struct touch_frame *frame);
63int gru_combo(struct grail *ge,
64 const struct touch_frame *frame);
65
66struct tapping_model {
67 grail_time_t start;
68 float x, y;
69 int status, ntouch;
70 int active, gid;
71};
72
73int gru_tapping(struct grail *ge,
74 const struct touch_frame *frame);
75
76#endif
77