diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-08-19 22:15:55 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-08-19 22:15:55 +0200 |
| commit | 76f51a7675801acfe8e58c6a21192668d23d3320 (patch) | |
| tree | 73109e613e93fbb8f20fabdbec9f7e0d5356f4dd /src/grail-gestures.c | |
| parent | 8331322a0fec7277366a29a970eafbb795c08432 (diff) | |
Add contact information to the property list
Add the five first contacts to the property list, and unify the
handling of all gesture types in this regard. To avoid duplication,
move the scaling of properties closer to the gesture recognizer.
Move all gesture event handling code to grail-event.c, simplifying
the structure somewhat.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/grail-gestures.c')
| -rw-r--r-- | src/grail-gestures.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/grail-gestures.c b/src/grail-gestures.c index 1e89074..4262af7 100644 --- a/src/grail-gestures.c +++ b/src/grail-gestures.c | |||
| @@ -217,28 +217,3 @@ void gru_end(struct grail *ge, int gid, const struct move_model *m, | |||
| 217 | gin_gid_end(ge, gid, m->fm[FM_X].value, m->fm[FM_Y].value, m->ntouch, | 217 | gin_gid_end(ge, gid, m->fm[FM_X].value, m->fm[FM_Y].value, m->ntouch, |
| 218 | prop, nprop); | 218 | prop, nprop); |
| 219 | } | 219 | } |
| 220 | |||
| 221 | void gru_compute_bbox(struct grail_coord *min, struct grail_coord *max, | ||
| 222 | const struct touch_frame *frame) | ||
| 223 | { | ||
| 224 | float x, y; | ||
| 225 | int i; | ||
| 226 | if (frame->nactive < 1) | ||
| 227 | return; | ||
| 228 | x = frame->active[0]->x; | ||
| 229 | y = frame->active[0]->y; | ||
| 230 | min->x = max->x = x; | ||
| 231 | min->y = max->y = y; | ||
| 232 | for (i = 1; i < frame->nactive; i++) { | ||
| 233 | x = frame->active[i]->x; | ||
| 234 | y = frame->active[i]->y; | ||
| 235 | if (x < min->x) | ||
| 236 | min->x = x; | ||
| 237 | if (y < min->y) | ||
| 238 | min->y = y; | ||
| 239 | if (x > max->x) | ||
| 240 | max->x = x; | ||
| 241 | if (y > max->y) | ||
| 242 | max->y = y; | ||
| 243 | } | ||
| 244 | } | ||
