diff options
Diffstat (limited to 'include/touch-dev.h')
| -rw-r--r-- | include/touch-dev.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/touch-dev.h b/include/touch-dev.h new file mode 100644 index 0000000..4ecd61b --- /dev/null +++ b/include/touch-dev.h | |||
| @@ -0,0 +1,49 @@ | |||
| 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_TOUCH_DEV_H | ||
| 26 | #define _GRAIL_TOUCH_DEV_H | ||
| 27 | |||
| 28 | #include <touch.h> | ||
| 29 | |||
| 30 | typedef __u64 touch_time_t; | ||
| 31 | |||
| 32 | struct touch_dev { | ||
| 33 | void (*event)(struct touch_dev *dev, const struct input_event *ev); | ||
| 34 | void (*create)(struct touch_dev *dev, int slot, | ||
| 35 | const touch_prop_mask_t *mask, const touch_prop_t *prop); | ||
| 36 | void (*modify)(struct touch_dev *dev, int slot, | ||
| 37 | const touch_prop_mask_t *mask, const touch_prop_t *prop); | ||
| 38 | void (*destroy)(struct touch_dev *dev, int slot); | ||
| 39 | void (*sync)(struct touch_dev *dev, touch_time_t time); | ||
| 40 | struct touch_dev_impl *impl; | ||
| 41 | void *priv; | ||
| 42 | }; | ||
| 43 | |||
| 44 | int touch_dev_open(struct touch_dev *dev, int fd); | ||
| 45 | int touch_dev_idle(struct touch_dev *dev, int fd, int ms); | ||
| 46 | int touch_dev_pull(struct touch_dev *dev, int fd); | ||
| 47 | void touch_dev_close(struct touch_dev *dev, int fd); | ||
| 48 | |||
| 49 | #endif | ||
