Touch: Feature requests

Hello,
I’ve been working on an Asus t300chi and have attempted to add touch
support to the dev version of 0ad. Here are some things I’ve found
lacking with the current SDL2 interface.

  1. Single touch events, can easily be cropped. See example.
  2. Number of finger delta, a change to the number of fingers in a
    SDL_MULTIGESTURE would seem to be important. Also easily
    discoverable.
  3. click and double click information. I don’t have code for this
    yet, but I’ll be writing it.
    a. Indication of how much longer till this motion event could
    no-longer be a button event. Also indicate that this can not later
    become a button press, make sure 0 is past the time wher a finger up
    event would generate a button press.
    b. If previous touch was button press, if this is a click->drag ect.
    and optionally, I don’t know how much or little these would help.
  4. More information about the absolute finger positions in
    SDL_MULTIGESTURE and the delta of these specific measurements.
    a. Min, Max, Avg distance from normalized center.
    b. Some form of indication of the absolute fingers rotated?
    I. divergence of the top most finger from vertical.
    II. max and min degree between two fingers.

Example source/ps/TouchInput.cpp attached.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: TouchInput.cpp
Type: text/x-c++src
Size: 3374 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20151123/7b8c586e/attachment-0001.cpp