~fginther/grail/grail-2.0.1.1-oneiric

« back to all changes in this revision

Viewing changes to test/check-transform.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:
1
1
#include <check.h>
2
 
#include <utouch/frame-mtdev.h>
 
2
#include <oif/frame-mtdev.h>
3
3
#include <grail.h>
4
4
#include <string.h>
5
5
#include <stdio.h>
11
11
 
12
12
struct test_data {
13
13
        struct evemu_device *evemu;
14
 
        utouch_frame_handle fh;
 
14
        oif_frame_handle fh;
15
15
        grail_handle ge;
16
16
        FILE *fp;
17
17
        struct timeval evtime;
36
36
        if (!data->evemu || evemu_read(data->evemu, data->fp) <= 0)
37
37
                return -1;
38
38
 
39
 
        data->fh = utouch_frame_new_engine(100, 32, 100);
40
 
        if (!data->fh || utouch_frame_init_mtdev(data->fh, data->evemu))
 
39
        data->fh = oif_frame_new_engine(100, 32, 100);
 
40
        if (!data->fh || oif_frame_init_mtdev(data->fh, data->evemu))
41
41
                return -1;
42
42
 
43
43
        data->ge = grail_new(data->fh, 10, 0);
50
50
static void term_test_data(struct test_data *data)
51
51
{
52
52
        grail_delete(data->ge);
53
 
        utouch_frame_delete_engine(data->fh);
 
53
        oif_frame_delete_engine(data->fh);
54
54
        evemu_delete(data->evemu);
55
55
        fclose(data->fp);
56
56
}
63
63
static const struct grail_element *get_element(struct test_data *data,
64
64
                                               const struct input_event *ev)
65
65
{
66
 
        const struct utouch_frame *touch;
 
66
        const struct oif_frame *touch;
67
67
        const struct grail_frame *frame;
68
68
 
69
 
        touch = utouch_frame_pump_mtdev(data->fh, ev);
 
69
        touch = oif_frame_pump_mtdev(data->fh, ev);
70
70
        if (!touch)
71
71
                return 0;
72
72
        frame = grail_pump_frame(data->ge, touch);