~oif-team/grail/one-touch-indirect

« back to all changes in this revision

Viewing changes to src/grail-event.c

  • Committer: Henrik Rydberg
  • Date: 2011-01-02 12:06:56 UTC
  • Revision ID: rydberg@bitmath.org-20110102120656-m1bjil1vj6twdt0l
Prepare for queued event handling

The current grail operates via callbacks. In order to make grail work
as a pipe, where input and output can be controlled externally, add
the missing event queue for gestures, and align the code to simplify a
switch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
                    const struct gesture_event *ev,
98
98
                    const struct touch_frame *frame)
99
99
{
 
100
        struct grail_impl *impl = ge->impl;
100
101
        const struct gesture_inserter *gin = ge->gin;
101
102
        struct grail_event gev;
102
103
        int i;
113
114
        memcpy(gev.prop, ev->prop, ev->nprop * sizeof(grail_prop_t));
114
115
        for (i = 0; i < s->nclient; i++) {
115
116
                gev.client_id = s->client_id[i];
116
 
                ge->gesture(ge, &gev);
 
117
                grailbuf_put(&impl->gbuf, &gev);
117
118
        }
118
119
}
119
120