fredsa / forplay

Automatically exported from code.google.com/p/forplay
Apache License 2.0
12 stars 4 forks source link

Multi-touch support #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The current pointer interface assumes a single pointer. It would be useful to 
add multi-touch support for platforms that support it: Android and WebKit 
mobile (iOS only I think). A listener-per-pointer or a multi-touch-aware 
listener approach probably would work.

Strawman API patch:

+  /**
+   * Sets the listener that will receive pointer events. Setting the listener 
to
+   * <code>null</code> will cause pointer events to stop being fired.
+   */
+  void setListener(Listener listener, int pointerIndex);

Original issue reported on code.google.com by mmast...@gmail.com on 18 May 2011 at 9:56

GoogleCodeExporter commented 9 years ago
Hi Matt :)

Great point. I think Philip may have already started looking at this, as it's a 
pretty glaring omission at the moment.

Original comment by jgw@google.com on 20 May 2011 at 3:23

GoogleCodeExporter commented 9 years ago
Just committed the first part of this with r78 :)

No Android multitouch support just yet (only HTML), but I kept an eye on 
Android's multitouch API so there shouldn't need to be any refactoring when I 
get to adding Android support in.

For the curious, there's a cool single-touch 'emulator' script here: 
http://www.vodori.com/blog/phantom-limb.html. You just paste a javascript: 
[bla] line into Chrome's address bar and you can simulate touch events even if 
you don't have a touch device.

Original comment by pdr@google.com on 22 May 2011 at 2:34

GoogleCodeExporter commented 9 years ago

Original comment by pdr@google.com on 22 May 2011 at 2:39

GoogleCodeExporter commented 9 years ago
Great! Thanks Philip, looks good. 

Original comment by mmast...@gmail.com on 22 May 2011 at 3:10

GoogleCodeExporter commented 9 years ago
Android multitouch has been committed and works great.

Original comment by jonag...@google.com on 5 Aug 2011 at 5:13