summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/grail-gesture.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/grail-gesture.c b/test/grail-gesture.c
index 762d3df..d30e713 100644
--- a/test/grail-gesture.c
+++ b/test/grail-gesture.c
@@ -53,11 +53,21 @@ static void tp_event(struct grail *ge, const struct input_event *ev)
53 53
54static void tp_gesture(struct grail *ge, const struct grail_event *ev) 54static void tp_gesture(struct grail *ge, const struct grail_event *ev)
55{ 55{
56 int i; 56 struct grail_contact touch[32];
57 int i, ntouch;
57 fprintf(stderr, "gesture %d %d %d %d - %f %f %d - %d\n", 58 fprintf(stderr, "gesture %d %d %d %d - %f %f %d - %d\n",
58 ev->type, ev->id, ev->client_id.client, ev->client_id.event, 59 ev->type, ev->id, ev->client_id.client, ev->client_id.event,
59 ev->pos.x, ev->pos.y, ev->ntouch, 60 ev->pos.x, ev->pos.y, ev->ntouch,
60 ev->status); 61 ev->status);
62 ntouch = grail_get_contacts(ge, touch, 32);
63 for (i = 0; i < ntouch; i++) {
64 const struct grail_contact *t = &touch[i];
65 fprintf(stderr, "\t%d: %d %d\n", i, t->id, t->tool_type);
66 fprintf(stderr, "\t %f %f\n", t->pos.x, t->pos.y);
67 fprintf(stderr, "\t %f %f %f %f\n", t->touch_major,
68 t->touch_minor, t->width_major, t->width_minor);
69 fprintf(stderr, "\t %f %f\n", t->angle, t->pressure);
70 }
61 for (i = 0; i < ev->nprop; i++) 71 for (i = 0; i < ev->nprop; i++)
62 fprintf(stderr, "\t%d: %f\n", i, ev->prop[i]); 72 fprintf(stderr, "\t%d: %f\n", i, ev->prop[i]);
63} 73}