[X11] Renamed XI2Mouse

This file now implements both mouse and keyboard input, so its name
has been updated to reflect that.
This commit is contained in:
thefiddler 2014-05-15 10:24:03 +02:00
parent b4f4be7ece
commit 4ede3ad2d0
5 changed files with 10 additions and 10 deletions

View file

@ -697,7 +697,6 @@
<Compile Include="Platform\X11\X11Keyboard.cs" />
<Compile Include="Platform\X11\X11Mouse.cs" />
<Compile Include="Input\ButtonState.cs" />
<Compile Include="Platform\X11\XI2Mouse.cs" />
<EmbeddedResource Include="OpenTK.dll.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
@ -802,6 +801,7 @@
<Compile Include="Input\MouseScroll.cs" />
<Compile Include="Platform\X11\X11Input.cs" />
<Compile Include="Platform\X11\XI2Input.cs" />
<Compile Include="Platform\X11\XI2MouseKeyboard.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>

View file

@ -41,7 +41,7 @@ namespace OpenTK.Platform.X11
{
if (input_driver == null)
{
if (XI2Mouse.IsSupported(IntPtr.Zero))
if (XI2MouseKeyboard.IsSupported(IntPtr.Zero))
{
input_driver = new XI2Input();
}

View file

@ -247,11 +247,11 @@ namespace OpenTK.Platform.X11
// The XInput2 extension makes keyboard and mouse handling much easier.
// Check whether it is available.
xi2_supported = XI2Mouse.IsSupported(window.Display);
xi2_supported = XI2MouseKeyboard.IsSupported(window.Display);
if (xi2_supported)
{
xi2_opcode = XI2Mouse.XIOpCode;
xi2_version = XI2Mouse.XIVersion;
xi2_opcode = XI2MouseKeyboard.XIOpCode;
xi2_version = XI2MouseKeyboard.XIVersion;
}
exists = true;

View file

@ -35,7 +35,7 @@ namespace OpenTK.Platform.X11
{
class XI2Input : IInputDriver2
{
readonly XI2Mouse mouse_keyboard = new XI2Mouse();
readonly XI2MouseKeyboard mouse_keyboard = new XI2MouseKeyboard();
readonly X11Joystick joystick = new X11Joystick();
readonly IGamePadDriver gamepad = new MappedGamePadDriver();

View file

@ -34,7 +34,7 @@ using OpenTK.Input;
namespace OpenTK.Platform.X11
{
sealed class XI2Mouse : IKeyboardDriver2, IMouseDriver2, IDisposable
sealed class XI2MouseKeyboard : IKeyboardDriver2, IMouseDriver2, IDisposable
{
const XEventName ExitEvent = XEventName.LASTEvent + 1;
readonly object Sync = new object();
@ -89,7 +89,7 @@ namespace OpenTK.Platform.X11
static readonly Functions.EventPredicate PredicateImpl = IsEventValid;
readonly IntPtr Predicate = Marshal.GetFunctionPointerForDelegate(PredicateImpl);
static XI2Mouse()
static XI2MouseKeyboard()
{
using (new XLock(API.DefaultDisplay))
{
@ -119,7 +119,7 @@ namespace OpenTK.Platform.X11
}
}
public XI2Mouse()
public XI2MouseKeyboard()
{
window = new X11WindowInfo();
@ -620,7 +620,7 @@ namespace OpenTK.Platform.X11
}
}
~XI2Mouse()
~XI2MouseKeyboard()
{
Dispose(false);
}