Renamed InputDevices.cs to InputDriver.cs.

Added IMouseDriver.cs and WinRawMouse.
This commit is contained in:
the_fiddler 2007-08-04 13:28:16 +00:00
parent c16968c06c
commit d423f6e94c
8 changed files with 36 additions and 16 deletions

View file

@ -23,7 +23,7 @@ namespace Examples.WinForms
{
public partial class W01_First_Window : Form, IExample
{
OpenTK.InputDevices input;
OpenTK.InputDriver input;
public W01_First_Window()
{
InitializeComponent();
@ -35,7 +35,7 @@ namespace Examples.WinForms
{
base.OnHandleCreated(e);
input = new OpenTK.InputDevices(this.Handle);
input = new OpenTK.InputDriver(this.Handle);
}
private void redButton_Click(object sender, EventArgs e)

View file

@ -19,14 +19,14 @@ namespace OpenTK
private ResizeEventArgs resizeEventArgs = new ResizeEventArgs();
private DisplayMode mode;
private InputDevices inputDevices;
public IList<Input.Keyboard> Keyboard { get { return Input.Keyboards; } }
public InputDevices Input
private InputDriver inputDevices;
public IList<Input.Keyboard> Keyboard { get { return Input.Keyboard; } }
public InputDriver Input
{
get
{
if (inputDevices == null)
inputDevices = new InputDevices(this.Handle);
inputDevices = new InputDriver(this.Handle);
return inputDevices;
}
}
@ -64,7 +64,7 @@ namespace OpenTK
void glWindow_Create(object sender, EventArgs e)
{
//glWindow.Context.MakeCurrent();
inputDevices = new InputDevices(this.Handle);
inputDevices = new InputDriver(this.Handle);
this.OnCreate(e);
}

View file

@ -4,7 +4,7 @@ using System.Text;
namespace OpenTK.Input
{
public interface IInputDriver : IKeyboardDriver
public interface IInputDriver : IKeyboardDriver, IMouseDriver
{
IList<IInputDevice> InputDevices { get; }
//void ProcessEvents

View file

@ -6,6 +6,6 @@ namespace OpenTK.Input
{
public interface IKeyboardDriver
{
IList<Keyboard> Keyboards { get; }
IList<Keyboard> Keyboard { get; }
}
}

View file

@ -6,11 +6,11 @@ using OpenTK.Input;
namespace OpenTK
{
public class InputDevices : IInputDriver
public class InputDriver : IInputDriver
{
IInputDriver inputDriver;
public InputDevices(IntPtr parentHandle)
public InputDriver(IntPtr parentHandle)
{
if (Environment.OSVersion.Version.Major > 5 ||
(Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor >= 1))
@ -30,9 +30,14 @@ namespace OpenTK
get { return inputDriver.InputDevices; }
}
public IList<Keyboard> Keyboards
public IList<Keyboard> Keyboard
{
get { return inputDriver.Keyboards; }
get { return inputDriver.Keyboard; }
}
public IList<Keyboard> Mouse
{
get { throw new NotImplementedException(); }
}
#endregion

View file

@ -153,9 +153,14 @@ namespace OpenTK.Platform.Windows
get { throw new Exception("The method or operation is not implemented."); }
}
public IList<Keyboard> Keyboards
public IList<Keyboard> Keyboard
{
get { return keyboardDriver.Keyboards; }
get { return keyboardDriver.Keyboard; }
}
public IList<Keyboard> Mouse
{
get { throw new Exception("The method or operation is not implemented."); }
}
#endregion

View file

@ -332,7 +332,7 @@ namespace OpenTK.Platform.Windows
#region --- IKeyboardDriver Members ---
public IList<Keyboard> Keyboards
public IList<Keyboard> Keyboard
{
get { return keyboards; }
}

View file

@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenTK.Platform.Windows
{
class WinRawMouse
{
}
}