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-api.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/grail-api.c') diff --git a/src/grail-api.c b/src/grail-api.c index 1236205..6ef4b7d 100644 --- a/src/grail-api.c +++ b/src/grail-api.c @@ -20,9 +20,9 @@ * ****************************************************************************/ +#include "grail-impl.h" #include "grail-inserter.h" #include "grail-recognizer.h" -#include "grail-impl.h" #include #include #include @@ -35,10 +35,9 @@ #define DIM_FRAMES 100 #define FRAME_RATE 100 -void GRAIL_PUBLIC grail_filter_abs_events(struct grail *ge, int usage) +unsigned int GRAIL_PUBLIC grail_get_version(void) { - struct grail_impl *x = ge->impl; - x->filter_abs = usage; + return GRAIL_VERSION; } int GRAIL_PUBLIC grail_open(struct grail *ge, int fd) @@ -152,6 +151,12 @@ void GRAIL_PUBLIC grail_get_units(const struct grail *ge, max->y = s->max_y; } +const struct utouch_frame GRAIL_PUBLIC * +grail_get_contact_frame(const struct grail *ge) +{ + return ge->impl->frame; +} + static void flush_events(struct grail *ge) { struct grail_impl *impl = ge->impl; -- cgit v1.2.3