From: EunMi Lee <eunmi15.lee@samsung.com>
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 4 Oct 2011 07:30:22 +0000 (07:30 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 4 Oct 2011 07:30:22 +0000 (07:30 +0000)
commit7adf20dfcddc809b91d4a870f88962397863787f
tree3ecfb195bba477f5040de04c271defd6fe9dc044
parent2f1c37ce6b9c5d0473480ddd4872c288489a02dd
From: EunMi Lee <eunmi15.lee@samsung.com>
Subject: [E-devel] [Patch] Evas touch event patch.

Nice to meet you.
I'm Eunmi Lee, developing mobile web browser and working on WebKit EFL port.
I need new type of event for touch, so I've made patch to add
EVAS_CALLBACK_TOUCH event to the evas.

I will explain history of this patch.
Currently, many web applications and sites use TouchEvent and they can
do everything(scrolling, zooming and so on) like native application
using TouchEvent.
So, I'm also want to provide TouchEvent for web in the WebKit EFL port,
but I got a problem during making TouchEvent because EFL's touch
event's structure (Mouse, Multi Event) is different from Web
TouchEvent's one.

Let me explain about Web TouchEvent firstly.
Web TouchEvent is consist of type and touch points list simply.
There are 3 kinds of type.
TouchStart: Happens every time a finger is placed on the screen.
TouchEnd: Happens every time a finger is removed from the screen.
TouchMove: Happens as a finger already placed on the screen is moved
across the screen.
for example, we can make (1 finger starts to touch), (2 fingers are
moving), (1 finger is released duirng 3 fingers are moving) and so on.
You can see the detailed information in the following url:
http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone

However, EFL's touch event is consist of six kinds of type :
MOUSE_DOWN, MOUSE_UP, MOUSE_MOVE, MULTI_DOWN, MULTI_UP, MULTI_MOVE.
So, I have to make a converter to make web touch event from EFL's
touch event.
You can reference attatched image file : evas_touch_event.png.

To tell the truth, converting code is not a big one.
But, I want to reduce this additional job and make code simple.
In the WebKit QT port, they don't have to make converting code for
TouchEvent,
because they have QTouchEvent, it has type and touchPoints list and
they can be mapped to Web TouchEvent one by one.
I think iPhone and Android also have such kind of event.

That's all why I want to add new touch event type to the evas.

about my patch:
- EVAS_CALLBACK_TOUCH event is added
- touch_points Eina_List is added to the Evas structure to maintain
current touch lists.
- process MOUSE/MULTI UP, DOWN, MOVE to make TOUCH event.

It is my first time to modify eves codes and actually I don't know too
much about evas.
So, I will be grateful if you send any feedback and comments.

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