0

Windows embedded and mobile allow one to use the SystemParametersInfo function to retrieve a GESTUREMETRICS structure (http://msdn.microsoft.com/en-nz/library/ee500273.aspx) which gives the threshold and timeouts for various touch screen gestures that the system will detect.

I am really interested in finding the "minimum distance that a touch contact must move across the surface for a pan gesture to be recognized" (GID_PAN) but I cannot figure out how to find this information on Windows 8 desktop.

djp
  • 636
  • 3
  • 13

1 Answers1

1

That data isn't exposed via any public API. It's hardcoded to 2.7 mm.

Eric Brown
  • 13,774
  • 7
  • 30
  • 71
  • Perhaps in a registry setting? – djp Aug 05 '13 at 23:28
  • Nope; they're built into the gesture recognizer. Why do you need this? Are you building your own gesture recognizer? – Eric Brown Aug 05 '13 at 23:32
  • I am using InjectTouchInput and I want to be able to take these thresholds into account when performing certain gestures – djp Aug 06 '13 at 00:31
  • Edited answer to give the values. – Eric Brown Aug 06 '13 at 06:26
  • Oh and do you have the values for the other gesture metrics? – djp Aug 07 '13 at 22:10
  • Which metrics are you looking for? (I got the information from the source code & headers.) – Eric Brown Aug 08 '13 at 03:58
  • @Alex that's *only* for Phone and Windows Compact edition. That structure isn't defined in the desktop headers. – Eric Brown Apr 17 '17 at 16:06
  • Is there a list of these values somewhere to be found (for the MS Surface)? I'm implementing a gesture recognizer, and while I could just estimate them myself, I'd prefer to follow Windows (would be nice if they define them in the headers at some point in the future). – Alex Apr 18 '17 at 16:17
  • @Alex this is *rapidly* moving into a different question. If you're using (or mocking) WM_GESTURE, you're using relatively ancient technology. The appropriate APIs are to use the pointer APIs directly and create a [GestureRecognizer](https://learn.microsoft.com/en-us/uwp/api/Windows.UI.Input.GestureRecognizer) where you can customize any values you want. – Eric Brown Apr 18 '17 at 18:09
  • I'm processing WM_POINTER and the output is my own internal thing, which will figure out the gestures itself. I stumbled upon this question looking for the touch equivalent of `GetSystemMetrics(SM_CXDOUBLECLK | SM_CYDOUBLECLK)`. Turns out it doesn't exist. If the user can't decide these values, then at least Microsoft must have come up with a set of workable values that they use. I would like to know what these values are. I'm sorry if that's a different question. – Alex Apr 19 '17 at 07:50
  • @Alex If you ask a separate question, I'll answer it. :) – Eric Brown Apr 19 '17 at 17:12
  • http://stackoverflow.com/questions/43503293/what-are-the-gesture-metrics-built-into-the-windows-gesture-recognizer :) – Alex Apr 19 '17 at 18:18