xbmc/xbmc — pull request #2524 by Montellese (2013-04-01 09:23:36+00:00)
Title: [win32] improved touch input/gesture handling

This PR moves the win32-specific touch input/gesture handling (using WM_GESTURES) to the recently introduced generic touch input handling also used by Android and iOS. New features are
* user-mappable gestures through touchscreen.xml
* support for rotate gestures (e.g. in picture viewing)
* support for zoom/pinch gestures (e.g. in picture viewing)
* support for one finger swipe gestures

Unfortunately WM_GESTURES does not seem to allow simultaneous rotate and zoom/pinch gestures so users can only use one of them at a time but still better than nothing.

As I don't have a touch-capable device running Windows 7 or Windows 8 I'm not able to test these changes myself but @MartijnKaijser was kind enough to be my guinea pig for a week or so and he should be able to confirm that everything works as expected.

I kept with WM_GESTURES because it is the API we used until now and because it's the easiest to use. Windows 7/8 also offer WM_TOUCH which provides access to raw touch events but doesn't provide any builtin gesture recognition. It would however allow us to support simultaneous rotate and zoom/pinch and we could also support multi-finger swipe etc by using the same generic touch implementation used by Android. Windows 8 offers an improved WM_POINTER API which has additional functionality but it's Windows 8 only. Maybe at some point it might make sense to either switch to WM_TOUCH or if it's worth the additional effort use WM_POINTER on Win8 devices and WM_TOUCH on Win7 devices but that's out of the question right now.