mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 15:05:41 +00:00
Added Mouse and Keyboard stubs for the new input API.
This commit is contained in:
parent
a28616db87
commit
e2ddfe8289
41
Source/OpenTK/Input/Keyboard.cs
Normal file
41
Source/OpenTK/Input/Keyboard.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Input
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to keyboard devices.
|
||||
/// </summary>
|
||||
public static class Keyboard
|
||||
{
|
||||
#region Fields
|
||||
|
||||
static IKeyboardDriver driver;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
static Keyboard()
|
||||
{
|
||||
//driver = Platform.Factory.Default.CreateKeyboardDriver();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Members
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the KeyboardState for the specified keyboard device.
|
||||
/// </summary>
|
||||
/// <param name="index">The index of the keyboard device.</param>
|
||||
/// <returns>A <see cref="OpenTK.Input.KeyboardState"/> structure containing the state of the keyboard device.</returns>
|
||||
public static KeyboardState GetState(int index)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
38
Source/OpenTK/Input/KeyboardState.cs
Normal file
38
Source/OpenTK/Input/KeyboardState.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Input
|
||||
{
|
||||
/// <summary>
|
||||
/// Encapsulates the state of a keyboard device.
|
||||
/// </summary>
|
||||
public struct KeyboardState : IEquatable<KeyboardState>
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
internal KeyboardState(Key[] keys)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Members
|
||||
|
||||
#endregion
|
||||
|
||||
#region IEquatable<KeyboardState> Members
|
||||
|
||||
/// <summary>
|
||||
/// Compares two KeyboardState instances.
|
||||
/// </summary>
|
||||
/// <param name="other">The instance to compare two.</param>
|
||||
/// <returns>True, if both instances are equal; false otherwise.</returns>
|
||||
public bool Equals(KeyboardState other)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
40
Source/OpenTK/Input/Mouse.cs
Normal file
40
Source/OpenTK/Input/Mouse.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Input
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to mouse devices.
|
||||
/// </summary>
|
||||
public static class Mouse
|
||||
{
|
||||
#region Fields
|
||||
|
||||
static IMouseDriver driver;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
static Mouse()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Members
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the MouseState for the specified mouse device.
|
||||
/// </summary>
|
||||
/// <param name="index">The index of the mouse device.</param>
|
||||
/// <returns>A <see cref="OpenTK.Input.MouseState"/> structure containing the state of the mouse device.</returns>
|
||||
public static MouseState GetState(int index)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
34
Source/OpenTK/Input/MouseState.cs
Normal file
34
Source/OpenTK/Input/MouseState.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Input
|
||||
{
|
||||
/// <summary>
|
||||
/// Encapsulates the state of a mouse device.
|
||||
/// </summary>
|
||||
public struct MouseState : IEquatable<MouseState>
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
internal MouseState(MouseButton[] buttons)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IEquatable<MouseState> Members
|
||||
|
||||
/// <summary>
|
||||
/// Compares two MouseState instances for equality.
|
||||
/// </summary>
|
||||
/// <param name="other">The instance to compare to.</param>
|
||||
/// <returns>True, if both instances are equal; false otherwise.</returns>
|
||||
public bool Equals(MouseState other)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue