mono/MonoGame — pull request #1832 by RayBatts (2013-07-03 00:08:50+00:00)
Title: Multi window touch input

This PR contains the touch input changes discussed here: https://github.com/mono/MonoGame/issues/1731

The "state" information from TouchPanel has been moved into a TouchPanelState class. Each GameWindow owns a TouchPanel which is treated as the default. This is the one accessed when using the old TouchPanel.GetState() functions and ones similar to it.

The API for TouchPanel has remained the same.

To use new TouchPanelStateAPI, you'd do something like the following.

var touchState = TouchPanel.GetState(_mySecondaryGameWindow);

while (touchState.IsGestureAvailble)
ProcessGameGesture(touchState.ReadGesture());

This allows for windows to independently handle touch input. I can only test on a couple of platforms, so let me know if this breaks functionality on another one.