From: EunMi Lee <eunmi15.lee@samsung.com>
authorEunMi Lee <eunmi15.lee@samsung.com>
Tue, 25 Oct 2011 05:03:50 +0000 (05:03 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Tue, 25 Oct 2011 05:03:50 +0000 (05:03 +0000)
commit8b5d18503866585b32332d65acb2c4a4f703f6db
treefcce27fc4f48397d1ffdf69532cdf6cf53940e96
parent8658d955ce4087fc7e8a7159f9a5c4fc663811a7
From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] [Evas] Patch to provide information of
touched points

Hello,
I made a new patch to get information of current touched point instead
of Touch Event.

I added touch_points (Eina_List) to the Evas structure and it maintains touched points on the evas.
New touched point is added to the touch_points when we get Mouse_Down and Multi_Down,
touched point is updated when we get Mouse_Move and Mult_Move,
and touched point is removed when we get Mouse_Up and Multi_Up.

The each touch point has coordinate, id and state information as follows:
id - identifier. 0 for Mouse Event and device id for Multi Event. coordinate - (x, y) coordinate of point.
state - state of point. type is Evas_Touch_Point_State enum.
(EVAS_TOUCH_POINT_DOWN, EVAS_TOUCH_POINT_UP, EVAS_TOUCH_POINT_MOVE,
EVAS_TOUCH_POINT_STILL, EVAS_TOUCH_POINT_CANCEL)

There are 4 new APIs to get touch point's information as follows:
unsigned int evas_touch_point_list_count(Evas *e);
void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y);
int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n);
Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n);

I added APIs to get each information instead of exposing whole
structure to make it easy to expand in the future as you mentioned in
the below e-mail :)

SVN revision: 64373
legacy/evas/src/lib/Evas.h
legacy/evas/src/lib/canvas/Makefile.am
legacy/evas/src/lib/canvas/evas_events.c
legacy/evas/src/lib/canvas/evas_main.c
legacy/evas/src/lib/canvas/evas_touch_point.c [new file with mode: 0644]
legacy/evas/src/lib/include/evas_private.h