Renamed InputDevices.cs to InputDriver.cs.
Added IMouseDriver.cs and WinRawMouse.
This commit is contained in:
parent
f9ab9f5242
commit
6812739418
8 changed files with 36 additions and 16 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -6,6 +6,6 @@ namespace OpenTK.Input
|
|||
{
|
||||
public interface IKeyboardDriver
|
||||
{
|
||||
IList<Keyboard> Keyboards { get; }
|
||||
IList<Keyboard> Keyboard { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -332,7 +332,7 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
#region --- IKeyboardDriver Members ---
|
||||
|
||||
public IList<Keyboard> Keyboards
|
||||
public IList<Keyboard> Keyboard
|
||||
{
|
||||
get { return keyboards; }
|
||||
}
|
||||
|
|
10
Source/OpenTK/Platform/Windows/WinRawMouse.cs
Normal file
10
Source/OpenTK/Platform/Windows/WinRawMouse.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Platform.Windows
|
||||
{
|
||||
class WinRawMouse
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue