From b605a93a85d8ead753d87a2da5a0e40571d6f275 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Thu, 28 Apr 2011 15:41:49 +0200 Subject: Expose utouch-frame through grail API Start a gentle API change by exposing utouch-frame through grail, and deprecating the grail_contact struct. Old programs compile and run fine. To only use the new api, compile with -DGRAIL_NO_LEGACY_API. Signed-off-by: Henrik Rydberg --- src/grail-event.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src/grail-event.c') diff --git a/src/grail-event.c b/src/grail-event.c index bb75a06..0c565ea 100644 --- a/src/grail-event.c +++ b/src/grail-event.c @@ -117,28 +117,3 @@ void gin_send_event(struct grail *ge, struct slot_state *s, grailbuf_put(&impl->gbuf, &gev); } } - -int GRAIL_PUBLIC grail_get_contacts(const struct grail *ge, - struct grail_contact *touch, int max_touch) -{ - const struct gesture_inserter *gin = ge->gin; - const struct utouch_frame *frame = ge->impl->frame; - int i; - if (frame->num_active < max_touch) - max_touch = frame->num_active; - for (i = 0; i < max_touch; i++) { - struct grail_contact *t = &touch[i]; - const struct utouch_contact *ct = frame->active[i]; - t->id = ct->id; - t->tool_type = ct->tool_type; - t->pos.x = ct->x; - t->pos.y = ct->y; - t->touch_major = ct->touch_major; - t->touch_minor = ct->touch_minor; - t->width_major = ct->width_major; - t->width_minor = ct->width_minor; - t->angle = ct->orientation; - t->pressure = ct->pressure; - } - return max_touch; -} -- cgit v1.2.3