Permalink
Browse files

[X11] Renamed XI2Mouse

This file now implements both mouse and keyboard input, so its name
has been updated to reflect that.
  • Loading branch information...
1 parent b4f4be7 commit 4ede3ad2d000debb34ef5c45e51f659408355757 @thefiddler thefiddler committed May 15, 2014
@@ -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>
@@ -41,7 +41,7 @@ IInputDriver2 InputDriver
{
if (input_driver == null)
{
- if (XI2Mouse.IsSupported(IntPtr.Zero))
+ if (XI2MouseKeyboard.IsSupported(IntPtr.Zero))
{
input_driver = new XI2Input();
}
@@ -247,11 +247,11 @@ internal sealed class X11GLNative : NativeWindowBase
// 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;
@@ -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();
@@ -34,7 +34,7 @@
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 @@ class XIKeyboard
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 @@ static XI2Mouse()
}
}
- public XI2Mouse()
+ public XI2MouseKeyboard()
{
window = new X11WindowInfo();
@@ -620,7 +620,7 @@ void Dispose(bool disposing)
}
}
- ~XI2Mouse()
+ ~XI2MouseKeyboard()
{
Dispose(false);
}

0 comments on commit 4ede3ad

Please sign in to comment.