Multitouch review 4: touch devices and events

  GDK_SOURCE_TOUCH device type
  GDK_TOUCH_MASK event mask

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

- 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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]