diff options
Diffstat (limited to 'test/grail.c')
| -rw-r--r-- | test/grail.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/grail.c b/test/grail.c index 361fd22..795e88f 100644 --- a/test/grail.c +++ b/test/grail.c | |||
| @@ -31,28 +31,31 @@ | |||
| 31 | static int tp_get_clients(struct grail *ge, | 31 | static int tp_get_clients(struct grail *ge, |
| 32 | struct grail_client_info *clients, int max_clients, | 32 | struct grail_client_info *clients, int max_clients, |
| 33 | const struct grail_coord *coords, int num_coords, | 33 | const struct grail_coord *coords, int num_coords, |
| 34 | const grail_mask_t *types) | 34 | const grail_mask_t *types, int ntypes) |
| 35 | { | 35 | { |
| 36 | memset(&clients[0], 0, sizeof(clients[0])); | 36 | memset(&clients[0], 0, sizeof(clients[0])); |
| 37 | clients[0].id.client = 345; | 37 | clients[0].id.client = 345; |
| 38 | clients[0].id.root = 1; | 38 | clients[0].id.root = 1; |
| 39 | clients[0].id.event = 2; | 39 | clients[0].id.event = 2; |
| 40 | clients[0].id.child = 3; | 40 | clients[0].id.child = 3; |
| 41 | clients[0].mask[0] = 3; | 41 | clients[0].mask[0] = 0xff; |
| 42 | return 1; | 42 | return 1; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | static void tp_event(struct grail *ge, const struct input_event *ev) | 45 | static void tp_event(struct grail *ge, const struct input_event *ev) |
| 46 | { | 46 | { |
| 47 | fprintf(stderr, "event %d %d %d\n", ev->type, ev->code, ev->value); | 47 | fprintf(stderr, "event %d 0x%x %d\n", ev->type, ev->code, ev->value); |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | static void tp_gesture(struct grail *ge, const struct grail_event *ev) | 50 | static void tp_gesture(struct grail *ge, const struct grail_event *ev) |
| 51 | { | 51 | { |
| 52 | fprintf(stderr, "gesture %d %d %d %d: %d %d\n", | 52 | int i; |
| 53 | fprintf(stderr, "gesture %d %d %d %d %f %f %d:\n", | ||
| 53 | ev->type, ev->id, | 54 | ev->type, ev->id, |
| 54 | ev->client_id.client, ev->client_id.event, | 55 | ev->client_id.client, ev->client_id.event, |
| 55 | ev->prop[0], ev->prop[1]); | 56 | ev->pos.x, ev->pos.y, ev->ntouch); |
| 57 | for (i = 0; i < ev->nprop; i++) | ||
| 58 | fprintf(stderr, "\t%d: %f\n", i, ev->prop[i]); | ||
| 56 | } | 59 | } |
| 57 | 60 | ||
| 58 | static void loop_device(struct grail *ge, int fd) | 61 | static void loop_device(struct grail *ge, int fd) |
