Share via


Maintain the Touch Contact Tracking List (Compact 7)

3/12/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 which 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):
    • It 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 it changes the recognizer state to WaitingForAllUp.
  • If this is initial contact (TOUCHEVENTF_DOWN), it adds the contact to the tracking list.
  • If the contact was lifted (TOUCHEVENTF_UP), it removes the contact from the tracking list.

See Also

Concepts

Gesture Recognizer Session