mirror of
https://github.com/Ryujinx/SDL2-CS.git
synced 2024-12-23 13:55:29 +00:00
2.0.4 mouse additions
This commit is contained in:
parent
818830fc3a
commit
e395a5114d
23
src/SDL2.cs
23
src/SDL2.cs
|
@ -4393,6 +4393,25 @@ namespace SDL2
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern UInt32 SDL_GetMouseState(IntPtr x, IntPtr y);
|
public static extern UInt32 SDL_GetMouseState(IntPtr x, IntPtr y);
|
||||||
|
|
||||||
|
/* Get the current state of the mouse, in relation to the desktop */
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern UInt32 SDL_GetGlobalMouseState(out int x, out int y);
|
||||||
|
|
||||||
|
/* Get the current state of the mouse, in relation to the desktop */
|
||||||
|
/* This overload allows for passing NULL to x */
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern UInt32 SDL_GetGlobalMouseState(IntPtr x, out int y);
|
||||||
|
|
||||||
|
/* Get the current state of the mouse, in relation to the desktop */
|
||||||
|
/* This overload allows for passing NULL to y */
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern UInt32 SDL_GetGlobalMouseState(out int x, IntPtr y);
|
||||||
|
|
||||||
|
/* Get the current state of the mouse, in relation to the desktop */
|
||||||
|
/* This overload allows for passing NULL to both x and y */
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern UInt32 SDL_GetGlobalMouseState(IntPtr x, IntPtr y);
|
||||||
|
|
||||||
/* Get the mouse state with relative coords*/
|
/* Get the mouse state with relative coords*/
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern UInt32 SDL_GetRelativeMouseState(out int x, out int y);
|
public static extern UInt32 SDL_GetRelativeMouseState(out int x, out int y);
|
||||||
|
@ -4402,6 +4421,10 @@ namespace SDL2
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void SDL_WarpMouseInWindow(IntPtr window, int x, int y);
|
public static extern void SDL_WarpMouseInWindow(IntPtr window, int x, int y);
|
||||||
|
|
||||||
|
/* Set the mouse cursor's position in global screen space */
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void SDL_WarpMouseGlobal(int x, int y);
|
||||||
|
|
||||||
/* Enable/Disable relative mouse mode (grabs mouse, rel coords) */
|
/* Enable/Disable relative mouse mode (grabs mouse, rel coords) */
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern int SDL_SetRelativeMouseMode(SDL_bool enabled);
|
public static extern int SDL_SetRelativeMouseMode(SDL_bool enabled);
|
||||||
|
|
Loading…
Reference in a new issue