~fginther/grail/grail-2.0.1.1-oneiric

« back to all changes in this revision

Viewing changes to src/grail-api.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:
67
67
                ret = evemu_extract(x->evemu, fd);
68
68
        if (ret)
69
69
                goto freemem;
70
 
        if (!utouch_frame_is_supported_mtdev(x->evemu)) {
 
70
        if (!oif_frame_is_supported_mtdev(x->evemu)) {
71
71
                ret = -ENODEV;
72
72
                goto freemem;
73
73
        }
79
79
                        goto freemem;
80
80
                }
81
81
        }
82
 
        x->fh = utouch_frame_new_engine(DIM_FRAMES, DIM_TOUCH, FRAME_RATE);
 
82
        x->fh = oif_frame_new_engine(DIM_FRAMES, DIM_TOUCH, FRAME_RATE);
83
83
        if (!x->fh) {
84
84
                ret = -ENOMEM;
85
85
                goto freedev;
86
86
        }
87
 
        ret = utouch_frame_init_mtdev(x->fh, x->evemu);
 
87
        ret = oif_frame_init_mtdev(x->fh, x->evemu);
88
88
        if (ret)
89
89
                goto freeframe;
90
90
 
102
102
 freegin:
103
103
        gin_destroy(ge);
104
104
 freeframe:
105
 
        utouch_frame_delete_engine(x->fh);
 
105
        oif_frame_delete_engine(x->fh);
106
106
 freedev:
107
107
        if (x->mtdev)
108
108
                mtdev_close_delete(x->mtdev);
120
120
        struct grail_impl *x = ge->impl;
121
121
        gru_destroy(ge);
122
122
        gin_destroy(ge);
123
 
        utouch_frame_delete_engine(x->fh);
 
123
        oif_frame_delete_engine(x->fh);
124
124
        if (x->mtdev)
125
125
                mtdev_close_delete(x->mtdev);
126
126
        evemu_delete(x->evemu);
143
143
void GRAIL_PUBLIC grail_get_units(const struct grail *ge,
144
144
                                  struct grail_coord *min, struct grail_coord *max)
145
145
{
146
 
        struct utouch_surface *s = utouch_frame_get_surface(ge->impl->fh);
 
146
        struct oif_surface *s = oif_frame_get_surface(ge->impl->fh);
147
147
        min->x = s->min_x;
148
148
        min->y = s->min_y;
149
149
        max->x = s->max_x;
150
150
        max->y = s->max_y;
151
151
}
152
152
 
153
 
const struct utouch_frame GRAIL_PUBLIC *
 
153
const struct oif_frame GRAIL_PUBLIC *
154
154
grail_get_contact_frame(const struct grail *ge)
155
155
{
156
156
        return ge->impl->touch;
215
215
        }
216
216
}
217
217
 
218
 
static int gesture_timeout(struct grail *ge, const struct utouch_frame *frame)
 
218
static int gesture_timeout(struct grail *ge, const struct oif_frame *frame)
219
219
{
220
220
        struct gesture_recognizer *gru = ge->gru;
221
221
        struct gesture_inserter *gin = ge->gin;
225
225
}
226
226
 
227
227
static void report_frame(struct grail *ge,
228
 
                         const struct utouch_frame *touch,
 
228
                         const struct oif_frame *touch,
229
229
                         const struct input_event *syn)
230
230
{
231
231
        struct grail_impl *impl = ge->impl;
255
255
static void grail_pump_mtdev(struct grail *ge, const struct input_event *ev)
256
256
{
257
257
        struct grail_impl *impl = ge->impl;
258
 
        const struct utouch_frame *frame;
 
258
        const struct oif_frame *frame;
259
259
 
260
260
        evbuf_put(&impl->evbuf, ev);
261
261
 
262
262
        if (ev->type == EV_SYN || ev->type == EV_ABS || ev->type == EV_KEY) {
263
 
                frame = utouch_frame_pump_mtdev(impl->fh, ev);
 
263
                frame = oif_frame_pump_mtdev(impl->fh, ev);
264
264
                if (frame)
265
265
                        report_frame(ge, frame, ev);
266
266
        }