On Thu, 06 Oct 2011 10:20:57 +0200 Tom Hacohen
<tom.haco...@partner.samsung.com> said:

> On 06/10/11 10:15, EunMi Lee wrote:
> > Dear Tom,
> >
> >> What do you think about removing this from upstream and moving it to your
> >> code?
> > =>  My answer is I really need touch event in the evas.
> >      Yes, it just unifies mouse/multi event and it was in my code before.
> >      However, I think it is better to move that code to the evas, because
> > it is useful to process event on the touch device(which supports multi
> > fingers), and other application developers can use that if it is supported
> > by evas. Other plaform (gtk, iphone, android) already have their own touch
> > event and they don't have to unify mouse events. So, I want that evas
> > supports touch event like other platform, and I made a patch for that.
> >
> 
> Ok, I get your point. If that's the case, then we need to fix it as you 
> suggested in your previous email, sounds like the best way to do it.

actually... the more i think about this... the more that maybe we shouldn't have
the touch events at all. they do duplicate events. they do make it very hard to
use the current flags infra. the whole point of them is so you dont have to do
your own tracking of multiple presses. maybe we should just have evas track all
current pressed points (mouse + multi) and when you get a mouse or multi move,
a mouse or multi down or a mouse or multi up, you can query the current
"tracking state". just add a few calls to query like:

// return number of pressed points (mouse+fingers)
EAPI int
evas_event_pressed_count_get(Evas *e);

// return the device id of pressed point 0, 1, 2etc. up to n - 1 where n is the
// pressed count
EAPI int
evas_event_pressed_device_get(Evas *e, int press_num);

// get the x,y location for a specific press point
EAPI void
evas_event_pressed_canvas_coord_get(Evas *e, int press_num, Evas_Coord *x,
Evas_Coord *y);

// etc.

so... this becomes very easy. you hook up the SAMe callback to both mouse and
multi down, the same cb to mouse and multi up, and same cb to mouse and multi
move. in all cb's you just get the current pressed state of all press points as
you desire - evas is tracking for you. this achieve what eunmi wants - simpler
tracking code, but just uses the current events directly to do so - we just
have 2 kinds of down/move/up events (mouse and multi) where mouse is the core
pointer or first touch and multi is all the extras (that as anon-touch app
you don't need to look at).

how about this? it simple removes the callbacks.events and provides the ability
to track via querying in api calls not in event structs. :)

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to