mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 05:55:33 +00:00
Work on X11 mouse driver.
This commit is contained in:
parent
0e862bcfdf
commit
130951343a
|
@ -16,12 +16,5 @@ namespace OpenTK.Input
|
|||
/// Gets the list of available mouse devices.
|
||||
/// </summary>
|
||||
IList<Mouse> Mouse { get; }
|
||||
/*
|
||||
/// <summary>
|
||||
/// Registers available mouse devices.
|
||||
/// </summary>
|
||||
/// <returns>The number of devices registered.</returns>
|
||||
int RegisterDevices();
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,19 +17,18 @@ using System.Diagnostics;
|
|||
namespace OpenTK.Platform.X11
|
||||
{
|
||||
/// <summary>
|
||||
/// Drives the Keyboard devices on X11.
|
||||
/// Drives Keyboard devices on X11.
|
||||
/// This class supports OpenTK, and is not intended for use by OpenTK programs.
|
||||
/// </summary>
|
||||
internal class X11Keyboard : IKeyboardDriver
|
||||
internal sealed class X11Keyboard : IKeyboardDriver
|
||||
{
|
||||
/// <summary>
|
||||
/// The window receiving input events.
|
||||
/// </summary>
|
||||
WindowInfo window;
|
||||
|
||||
private bool[] keys = new bool[(int)OpenTK.Input.Key.MaxKeys];
|
||||
private List<Keyboard> keyboards = new List<Keyboard>();
|
||||
private static Dictionary<XKey, Key> keymap = new Dictionary<XKey, Key>((int)Key.MaxKeys);
|
||||
List<Keyboard> keyboards = new List<Keyboard>();
|
||||
static Dictionary<XKey, Key> keymap = new Dictionary<XKey, Key>((int)Key.MaxKeys);
|
||||
/// <summary>
|
||||
/// The smallest and largest KeyCode supported by the X server. Queried through API.DisplayKeycodes()
|
||||
/// </summary>
|
||||
|
@ -162,6 +161,8 @@ namespace OpenTK.Platform.X11
|
|||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
internal X11Keyboard(WindowInfo window)
|
||||
{
|
||||
if (window == null)
|
||||
|
@ -193,6 +194,8 @@ namespace OpenTK.Platform.X11
|
|||
Debug.Print("Keyboard added: {0}", kb.ToString());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region internal bool ProcessKeyboardEvent(X11.KeyEvent e)
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -11,13 +11,29 @@ using OpenTK.Input;
|
|||
|
||||
namespace OpenTK.Platform.X11
|
||||
{
|
||||
class X11Mouse : IMouseDriver
|
||||
/// <summary>
|
||||
/// Drives Mouse devices on X11.
|
||||
/// This class supports OpenTK, and is not intended for use by OpenTK programs.
|
||||
/// </summary>
|
||||
internal sealed class X11Mouse : IMouseDriver
|
||||
{
|
||||
WindowInfo window;
|
||||
List<Mouse> mice = new List<Mouse>();
|
||||
|
||||
#region Constructor
|
||||
|
||||
public X11Mouse(WindowInfo window)
|
||||
{
|
||||
this.window = window;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- IMouseDriver Members ---
|
||||
|
||||
public IList<Mouse> Mouse
|
||||
{
|
||||
get { throw new Exception("The method or operation is not implemented."); }
|
||||
get { }
|
||||
}
|
||||
|
||||
public int RegisterDevices()
|
||||
|
|
Loading…
Reference in a new issue