Touch Event from Driver to Gesture Core (Compact 7)
3/12/2014
When the touch proxy driver obtains touch contact data from the user, it passes the data to function UserInputQueue_PutTouchEventsExport (in userin.cpp), which adds it to the user input queue. The input queue holds touch, mouse, and keyboard events. The declarations for the queue are in userinq.hpp, and the functions that implement the queue are in userin.cpp.
Function UserInputThread (in userin.cpp), executed by the user input thread, monitors the input queue for arriving events. It takes events from the queue one at a time and, depending on the type of event, calls other functions to complete the event processing:
- For the arrival of an array of touch contact points (event type TOUCH_INPUT_EVENT), UserInputThread calls ProcessTouchEvent (in userin.cpp), which processes the event, generating mouse events as needed. It may create two touch sample sets from the event, separating the time-out samples from new input. It then calls DispatchTouchSampleSet (in userin.cpp) for each sample set (one or two calls). From there the sample goes to TouchEventSend (in touch.cpp), then to GestureRecognizer::RecognizeTouch (in Touchgesture.cpp), and then to the recognizers. For more information, see Touch Event from Gesture Core to the Recognizers.
- For the arrival of a mouse event (event type MOUSE_EVENT) or a single touch contact point (event type TOUCH_EVENT), UserInputThread calls MouseEventSend (in touch.cpp).
For more information about the user input queue, see User Input Queue.