diff options
| author | Henrik Rydberg <rydberg@bitmath.org> | 2010-07-20 15:39:08 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-08-05 22:48:38 +0200 |
| commit | eb896e11aacab5f53e3915a8d19ffffd92ce8e10 (patch) | |
| tree | a2b12258c1697e61854704a0eff14070bc9fa963 /test/grail.c | |
| parent | 3b9c20f869a2f55bd9953665c9e7fd713db4ff43 (diff) | |
Touch API changes
Add touch time to the touch frame (Thanks Rafi)
Add touch change counters to the touch frame
Add event bypass callback
Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
Diffstat (limited to 'test/grail.c')
| -rw-r--r-- | test/grail.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/grail.c b/test/grail.c index 3fe20ee..82de65f 100644 --- a/test/grail.c +++ b/test/grail.c | |||
| @@ -128,11 +128,16 @@ static void gh_destroy(struct gesture_handler *gh) | |||
| 128 | gedev_destroy(&gh->dev); | 128 | gedev_destroy(&gh->dev); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | static void tp_sync(struct touch_engine *engine, touch_time_t time) | 131 | static void tp_event(struct touch_engine *engine, |
| 132 | const struct input_event *ev) | ||
| 133 | { | ||
| 134 | } | ||
| 135 | |||
| 136 | static void tp_sync(struct touch_engine *engine) | ||
| 132 | { | 137 | { |
| 133 | struct gesture_handler *gh = engine->priv; | 138 | struct gesture_handler *gh = engine->priv; |
| 134 | struct touch_frame *frame = &engine->frame; | 139 | struct touch_frame *frame = &engine->frame; |
| 135 | gh_handle(gh, frame, time); | 140 | gh_handle(gh, frame, frame->time); |
| 136 | } | 141 | } |
| 137 | 142 | ||
| 138 | static void loop_device(struct touch_dev *dev, int fd) | 143 | static void loop_device(struct touch_dev *dev, int fd) |
| @@ -140,7 +145,7 @@ static void loop_device(struct touch_dev *dev, int fd) | |||
| 140 | struct gesture_handler gh; | 145 | struct gesture_handler gh; |
| 141 | struct touch_engine engine; | 146 | struct touch_engine engine; |
| 142 | gh_init(&gh); | 147 | gh_init(&gh); |
| 143 | touch_engine_init(&engine, tp_sync, &gh); | 148 | touch_engine_init(&engine, tp_event, tp_sync, &gh); |
| 144 | touch_engine_attach(&engine, dev); | 149 | touch_engine_attach(&engine, dev); |
| 145 | while (!touch_dev_idle(dev, fd, 5000)) | 150 | while (!touch_dev_idle(dev, fd, 5000)) |
| 146 | touch_dev_pull(dev, fd); | 151 | touch_dev_pull(dev, fd); |
