зеркало из https://github.com/stride3d/SDL2-CS.git
Add support for new 2.0.4 features
Add SDL_GetGlobalMouseState and SDL_WarpMouseGlobal.
This commit is contained in:
Родитель
f324fb9112
Коммит
1ef76499b8
23
src/SDL2.cs
23
src/SDL2.cs
|
@ -4508,6 +4508,25 @@ Commented while waiting for RuntimeArgumentHandle to be in CoreFX.
|
|||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr SDL_GetMouseFocus();
|
||||
|
||||
/* Get the current state of the mouse in desktop relative coordinates */
|
||||
[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 desktop relative coordinates */
|
||||
/* 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 desktop relative coordinates */
|
||||
/* 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 desktop relative coordinates */
|
||||
/* 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 current state of the mouse */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern UInt32 SDL_GetMouseState(out int x, out int y);
|
||||
|
@ -4531,6 +4550,10 @@ Commented while waiting for RuntimeArgumentHandle to be in CoreFX.
|
|||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern UInt32 SDL_GetRelativeMouseState(out int x, out int y);
|
||||
|
||||
/* Set the mouse cursor's position relative to your desktop cooordinates */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int SDL_WarpMouseGlobal(int x, int y);
|
||||
|
||||
/* Set the mouse cursor's position (within a window) */
|
||||
/* window is an SDL_Window pointer */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
|
|
Загрузка…
Ссылка в новой задаче