mirror of https://github.com/ppy/SDL3-CS.git
168 lines
7.2 KiB
C#
168 lines
7.2 KiB
C#
/*
|
|
<auto-generated/>
|
|
C# bindings for Simple DirectMedia Layer.
|
|
Original copyright notice of input files:
|
|
|
|
Simple DirectMedia Layer
|
|
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
|
|
|
This software is provided 'as-is', without any express or implied
|
|
warranty. In no event will the authors be held liable for any damages
|
|
arising from the use of this software.
|
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
including commercial applications, and to alter it and redistribute it
|
|
freely, subject to the following restrictions:
|
|
|
|
1. The origin of this software must not be misrepresented; you must not
|
|
claim that you wrote the original software. If you use this software
|
|
in a product, an acknowledgment in the product documentation would be
|
|
appreciated but is not required.
|
|
2. Altered source versions must be plainly marked as such, and must not be
|
|
misrepresented as being the original software.
|
|
3. This notice may not be removed or altered from any source distribution.
|
|
*/
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace SDL
|
|
{
|
|
public partial struct SDL_Cursor
|
|
{
|
|
}
|
|
|
|
public enum SDL_SystemCursor
|
|
{
|
|
SDL_SYSTEM_CURSOR_ARROW,
|
|
SDL_SYSTEM_CURSOR_IBEAM,
|
|
SDL_SYSTEM_CURSOR_WAIT,
|
|
SDL_SYSTEM_CURSOR_CROSSHAIR,
|
|
SDL_SYSTEM_CURSOR_WAITARROW,
|
|
SDL_SYSTEM_CURSOR_SIZENWSE,
|
|
SDL_SYSTEM_CURSOR_SIZENESW,
|
|
SDL_SYSTEM_CURSOR_SIZEWE,
|
|
SDL_SYSTEM_CURSOR_SIZENS,
|
|
SDL_SYSTEM_CURSOR_SIZEALL,
|
|
SDL_SYSTEM_CURSOR_NO,
|
|
SDL_SYSTEM_CURSOR_HAND,
|
|
SDL_SYSTEM_CURSOR_WINDOW_TOPLEFT,
|
|
SDL_SYSTEM_CURSOR_WINDOW_TOP,
|
|
SDL_SYSTEM_CURSOR_WINDOW_TOPRIGHT,
|
|
SDL_SYSTEM_CURSOR_WINDOW_RIGHT,
|
|
SDL_SYSTEM_CURSOR_WINDOW_BOTTOMRIGHT,
|
|
SDL_SYSTEM_CURSOR_WINDOW_BOTTOM,
|
|
SDL_SYSTEM_CURSOR_WINDOW_BOTTOMLEFT,
|
|
SDL_SYSTEM_CURSOR_WINDOW_LEFT,
|
|
SDL_NUM_SYSTEM_CURSORS,
|
|
}
|
|
|
|
public enum SDL_MouseWheelDirection
|
|
{
|
|
SDL_MOUSEWHEEL_NORMAL,
|
|
SDL_MOUSEWHEEL_FLIPPED,
|
|
}
|
|
|
|
public static unsafe partial class SDL3
|
|
{
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_bool SDL_HasMouse();
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_MouseID* SDL_GetMice(int* count);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetMouseInstanceName", ExactSpelling = true)]
|
|
[return: NativeTypeName("const char *")]
|
|
public static extern byte* Unsafe_SDL_GetMouseInstanceName(SDL_MouseID instance_id);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Window* SDL_GetMouseFocus();
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("Uint32")]
|
|
public static extern uint SDL_GetMouseState(float* x, float* y);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("Uint32")]
|
|
public static extern uint SDL_GetGlobalMouseState(float* x, float* y);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("Uint32")]
|
|
public static extern uint SDL_GetRelativeMouseState(float* x, float* y);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_WarpMouseInWindow(SDL_Window* window, float x, float y);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int SDL_WarpMouseGlobal(float x, float y);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int SDL_SetRelativeMouseMode(SDL_bool enabled);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int SDL_CaptureMouse(SDL_bool enabled);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_bool SDL_GetRelativeMouseMode();
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Cursor* SDL_CreateCursor([NativeTypeName("const Uint8 *")] byte* data, [NativeTypeName("const Uint8 *")] byte* mask, int w, int h, int hot_x, int hot_y);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Cursor* SDL_CreateColorCursor(SDL_Surface* surface, int hot_x, int hot_y);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Cursor* SDL_CreateSystemCursor(SDL_SystemCursor id);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int SDL_SetCursor(SDL_Cursor* cursor);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Cursor* SDL_GetCursor();
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Cursor* SDL_GetDefaultCursor();
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_DestroyCursor(SDL_Cursor* cursor);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int SDL_ShowCursor();
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int SDL_HideCursor();
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_bool SDL_CursorVisible();
|
|
|
|
[NativeTypeName("#define SDL_BUTTON_LEFT 1")]
|
|
public const int SDL_BUTTON_LEFT = 1;
|
|
|
|
[NativeTypeName("#define SDL_BUTTON_MIDDLE 2")]
|
|
public const int SDL_BUTTON_MIDDLE = 2;
|
|
|
|
[NativeTypeName("#define SDL_BUTTON_RIGHT 3")]
|
|
public const int SDL_BUTTON_RIGHT = 3;
|
|
|
|
[NativeTypeName("#define SDL_BUTTON_X1 4")]
|
|
public const int SDL_BUTTON_X1 = 4;
|
|
|
|
[NativeTypeName("#define SDL_BUTTON_X2 5")]
|
|
public const int SDL_BUTTON_X2 = 5;
|
|
|
|
[NativeTypeName("#define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)")]
|
|
public const int SDL_BUTTON_LMASK = (1 << ((1) - 1));
|
|
|
|
[NativeTypeName("#define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)")]
|
|
public const int SDL_BUTTON_MMASK = (1 << ((2) - 1));
|
|
|
|
[NativeTypeName("#define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)")]
|
|
public const int SDL_BUTTON_RMASK = (1 << ((3) - 1));
|
|
|
|
[NativeTypeName("#define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)")]
|
|
public const int SDL_BUTTON_X1MASK = (1 << ((4) - 1));
|
|
|
|
[NativeTypeName("#define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)")]
|
|
public const int SDL_BUTTON_X2MASK = (1 << ((5) - 1));
|
|
}
|
|
}
|