Touch Event from Driver to Gesture Core (Compact 2013)
3/26/2014
When the touch proxy driver obtains touch contact data from the user, it passes the data to function UserInputQueue_PutTouchEventsExport, 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.
Function UserInputThread, 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, 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 for each sample set (one or two calls). From there the sample goes to TouchEventSend, then to GestureRecognizer::RecognizeTouch, 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.
For more information about the user input queue, see User Input Queue.