39 lines
1000 B
C#
Raw Normal View History

2011-11-04 23:51:05 +00:00
using System;
using ANX.Framework.NonXNA;
using ANX.Framework.NonXNA.Development;
2011-11-04 23:51:05 +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-04 23:06:39 +00:00
namespace ANX.Framework.Input
{
[PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Tested)]
2011-11-04 23:06:39 +00:00
public static class Mouse
{
private static readonly IMouse mouse;
public static IntPtr WindowHandle
{
get { return mouse.WindowHandle; }
set { mouse.WindowHandle = value; }
}
2011-11-04 23:51:05 +00:00
static Mouse()
2011-11-04 23:51:05 +00:00
{
mouse = AddInSystemFactory.Instance.GetDefaultCreator<IInputSystemCreator>().Mouse;
2011-11-04 23:51:05 +00:00
}
2011-11-04 23:06:39 +00:00
public static MouseState GetState()
{
return mouse.GetState();
2011-11-04 23:06:39 +00:00
}
2011-11-04 23:06:39 +00:00
public static void SetPosition(int x, int y)
{
mouse.SetPosition(x, y);
2011-11-04 23:06:39 +00:00
}
}
}