diff --git a/Source/OpenTK/Input/IMouseDriver.cs b/Source/OpenTK/Input/IMouseDriver.cs index d0a8902f..3c5a5ed8 100644 --- a/Source/OpenTK/Input/IMouseDriver.cs +++ b/Source/OpenTK/Input/IMouseDriver.cs @@ -16,12 +16,5 @@ namespace OpenTK.Input /// Gets the list of available mouse devices. /// IList Mouse { get; } - /* - /// - /// Registers available mouse devices. - /// - /// The number of devices registered. - int RegisterDevices(); - */ } } diff --git a/Source/OpenTK/Platform/X11/X11Keyboard.cs b/Source/OpenTK/Platform/X11/X11Keyboard.cs index 7279d563..6faac5aa 100644 --- a/Source/OpenTK/Platform/X11/X11Keyboard.cs +++ b/Source/OpenTK/Platform/X11/X11Keyboard.cs @@ -17,19 +17,18 @@ using System.Diagnostics; namespace OpenTK.Platform.X11 { /// - /// Drives the Keyboard devices on X11. + /// Drives Keyboard devices on X11. /// This class supports OpenTK, and is not intended for use by OpenTK programs. /// - internal class X11Keyboard : IKeyboardDriver + internal sealed class X11Keyboard : IKeyboardDriver { /// /// The window receiving input events. /// WindowInfo window; - private bool[] keys = new bool[(int)OpenTK.Input.Key.MaxKeys]; - private List keyboards = new List(); - private static Dictionary keymap = new Dictionary((int)Key.MaxKeys); + List keyboards = new List(); + static Dictionary keymap = new Dictionary((int)Key.MaxKeys); /// /// The smallest and largest KeyCode supported by the X server. Queried through API.DisplayKeycodes() /// @@ -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) /// diff --git a/Source/OpenTK/Platform/X11/X11Mouse.cs b/Source/OpenTK/Platform/X11/X11Mouse.cs index 04e2fc55..e52ff963 100644 --- a/Source/OpenTK/Platform/X11/X11Mouse.cs +++ b/Source/OpenTK/Platform/X11/X11Mouse.cs @@ -11,13 +11,29 @@ using OpenTK.Input; namespace OpenTK.Platform.X11 { - class X11Mouse : IMouseDriver + /// + /// Drives Mouse devices on X11. + /// This class supports OpenTK, and is not intended for use by OpenTK programs. + /// + internal sealed class X11Mouse : IMouseDriver { + WindowInfo window; + List mice = new List(); + + #region Constructor + + public X11Mouse(WindowInfo window) + { + this.window = window; + } + + #endregion + #region --- IMouseDriver Members --- public IList Mouse { - get { throw new Exception("The method or operation is not implemented."); } + get { } } public int RegisterDevices()