Added Mouse and Keyboard stubs for the new input API.

This commit is contained in:
the_fiddler 2009-06-28 10:01:54 +00:00
parent a28616db87
commit e2ddfe8289
4 changed files with 153 additions and 0 deletions

View 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
}
}

View 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
}
}

View 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
}
}

View 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
}
}