API GDK_SOURCE_TOUCH device type GDK_CROSSING_STATE_{CHANGED,TOUCH_PRESS,TOUCH_RELEASE,DEVICE_SWITCH} GDK_TOUCH_MASK event mask GDK_TOUCH_{MOTION,PRESS,RELEASE} event types gdk_event_get_touch_id
XI2.2 emits TouchBegin, TouchEnd, TouchUpdate and TouchOwnership events. GDK translates the first three into GDK_TOUCH_PRESS/RELEASE/MOTION and currently ignores TouchOwnership altogether. The touch_id is used to tie events together that are generated by the same 'touch'. There is only a single event mask selecting all the touch (and multitouch) events. The new TOUCH_PRESS/RELEASE crossing modes are used when generating synthetic crossing events when a touch begins or end; GDK_CROSSING_STATE_DEVICE_SWITCH is used when a different slave takes control of the pointer (e.g touch -> mouse). Questions, comments: - Would it be better to align the new event type names with the XI2 names, ie GDK_TOUCH_{BEGIN,UPDATE,END} ? - The GdkInputSource enumeration is not very usefully documented. We should improve that to at least state what kind of events the different device types will generate. What are the typical uses of this enumeration ? There's also some discussion of device types in bugzilla [2]. - There's no useful documentation for touch ids. Peter has some information in his blog [1]. We should put that information somewhere in the docs. [1] http://who-t.blogspot.com/2011/12/multitouch-in-x-getting-events.html [2] http://bugzilla.gnome.org/show_bug.cgi?id=639830 _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list