summaryrefslogtreecommitdiff
path: root/src/grail-event.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/grail-event.c')
-rw-r--r--src/grail-event.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/grail-event.c b/src/grail-event.c
index bb75a06..0c565ea 100644
--- a/src/grail-event.c
+++ b/src/grail-event.c
@@ -117,28 +117,3 @@ void gin_send_event(struct grail *ge, struct slot_state *s,
117 grailbuf_put(&impl->gbuf, &gev); 117 grailbuf_put(&impl->gbuf, &gev);
118 } 118 }
119} 119}
120
121int GRAIL_PUBLIC grail_get_contacts(const struct grail *ge,
122 struct grail_contact *touch, int max_touch)
123{
124 const struct gesture_inserter *gin = ge->gin;
125 const struct utouch_frame *frame = ge->impl->frame;
126 int i;
127 if (frame->num_active < max_touch)
128 max_touch = frame->num_active;
129 for (i = 0; i < max_touch; i++) {
130 struct grail_contact *t = &touch[i];
131 const struct utouch_contact *ct = frame->active[i];
132 t->id = ct->id;
133 t->tool_type = ct->tool_type;
134 t->pos.x = ct->x;
135 t->pos.y = ct->y;
136 t->touch_major = ct->touch_major;
137 t->touch_minor = ct->touch_minor;
138 t->width_major = ct->width_major;
139 t->width_minor = ct->width_minor;
140 t->angle = ct->orientation;
141 t->pressure = ct->pressure;
142 }
143 return max_touch;
144}