From d87cde46e25c058ffc76d3871ca4e2ceb3e57991 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Tue, 29 Mar 2011 10:26:05 +0200 Subject: Prepare for gesture frame additions Rename internal variables and fix makefile to make room for new targets. Signed-off-by: Henrik Rydberg --- src/grail-api.c | 16 ++++++++-------- src/grail-impl.h | 2 +- src/grail-legacy.c | 2 +- tools/Makefile.am | 8 +++++--- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/grail-api.c b/src/grail-api.c index 6ef4b7d..1d4233a 100644 --- a/src/grail-api.c +++ b/src/grail-api.c @@ -154,7 +154,7 @@ void GRAIL_PUBLIC grail_get_units(const struct grail *ge, const struct utouch_frame GRAIL_PUBLIC * grail_get_contact_frame(const struct grail *ge) { - return ge->impl->frame; + return ge->impl->touch; } static void flush_events(struct grail *ge) @@ -226,15 +226,15 @@ static int gesture_timeout(struct grail *ge, const struct utouch_frame *frame) } static void report_frame(struct grail *ge, - const struct utouch_frame *frame, + const struct utouch_frame *touch, const struct input_event *syn) { struct grail_impl *impl = ge->impl; struct grail_event gev; - ge->impl->frame = frame; + impl->touch = touch; - if (frame->num_active && !frame->prev->num_active) { + if (touch->num_active && !touch->prev->num_active) { impl->ongoing = 1; impl->gesture = 0; } @@ -242,14 +242,14 @@ static void report_frame(struct grail *ge, if (!impl->ongoing) return; - gin_frame_begin(ge, frame); - gru_recognize(ge, frame); - gin_frame_end(ge, frame); + gin_frame_begin(ge, touch); + gru_recognize(ge, touch); + gin_frame_end(ge, touch); if (!grailbuf_empty(&impl->gbuf)) impl->gesture = 1; - if (frame->num_active == 0 || gesture_timeout(ge, frame)) + if (touch->num_active == 0 || gesture_timeout(ge, touch)) impl->ongoing &= impl->gesture; } diff --git a/src/grail-impl.h b/src/grail-impl.h index 7036382..8f73a2d 100644 --- a/src/grail-impl.h +++ b/src/grail-impl.h @@ -38,7 +38,7 @@ struct grail_impl { struct evemu_device *evemu; struct mtdev *mtdev; utouch_frame_handle fh; - const struct utouch_frame *frame; + const struct utouch_frame *touch; struct evbuf evbuf; struct grailbuf gbuf; int filter_abs; diff --git a/src/grail-legacy.c b/src/grail-legacy.c index 779595b..7e5c969 100644 --- a/src/grail-legacy.c +++ b/src/grail-legacy.c @@ -42,7 +42,7 @@ 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; + const struct utouch_frame *frame = ge->impl->touch; int i; if (frame->num_active < max_touch) max_touch = frame->num_active; diff --git a/tools/Makefile.am b/tools/Makefile.am index 303f70d..c7e0a75 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -2,6 +2,8 @@ bin_PROGRAMS = grail-gesture INCLUDES=-I$(top_srcdir)/include/ -grail_gesture_SOURCES = grail-gesture.c -grail_gesture_LDFLAGS = -L$(top_builddir)/src/.libs/ \ - -lutouch-grail -lutouch-frame -lutouch-evemu -lmtdev -lm +AM_CFLAGS = $(X11_CFLAGS) $(XINPUT_CFLAGS) + +AM_LDFLAGS = -L$(top_builddir)/src/.libs/ \ + -lutouch-grail -lutouch-frame -lutouch-evemu -lmtdev \ + $(X11_LIBS) $(XINPUT_LIBS) -lm -- cgit v1.2.3