Posts Tagged ‘mpx’

More multitouchy fun

Monday, January 19th, 2009

Sorry, nothing related to sex! Since my previous post, I didn’t actually hack much on getting MPX working, mostly blocking on the lack of ideas about a good API. That was until ImendioConf, where a talk with Richard about the subject made ideas start flowing, so here’s my late christmas present!

http://github.com/garnacho/gtk-mpx/tree/mpx

Besides making GDK use XInput 2.0, The main change is at the GtkWidget level, I’ve introduced GtkDeviceGroup and the “multidevice-event” signal. GtkDeviceGroup is just a container for GdkDevices, each widget can have several GtkDeviceGroups. The “multidevice-event” reports grouped motion events for the devices contained in a GtkDeviceGroup, it also provides hints about the latest event that happened and whether a device was just added,removed or updated.

The idea is, a widget would add devices to a group on button-press, enter-notify… remove them on button-release, leave-notify… and would get grouped motion events for all these devices in between. In the repo there are also a couple of test apps to show this working.

Obviously, there are quite some things left, I’ve collected missing stuff I’ve identified in the wiki, so if you feel curious about multitouch, compile xorg and help out!

And now of course, some videos of the examples :)