mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-19 07:27:32 +00:00
Renamed InputDevices.cs to InputDriver.cs.
Added IMouseDriver.cs and WinRawMouse.
This commit is contained in:
parent
f9ab9f5242
commit
6812739418
|
@ -23,7 +23,7 @@ namespace Examples.WinForms
|
||||||
{
|
{
|
||||||
public partial class W01_First_Window : Form, IExample
|
public partial class W01_First_Window : Form, IExample
|
||||||
{
|
{
|
||||||
OpenTK.InputDevices input;
|
OpenTK.InputDriver input;
|
||||||
public W01_First_Window()
|
public W01_First_Window()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
@ -35,7 +35,7 @@ namespace Examples.WinForms
|
||||||
{
|
{
|
||||||
base.OnHandleCreated(e);
|
base.OnHandleCreated(e);
|
||||||
|
|
||||||
input = new OpenTK.InputDevices(this.Handle);
|
input = new OpenTK.InputDriver(this.Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void redButton_Click(object sender, EventArgs e)
|
private void redButton_Click(object sender, EventArgs e)
|
||||||
|
|
|
@ -19,14 +19,14 @@ namespace OpenTK
|
||||||
private ResizeEventArgs resizeEventArgs = new ResizeEventArgs();
|
private ResizeEventArgs resizeEventArgs = new ResizeEventArgs();
|
||||||
private DisplayMode mode;
|
private DisplayMode mode;
|
||||||
|
|
||||||
private InputDevices inputDevices;
|
private InputDriver inputDevices;
|
||||||
public IList<Input.Keyboard> Keyboard { get { return Input.Keyboards; } }
|
public IList<Input.Keyboard> Keyboard { get { return Input.Keyboard; } }
|
||||||
public InputDevices Input
|
public InputDriver Input
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (inputDevices == null)
|
if (inputDevices == null)
|
||||||
inputDevices = new InputDevices(this.Handle);
|
inputDevices = new InputDriver(this.Handle);
|
||||||
return inputDevices;
|
return inputDevices;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ namespace OpenTK
|
||||||
void glWindow_Create(object sender, EventArgs e)
|
void glWindow_Create(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//glWindow.Context.MakeCurrent();
|
//glWindow.Context.MakeCurrent();
|
||||||
inputDevices = new InputDevices(this.Handle);
|
inputDevices = new InputDriver(this.Handle);
|
||||||
|
|
||||||
this.OnCreate(e);
|
this.OnCreate(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.Text;
|
||||||
|
|
||||||
namespace OpenTK.Input
|
namespace OpenTK.Input
|
||||||
{
|
{
|
||||||
public interface IInputDriver : IKeyboardDriver
|
public interface IInputDriver : IKeyboardDriver, IMouseDriver
|
||||||
{
|
{
|
||||||
IList<IInputDevice> InputDevices { get; }
|
IList<IInputDevice> InputDevices { get; }
|
||||||
//void ProcessEvents
|
//void ProcessEvents
|
||||||
|
|
|
@ -6,6 +6,6 @@ namespace OpenTK.Input
|
||||||
{
|
{
|
||||||
public interface IKeyboardDriver
|
public interface IKeyboardDriver
|
||||||
{
|
{
|
||||||
IList<Keyboard> Keyboards { get; }
|
IList<Keyboard> Keyboard { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,11 @@ using OpenTK.Input;
|
||||||
|
|
||||||
namespace OpenTK
|
namespace OpenTK
|
||||||
{
|
{
|
||||||
public class InputDevices : IInputDriver
|
public class InputDriver : IInputDriver
|
||||||
{
|
{
|
||||||
IInputDriver inputDriver;
|
IInputDriver inputDriver;
|
||||||
|
|
||||||
public InputDevices(IntPtr parentHandle)
|
public InputDriver(IntPtr parentHandle)
|
||||||
{
|
{
|
||||||
if (Environment.OSVersion.Version.Major > 5 ||
|
if (Environment.OSVersion.Version.Major > 5 ||
|
||||||
(Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor >= 1))
|
(Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor >= 1))
|
||||||
|
@ -30,9 +30,14 @@ namespace OpenTK
|
||||||
get { return inputDriver.InputDevices; }
|
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
|
#endregion
|
|
@ -153,9 +153,14 @@ namespace OpenTK.Platform.Windows
|
||||||
get { throw new Exception("The method or operation is not implemented."); }
|
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
|
#endregion
|
||||||
|
|
|
@ -332,7 +332,7 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
#region --- IKeyboardDriver Members ---
|
#region --- IKeyboardDriver Members ---
|
||||||
|
|
||||||
public IList<Keyboard> Keyboards
|
public IList<Keyboard> Keyboard
|
||||||
{
|
{
|
||||||
get { return keyboards; }
|
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