From: EunMi Lee <eunmi15.lee@samsung.com>
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 25 Oct 2011 05:03:50 +0000 (05:03 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 25 Oct 2011 05:03:50 +0000 (05:03 +0000)
commit73e3a7e6b750d6d7ca36f45f6cadde82e824f270
tree955f960e262941b1b756d68d260b5607d756c730
parenta3ca03b575b6b5130f26d5d80eae2b676e5aa7e7
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 :)

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@64373 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
src/lib/Evas.h
src/lib/canvas/Makefile.am
src/lib/canvas/evas_events.c
src/lib/canvas/evas_main.c
src/lib/canvas/evas_touch_point.c [new file with mode: 0644]
src/lib/include/evas_private.h