Overloads for GetMouseState

This commit is contained in:
Ethan Lee 2014-10-18 12:36:44 -04:00
parent df0b8c03d6
commit 818830fc3a

View file

@ -4375,10 +4375,24 @@ namespace SDL2
public static extern IntPtr SDL_GetMouseFocus();
/* Get the current state of the mouse */
/* NOTE: Not sure if x,y should be 'ref', as SDL accepts null */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern UInt32 SDL_GetMouseState(out int x, out int y);
/* Get the current state of the mouse */
/* This overload allows for passing NULL to x */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern UInt32 SDL_GetMouseState(IntPtr x, out int y);
/* Get the current state of the mouse */
/* This overload allows for passing NULL to y */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern UInt32 SDL_GetMouseState(out int x, IntPtr y);
/* Get the current state of the mouse */
/* This overload allows for passing NULL to both x and y */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern UInt32 SDL_GetMouseState(IntPtr x, IntPtr y);
/* Get the mouse state with relative coords*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern UInt32 SDL_GetRelativeMouseState(out int x, out int y);