summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/grail-touch.h85
1 files changed, 0 insertions, 85 deletions
diff --git a/include/grail-touch.h b/include/grail-touch.h
deleted file mode 100644
index 9c63c80..0000000
--- a/include/grail-touch.h
+++ /dev/null
@@ -1,85 +0,0 @@
1/*****************************************************************************
2 *
3 * grail - Gesture Recognition And Instantiation Library
4 *
5 * Copyright (C) 2010 Canonical Ltd.
6 * Copyright (C) 2010 Henrik Rydberg <rydberg@bitmath.org>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 ****************************************************************************/
22
23#ifndef _GRAIL_TOUCH_H
24#define _GRAIL_TOUCH_H
25
26#include <grail-bits.h>
27#include <mtdev.h>
28
29#define DIM_TOUCH 32
30#define DIM_TOUCH_BYTES ((DIM_TOUCH + 7) >> 3)
31
32typedef __u64 touch_time_t;
33
34struct touch {
35 int active;
36 int slot;
37 int id;
38 int tool_type;
39 int x, y;
40 int touch_major;
41 int touch_minor;
42 int width_major;
43 int width_minor;
44 int orientation;
45 int pressure;
46};
47
48struct touch_frame {
49 int nactive;
50 int ncreate, nmodify, ndestroy;
51 touch_time_t time;
52 grail_mask_t touches[DIM_TOUCH_BYTES];
53 struct touch *active[DIM_TOUCH];
54 struct touch touch[DIM_TOUCH];
55};
56
57struct touch_caps {
58 float min_x, max_x;
59 float min_y, max_y;
60 float min_orient, max_orient;
61 float min_press, max_press;
62};
63
64struct touch_dev {
65 void (*event)(struct touch_dev *dev, const struct input_event *ev);
66 void (*sync)(struct touch_dev *dev, const struct input_event *syn);
67 void *priv;
68 struct mtdev mtdev;
69 struct touch_frame frame;
70 struct touch_caps caps;
71 int slot;
72 int state;
73};
74
75int touch_caps_is_supported(struct touch_dev *dev, int fd);
76void touch_caps_init(struct touch_dev *dev);
77float touch_angle(const struct touch_dev *dev, int orientation);
78float touch_pressure(const struct touch_dev *dev, int pressure);
79
80int touch_dev_open(struct touch_dev *dev, int fd);
81int touch_dev_idle(struct touch_dev *dev, int fd, int ms);
82int touch_dev_pull(struct touch_dev *dev, int fd);
83void touch_dev_close(struct touch_dev *dev, int fd);
84
85#endif