~fginther/grail/grail-2.0.1.1-oneiric

« back to all changes in this revision

Viewing changes to src/grail-frame.c

  • Committer: Francis Ginther
  • Date: 2012-08-22 18:35:11 UTC
  • mfrom: (20.2.19 upstream)
  • Revision ID: francis.ginther@canonical.com-20120822183511-yxwny2hixhyu2z42
* New upstream microrelease, bug fixes only
  - Rename project to simply 'grail' (LP: #1040218)
* Updated debian/watch file for project rename

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
static void set_center_velocity_and_radius(struct grail_impl *impl,
28
28
                                           struct grail_element *slot)
29
29
{
30
 
        const struct utouch_contact **tc = slot->touches;
 
30
        const struct oif_contact **tc = slot->touches;
31
31
        double x, y, vx, vy, r2, dx, dy;
32
32
        int i;
33
33
 
98
98
 
99
99
static void start_slot(struct grail_impl *impl,
100
100
                       struct grail_element *slot,
101
 
                       const struct utouch_frame *touch)
 
101
                       const struct oif_frame *touch)
102
102
{
103
103
        float *T = slot->transform;
104
104
 
156
156
 
157
157
static void set_slot_one(struct grail_impl *impl,
158
158
                         struct grail_element *slot,
159
 
                         const struct utouch_frame *touch,
160
 
                         const struct utouch_contact *t1)
 
159
                         const struct oif_frame *touch,
 
160
                         const struct oif_contact *t1)
161
161
{
162
162
        const struct grail_element *pslot = slot->prev;
163
 
        const struct utouch_contact *p1 = pslot->touches[0];
 
163
        const struct oif_contact *p1 = pslot->touches[0];
164
164
 
165
165
        if (!t1->active) {
166
166
                stop_slot(impl, slot);
180
180
 
181
181
static void set_slot_two(struct grail_impl *impl,
182
182
                         struct grail_element *slot,
183
 
                         const struct utouch_frame *touch,
184
 
                         const struct utouch_contact *t1,
185
 
                         const struct utouch_contact *t2)
 
183
                         const struct oif_frame *touch,
 
184
                         const struct oif_contact *t1,
 
185
                         const struct oif_contact *t2)
186
186
{
187
187
        const struct grail_element *pslot = slot->prev;
188
 
        const struct utouch_contact *p1 = pslot->touches[0];
189
 
        const struct utouch_contact *p2 = pslot->touches[1];
 
188
        const struct oif_contact *p1 = pslot->touches[0];
 
189
        const struct oif_contact *p2 = pslot->touches[1];
190
190
        double tx, ty, px, py, d2;
191
191
 
192
192
        if (!t1->active || !t2->active) {
221
221
static void set_slot_multi(struct grail_impl *impl,
222
222
                           struct grail_element *slot,
223
223
                           struct grail_frame *frame,
224
 
                           const struct utouch_frame *touch)
 
224
                           const struct oif_frame *touch)
225
225
{
226
226
        const struct grail_element *pslot = slot->prev;
227
227
        struct grail_element **slots = frame->slots;
318
318
 
319
319
static void set_slots(struct grail_impl *impl,
320
320
                      struct grail_frame *frame,
321
 
                      const struct utouch_frame *touch)
 
321
                      const struct oif_frame *touch)
322
322
{
323
323
        struct grail_element **slots = frame->slots;
324
 
        struct utouch_contact *const *tc = touch->slots;
 
324
        struct oif_contact *const *tc = touch->slots;
325
325
        int i, j, n = 0;
326
326
 
327
327
        for (i = 0; i < impl->num_touches; i++)
336
336
 
337
337
static void collect_transforms(struct grail_impl *impl,
338
338
                               struct grail_frame *frame,
339
 
                               const struct utouch_frame *touch)
 
339
                               const struct oif_frame *touch)
340
340
{
341
 
        const struct utouch_surface *s = utouch_frame_get_surface(impl->fh);
 
341
        const struct oif_surface *s = oif_frame_get_surface(impl->fh);
342
342
        const struct grail_control *ctl = impl->ctl;
343
343
        float d_x = ctl->bar_drag_x * (s->mapped_max_x - s->mapped_min_x);
344
344
        float d_y = ctl->bar_drag_y * (s->mapped_max_y - s->mapped_min_y);
386
386
}
387
387
 
388
388
const struct grail_frame GRAIL_PUBLIC *
389
 
grail_pump_frame(grail_handle ge, const struct utouch_frame *touch)
 
389
grail_pump_frame(grail_handle ge, const struct oif_frame *touch)
390
390
{
391
391
        struct grail_impl *impl = ge->impl;
392
392
        struct grail_frame *frame = impl->frames[impl->nextframe];