Share via


Maintain the Touch Contact Tracking List (Compact 2013)

3/26/2014

The built-in gesture recognizer maintains a tracking list of touch contacts that it tracks. Each tracking list entry holds two pieces of information about the touch contact. Both of these come from the GWETOUCHINPUT structure that describes the contact. The first piece of information is the handle (hsource), and the second is the identifier (dwID). When gesture core passes a touch event to it, GestureRecognizer::RecognizeGesture does the following for each touch contact in the array of GWETOUCHINPUT structures:

  • For a primary touch contact (TOUCHEVENTF_PRIMARY):
    • GestureRecognizer::RecognizeGesture checks to make sure that the contact is the same (according to handle and identifier) as the point previously recognized as primary in this session, if there is one.
    • If the contact was lifted (TOUCHEVENTF_UP), then GestureRecognizer::RecognizeGesture changes the recognizer state to WaitingForAllUp.
  • If this is initial contact (TOUCHEVENTF_DOWN), GestureRecognizer::RecognizeGesture adds the contact to the tracking list.
  • If the contact was lifted (TOUCHEVENTF_UP), GestureRecognizer::RecognizeGesture removes the contact from the tracking list.

See Also

Concepts

Gesture Recognizer Session