diff options
Diffstat (limited to 'src/grail-gestures.h')
| -rw-r--r-- | src/grail-gestures.h | 77 |
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 | |||
| 34 | struct filter_model { | ||
| 35 | float delta, val, orig, fuzz, bar; | ||
| 36 | int tickle, active; | ||
| 37 | }; | ||
| 38 | |||
| 39 | struct 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 | |||
| 46 | void gru_init_motion(struct grail *ge); | ||
| 47 | void gru_motion(struct grail *ge, | ||
| 48 | const struct touch_frame *frame); | ||
| 49 | void gru_event(struct grail *ge, int gid, | ||
| 50 | const struct move_model *move, | ||
| 51 | const grail_prop_t *prop, int nprop); | ||
| 52 | |||
| 53 | struct combo_model { | ||
| 54 | int active, gid; | ||
| 55 | }; | ||
| 56 | |||
| 57 | int gru_pan(struct grail *ge, | ||
| 58 | const struct touch_frame *frame); | ||
| 59 | int gru_pinch(struct grail *ge, | ||
| 60 | const struct touch_frame *frame); | ||
| 61 | int gru_rotate(struct grail *ge, | ||
| 62 | const struct touch_frame *frame); | ||
| 63 | int gru_combo(struct grail *ge, | ||
| 64 | const struct touch_frame *frame); | ||
| 65 | |||
| 66 | struct tapping_model { | ||
| 67 | grail_time_t start; | ||
| 68 | float x, y; | ||
| 69 | int status, ntouch; | ||
| 70 | int active, gid; | ||
| 71 | }; | ||
| 72 | |||
| 73 | int gru_tapping(struct grail *ge, | ||
| 74 | const struct touch_frame *frame); | ||
| 75 | |||
| 76 | #endif | ||
| 77 | |||
