Opentk/Source/OpenTK/InputDriver.cs
the_fiddler 6812739418 Renamed InputDevices.cs to InputDriver.cs.
Added IMouseDriver.cs and WinRawMouse.
2007-08-04 13:28:16 +00:00

46 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using OpenTK.Input;
namespace OpenTK
{
public class InputDriver : IInputDriver
{
IInputDriver inputDriver;
public InputDriver(IntPtr parentHandle)
{
if (Environment.OSVersion.Version.Major > 5 ||
(Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor >= 1))
{
inputDriver = new OpenTK.Platform.Windows.WinRawInput(parentHandle);
}
else
{
throw new PlatformNotSupportedException("Input is not implemented for platforms prior to Windows XP, yet.");
}
}
#region --- IInputDriver Members ---
IList<IInputDevice> IInputDriver.InputDevices
{
get { return inputDriver.InputDevices; }
}
public IList<Keyboard> Keyboard
{
get { return inputDriver.Keyboard; }
}
public IList<Keyboard> Mouse
{
get { throw new NotImplementedException(); }
}
#endregion
}
}