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 /src/grail-api.c | |
| 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>
Diffstat (limited to 'src/grail-api.c')
| -rw-r--r-- | src/grail-api.c | 16 |
1 files changed, 8 insertions, 8 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 | ||
