GestureDetector
How to implement a custom GestureDetector
The ControlTouchSession supports GestureDetectors. You simply register your own detector and register it at the ControlTouchSession.
Since it only detects the gestures it is clear that the ControlTouchSession is the only place where it is referenced (and also only because it is registered by default).
GestureDetector::OnEvent is the only interaction interface with the ControlTouchSession.
The ControlTouchSession will send these events to the gesture detector:
UpdateEvent
This event indicates an update iteration (one per frame)
GestureDetector::TouchInput
This is a single/multi touch event extended by this information:
The following states of the gesture detector session are available:
In between you will get updates in the following cases:
GestureDetector::AbortEvent
This event tells that another behavior has taken the exclusive touch control. Hence, no gesture detector will participate in the current gesture detector session and therefore has to reset all internal states and wait for the next session.
GestureDetector::DeregisterEvent
The provided behavior is removed from the ControlTouchSession. Hence the gesture detector also has to remove all references to that behavior.
See also: