From d07c43f9f19dc0ee38aaf44947cfc396f437490e Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Tue, 3 Aug 2010 15:01:50 +0200 Subject: Introduce zoom, rotate and combo gestures Introduce grail_mask bit functions, and add new gestures as separate functions, referring to the same move model. Signed-off-by: Henrik Rydberg --- test/grail.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'test/grail.c') 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 @@ static int tp_get_clients(struct grail *ge, struct grail_client_info *clients, int max_clients, const struct grail_coord *coords, int num_coords, - const grail_mask_t *types) + const grail_mask_t *types, int ntypes) { memset(&clients[0], 0, sizeof(clients[0])); clients[0].id.client = 345; clients[0].id.root = 1; clients[0].id.event = 2; clients[0].id.child = 3; - clients[0].mask[0] = 3; + clients[0].mask[0] = 0xff; return 1; } static void tp_event(struct grail *ge, const struct input_event *ev) { - fprintf(stderr, "event %d %d %d\n", ev->type, ev->code, ev->value); + fprintf(stderr, "event %d 0x%x %d\n", ev->type, ev->code, ev->value); } static void tp_gesture(struct grail *ge, const struct grail_event *ev) { - fprintf(stderr, "gesture %d %d %d %d: %d %d\n", + int i; + fprintf(stderr, "gesture %d %d %d %d %f %f %d:\n", ev->type, ev->id, ev->client_id.client, ev->client_id.event, - ev->prop[0], ev->prop[1]); + ev->pos.x, ev->pos.y, ev->ntouch); + for (i = 0; i < ev->nprop; i++) + fprintf(stderr, "\t%d: %f\n", i, ev->prop[i]); } static void loop_device(struct grail *ge, int fd) -- cgit v1.2.3