Opentk/Source/OpenTK/Platform/SDL2/Sdl2Mouse.cs
thefiddler 6d0b5eb49f Implemented SDL2 platform using sdl2-cs
This is a new platform that can be used then sdl2 is installed on the target system. SDL2 is commercially supported by Valve and provides better support for MacOS compared to our current implementation (Cocoa vs Carbon). It will also help us introduce faster support for new platforms. Existing platforms remain as a fallback and will be automatically used if sdl2 is not installed.

Please note that this is still a work in progress. The new mouse and keyboard API is not supported yet. Due to limitations of sdl2, multiple mice/keyboards are also not supported.
2013-09-27 14:41:37 +02:00

35 lines
602 B
C#

using System;
using OpenTK.Input;
namespace OpenTK.Platform.SDL2
{
class Sdl2Mouse : IMouseDriver2
{
public Sdl2Mouse()
{
}
#region IMouseDriver2 Members
public MouseState GetState()
{
int x, y;
uint b = SDL.SDL_GetMouseState(out x, out y);
return new MouseState();
}
public MouseState GetState(int index)
{
return new MouseState();
}
public void SetPosition(double x, double y)
{
//SDL2.mouse
}
#endregion
}
}