diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2011-03-29 10:26:05 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2011-04-28 16:58:51 +0200 |
| commit | d87cde46e25c058ffc76d3871ca4e2ceb3e57991 (patch) | |
| tree | a0b4e5729ce6c4fdda08a98b132b3dddb8c5700a | |
| parent | b605a93a85d8ead753d87a2da5a0e40571d6f275 (diff) | |
Prepare for gesture frame additions
Rename internal variables and fix makefile to make room for new
targets.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| -rw-r--r-- | src/grail-api.c | 16 | ||||
| -rw-r--r-- | src/grail-impl.h | 2 | ||||
| -rw-r--r-- | src/grail-legacy.c | 2 | ||||
| -rw-r--r-- | 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, | |||
| 154 | const struct utouch_frame GRAIL_PUBLIC * | 154 | const struct utouch_frame GRAIL_PUBLIC * |
| 155 | grail_get_contact_frame(const struct grail *ge) | 155 | grail_get_contact_frame(const struct grail *ge) |
| 156 | { | 156 | { |
| 157 | return ge->impl->frame; | 157 | return ge->impl->touch; |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | static void flush_events(struct grail *ge) | 160 | static void flush_events(struct grail *ge) |
| @@ -226,15 +226,15 @@ static int gesture_timeout(struct grail *ge, const struct utouch_frame *frame) | |||
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | static void report_frame(struct grail *ge, | 228 | static void report_frame(struct grail *ge, |
| 229 | const struct utouch_frame *frame, | 229 | const struct utouch_frame *touch, |
| 230 | const struct input_event *syn) | 230 | const struct input_event *syn) |
| 231 | { | 231 | { |
| 232 | struct grail_impl *impl = ge->impl; | 232 | struct grail_impl *impl = ge->impl; |
| 233 | struct grail_event gev; | 233 | struct grail_event gev; |
| 234 | 234 | ||
| 235 | ge->impl->frame = frame; | 235 | impl->touch = touch; |
| 236 | 236 | ||
| 237 | if (frame->num_active && !frame->prev->num_active) { | 237 | if (touch->num_active && !touch->prev->num_active) { |
| 238 | impl->ongoing = 1; | 238 | impl->ongoing = 1; |
| 239 | impl->gesture = 0; | 239 | impl->gesture = 0; |
| 240 | } | 240 | } |
| @@ -242,14 +242,14 @@ static void report_frame(struct grail *ge, | |||
| 242 | if (!impl->ongoing) | 242 | if (!impl->ongoing) |
| 243 | return; | 243 | return; |
| 244 | 244 | ||
| 245 | gin_frame_begin(ge, frame); | 245 | gin_frame_begin(ge, touch); |
| 246 | gru_recognize(ge, frame); | 246 | gru_recognize(ge, touch); |
| 247 | gin_frame_end(ge, frame); | 247 | gin_frame_end(ge, touch); |
| 248 | 248 | ||
| 249 | if (!grailbuf_empty(&impl->gbuf)) | 249 | if (!grailbuf_empty(&impl->gbuf)) |
| 250 | impl->gesture = 1; | 250 | impl->gesture = 1; |
| 251 | 251 | ||
| 252 | if (frame->num_active == 0 || gesture_timeout(ge, frame)) | 252 | if (touch->num_active == 0 || gesture_timeout(ge, touch)) |
| 253 | impl->ongoing &= impl->gesture; | 253 | impl->ongoing &= impl->gesture; |
| 254 | } | 254 | } |
| 255 | 255 | ||
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 { | |||
| 38 | struct evemu_device *evemu; | 38 | struct evemu_device *evemu; |
| 39 | struct mtdev *mtdev; | 39 | struct mtdev *mtdev; |
| 40 | utouch_frame_handle fh; | 40 | utouch_frame_handle fh; |
| 41 | const struct utouch_frame *frame; | 41 | const struct utouch_frame *touch; |
| 42 | struct evbuf evbuf; | 42 | struct evbuf evbuf; |
| 43 | struct grailbuf gbuf; | 43 | struct grailbuf gbuf; |
| 44 | int filter_abs; | 44 | 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, | |||
| 42 | struct grail_contact *touch, int max_touch) | 42 | struct grail_contact *touch, int max_touch) |
| 43 | { | 43 | { |
| 44 | const struct gesture_inserter *gin = ge->gin; | 44 | const struct gesture_inserter *gin = ge->gin; |
| 45 | const struct utouch_frame *frame = ge->impl->frame; | 45 | const struct utouch_frame *frame = ge->impl->touch; |
| 46 | int i; | 46 | int i; |
| 47 | if (frame->num_active < max_touch) | 47 | if (frame->num_active < max_touch) |
| 48 | max_touch = frame->num_active; | 48 | 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 | |||
| 2 | 2 | ||
| 3 | INCLUDES=-I$(top_srcdir)/include/ | 3 | INCLUDES=-I$(top_srcdir)/include/ |
| 4 | 4 | ||
| 5 | grail_gesture_SOURCES = grail-gesture.c | 5 | AM_CFLAGS = $(X11_CFLAGS) $(XINPUT_CFLAGS) |
| 6 | grail_gesture_LDFLAGS = -L$(top_builddir)/src/.libs/ \ | 6 | |
| 7 | -lutouch-grail -lutouch-frame -lutouch-evemu -lmtdev -lm | 7 | AM_LDFLAGS = -L$(top_builddir)/src/.libs/ \ |
| 8 | -lutouch-grail -lutouch-frame -lutouch-evemu -lmtdev \ | ||
| 9 | $(X11_LIBS) $(XINPUT_LIBS) -lm | ||
