diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-08-06 21:11:17 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-08-06 21:11:17 +0200 |
| commit | 7db9d8d76ff61c4802ac15559dcea6fa54ff567a (patch) | |
| tree | b67e040c0abeb0ab1fca72754a767dc9ab851461 /src/grail-inserter.h | |
initial bzr repo at rev 27
Diffstat (limited to 'src/grail-inserter.h')
| -rw-r--r-- | src/grail-inserter.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/grail-inserter.h b/src/grail-inserter.h new file mode 100644 index 0000000..3ffacec --- /dev/null +++ b/src/grail-inserter.h | |||
| @@ -0,0 +1,71 @@ | |||
| 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_INSERTER_H | ||
| 26 | #define _GRAIL_INSERTER_H | ||
| 27 | |||
| 28 | #include <grail-touch.h> | ||
| 29 | #include <grail.h> | ||
| 30 | #include "gebuf.h" | ||
| 31 | |||
| 32 | #define DIM_EV_TYPE EV_CNT | ||
| 33 | #define DIM_EV_TYPE_BYTES ((DIM_EV_TYPE + 7) >> 3) | ||
| 34 | |||
| 35 | #define DIM_INSTANCE 32 | ||
| 36 | #define DIM_INSTANCE_BYTES ((DIM_INSTANCE + 7) >> 3) | ||
| 37 | |||
| 38 | #define DIM_CLIENT 32 | ||
| 39 | |||
| 40 | struct slot_state { | ||
| 41 | int type; | ||
| 42 | int priority; | ||
| 43 | int id; | ||
| 44 | int status; | ||
| 45 | int nclient; | ||
| 46 | struct grail_client_id client_id[DIM_CLIENT]; | ||
| 47 | grail_mask_t span[DIM_TOUCH_BYTES]; | ||
| 48 | struct gebuf buf; | ||
| 49 | }; | ||
| 50 | |||
| 51 | int gin_init(struct grail *ge); | ||
| 52 | void gin_destroy(struct grail *ge); | ||
| 53 | |||
| 54 | void gin_frame_begin(struct grail *ge, const struct touch_frame *frame); | ||
| 55 | void gin_frame_end(struct grail *ge, grail_mask_t *filtered, int max_filtered, | ||
| 56 | const struct touch_frame *frame); | ||
| 57 | |||
| 58 | int gin_gid_begin_select(struct grail *ge, int type, int priority, | ||
| 59 | const grail_mask_t *span, int nspan); | ||
| 60 | int gin_gid_begin(struct grail *ge, int type, int priority, | ||
| 61 | const struct touch_frame *frame); | ||
| 62 | void gin_gid_discard(struct grail *ge, int gid); | ||
| 63 | |||
| 64 | void gin_gid_event(struct grail *ge, int gid, | ||
| 65 | float x, float y, int ntouch, | ||
| 66 | const grail_prop_t *prop, int nprop, | ||
| 67 | int status); | ||
| 68 | void gin_gid_end(struct grail *ge, int gid, | ||
| 69 | float x, float y, int ntouch); | ||
| 70 | |||
| 71 | #endif | ||
