2012-08-09 09:45:04 +00:00
|
|
|
using System;
|
2012-08-22 09:51:35 +00:00
|
|
|
using ANX.Framework.NonXNA;
|
2012-09-01 16:20:44 +00:00
|
|
|
using ANX.Framework.NonXNA.Development;
|
2011-11-17 20:35:25 +00:00
|
|
|
|
2012-08-09 09:45:04 +00:00
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
2011-11-17 20:35:25 +00:00
|
|
|
|
|
|
|
namespace ANX.Framework.Input.Touch
|
|
|
|
{
|
2012-10-16 20:41:17 +00:00
|
|
|
[PercentageComplete(100)]
|
|
|
|
[Developer("AstrorEnales")]
|
2012-09-01 16:20:44 +00:00
|
|
|
[TestState(TestStateAttribute.TestState.Untested)]
|
2012-01-16 20:08:38 +00:00
|
|
|
public static class TouchPanel
|
2011-11-17 20:35:25 +00:00
|
|
|
{
|
2012-09-30 07:43:41 +00:00
|
|
|
private static readonly ITouchPanel nativeTouchPanel;
|
2012-08-22 09:51:35 +00:00
|
|
|
|
|
|
|
#region Public
|
2012-09-30 07:43:41 +00:00
|
|
|
public static GestureType EnabledGestures
|
|
|
|
{
|
|
|
|
get { return nativeTouchPanel.EnabledGestures; }
|
|
|
|
set { nativeTouchPanel.EnabledGestures = value; }
|
|
|
|
}
|
2012-01-16 20:08:38 +00:00
|
|
|
|
2012-09-30 07:43:41 +00:00
|
|
|
public static bool IsGestureAvailable
|
|
|
|
{
|
|
|
|
get { return nativeTouchPanel.IsGestureAvailable; }
|
|
|
|
}
|
2012-01-16 20:08:38 +00:00
|
|
|
|
2012-09-30 07:43:41 +00:00
|
|
|
public static IntPtr WindowHandle
|
|
|
|
{
|
|
|
|
get { return nativeTouchPanel.WindowHandle; }
|
|
|
|
set { nativeTouchPanel.WindowHandle = value; }
|
|
|
|
}
|
2012-01-16 20:08:38 +00:00
|
|
|
|
2012-09-30 07:43:41 +00:00
|
|
|
public static DisplayOrientation DisplayOrientation
|
|
|
|
{
|
|
|
|
get { return nativeTouchPanel.DisplayOrientation; }
|
|
|
|
set { nativeTouchPanel.DisplayOrientation = value; }
|
|
|
|
}
|
2012-01-16 20:08:38 +00:00
|
|
|
|
2012-09-30 07:43:41 +00:00
|
|
|
public static int DisplayWidth
|
|
|
|
{
|
|
|
|
get { return nativeTouchPanel.DisplayWidth; }
|
|
|
|
set { nativeTouchPanel.DisplayWidth = value; }
|
|
|
|
}
|
2012-01-16 20:08:38 +00:00
|
|
|
|
2012-09-30 07:43:41 +00:00
|
|
|
public static int DisplayHeight
|
|
|
|
{
|
|
|
|
get { return nativeTouchPanel.DisplayHeight; }
|
|
|
|
set { nativeTouchPanel.DisplayHeight = value; }
|
|
|
|
}
|
|
|
|
#endregion
|
2012-08-22 09:51:35 +00:00
|
|
|
|
|
|
|
static TouchPanel()
|
|
|
|
{
|
|
|
|
nativeTouchPanel = AddInSystemFactory.Instance.GetDefaultCreator<IInputSystemCreator>().TouchPanel;
|
|
|
|
}
|
2012-01-16 20:08:38 +00:00
|
|
|
|
|
|
|
public static TouchPanelCapabilities GetCapabilities()
|
|
|
|
{
|
2012-08-22 09:51:35 +00:00
|
|
|
return nativeTouchPanel.GetCapabilities();
|
2012-01-16 20:08:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static GestureSample ReadGesture()
|
|
|
|
{
|
2012-08-22 09:51:35 +00:00
|
|
|
return nativeTouchPanel.ReadGesture();
|
2012-01-16 20:08:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static TouchCollection GetState()
|
|
|
|
{
|
2012-08-22 09:51:35 +00:00
|
|
|
return nativeTouchPanel.GetState();
|
2012-01-16 20:08:38 +00:00
|
|
|
}
|
2011-11-17 20:35:25 +00:00
|
|
|
}
|
|
|
|
}
|