using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;

namespace SDL2
{
	public static class SDL
	{
		internal static byte[] UTF8_ToNative(string s)
		{
			if (s == null)
			{
				return null;
			}
			return Encoding.UTF8.GetBytes(s + "\0");
		}

		public unsafe static string UTF8_ToManaged(IntPtr s, bool freePtr = false)
		{
			if (s == IntPtr.Zero)
			{
				return null;
			}
			byte* ptr = (byte*)((void*)s);
			while (*ptr != 0)
			{
				ptr++;
			}
			int num = (int)((long)((byte*)ptr - (byte*)((void*)s)));
			char* ptr2 = stackalloc char[checked(unchecked((UIntPtr)num) * 2)];
			int chars = Encoding.UTF8.GetChars((byte*)((void*)s), num, ptr2, num);
			string result = new string(ptr2, 0, chars);
			if (freePtr)
			{
				SDL.SDL_free(s);
			}
			return result;
		}

		public static uint SDL_FOURCC(byte A, byte B, byte C, byte D)
		{
			return (uint)((int)A | (int)B << 8 | (int)C << 16 | (int)D << 24);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		internal static extern IntPtr SDL_malloc(IntPtr size);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		internal static extern void SDL_free(IntPtr memblock);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_RWFromFile")]
		private static extern IntPtr INTERNAL_SDL_RWFromFile(byte[] file, byte[] mode);

		internal static IntPtr INTERNAL_SDL_RWFromFile(string file, string mode)
		{
			return SDL.INTERNAL_SDL_RWFromFile(SDL.UTF8_ToNative(file), SDL.UTF8_ToNative(mode));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_RWFromMem(IntPtr mem, int size);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetMainReady();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_WinRTRunApp(SDL.SDL_WinRT_mainFunction mainFunction, IntPtr reserved);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_Init(uint flags);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_InitSubSystem(uint flags);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_Quit();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_QuitSubSystem(uint flags);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_WasInit(uint flags);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetPlatform")]
		private static extern IntPtr INTERNAL_SDL_GetPlatform();

		public static string SDL_GetPlatform()
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetPlatform(), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_ClearHints();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetHint")]
		private static extern IntPtr INTERNAL_SDL_GetHint(byte[] name);

		public static string SDL_GetHint(string name)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetHint(SDL.UTF8_ToNative(name)), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_SetHint")]
		private static extern SDL.SDL_bool INTERNAL_SDL_SetHint(byte[] name, byte[] value);

		public static SDL.SDL_bool SDL_SetHint(string name, string value)
		{
			return SDL.INTERNAL_SDL_SetHint(SDL.UTF8_ToNative(name), SDL.UTF8_ToNative(value));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_SetHintWithPriority")]
		private static extern SDL.SDL_bool INTERNAL_SDL_SetHintWithPriority(byte[] name, byte[] value, SDL.SDL_HintPriority priority);

		public static SDL.SDL_bool SDL_SetHintWithPriority(string name, string value, SDL.SDL_HintPriority priority)
		{
			return SDL.INTERNAL_SDL_SetHintWithPriority(SDL.UTF8_ToNative(name), SDL.UTF8_ToNative(value), priority);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetHintBoolean")]
		private static extern SDL.SDL_bool INTERNAL_SDL_GetHintBoolean(byte[] name, SDL.SDL_bool default_value);

		public static SDL.SDL_bool SDL_GetHintBoolean(string name, SDL.SDL_bool default_value)
		{
			return SDL.INTERNAL_SDL_GetHintBoolean(SDL.UTF8_ToNative(name), default_value);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_ClearError();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetError")]
		private static extern IntPtr INTERNAL_SDL_GetError();

		public static string SDL_GetError()
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetError(), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_SetError")]
		private static extern void INTERNAL_SDL_SetError(byte[] fmtAndArglist);

		public static void SDL_SetError(string fmtAndArglist)
		{
			SDL.INTERNAL_SDL_SetError(SDL.UTF8_ToNative(fmtAndArglist));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_Log")]
		private static extern void INTERNAL_SDL_Log(byte[] fmtAndArglist);

		public static void SDL_Log(string fmtAndArglist)
		{
			SDL.INTERNAL_SDL_Log(SDL.UTF8_ToNative(fmtAndArglist));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_LogVerbose")]
		private static extern void INTERNAL_SDL_LogVerbose(int category, byte[] fmtAndArglist);

		public static void SDL_LogVerbose(int category, string fmtAndArglist)
		{
			SDL.INTERNAL_SDL_LogVerbose(category, SDL.UTF8_ToNative(fmtAndArglist));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_LogDebug")]
		private static extern void INTERNAL_SDL_LogDebug(int category, byte[] fmtAndArglist);

		public static void SDL_LogDebug(int category, string fmtAndArglist)
		{
			SDL.INTERNAL_SDL_LogDebug(category, SDL.UTF8_ToNative(fmtAndArglist));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_LogInfo")]
		private static extern void INTERNAL_SDL_LogInfo(int category, byte[] fmtAndArglist);

		public static void SDL_LogInfo(int category, string fmtAndArglist)
		{
			SDL.INTERNAL_SDL_LogInfo(category, SDL.UTF8_ToNative(fmtAndArglist));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_LogWarn")]
		private static extern void INTERNAL_SDL_LogWarn(int category, byte[] fmtAndArglist);

		public static void SDL_LogWarn(int category, string fmtAndArglist)
		{
			SDL.INTERNAL_SDL_LogWarn(category, SDL.UTF8_ToNative(fmtAndArglist));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_LogError")]
		private static extern void INTERNAL_SDL_LogError(int category, byte[] fmtAndArglist);

		public static void SDL_LogError(int category, string fmtAndArglist)
		{
			SDL.INTERNAL_SDL_LogError(category, SDL.UTF8_ToNative(fmtAndArglist));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_LogCritical")]
		private static extern void INTERNAL_SDL_LogCritical(int category, byte[] fmtAndArglist);

		public static void SDL_LogCritical(int category, string fmtAndArglist)
		{
			SDL.INTERNAL_SDL_LogCritical(category, SDL.UTF8_ToNative(fmtAndArglist));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_LogMessage")]
		private static extern void INTERNAL_SDL_LogMessage(int category, SDL.SDL_LogPriority priority, byte[] fmtAndArglist);

		public static void SDL_LogMessage(int category, SDL.SDL_LogPriority priority, string fmtAndArglist)
		{
			SDL.INTERNAL_SDL_LogMessage(category, priority, SDL.UTF8_ToNative(fmtAndArglist));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_LogMessageV")]
		private static extern void INTERNAL_SDL_LogMessageV(int category, SDL.SDL_LogPriority priority, byte[] fmtAndArglist);

		public static void SDL_LogMessageV(int category, SDL.SDL_LogPriority priority, string fmtAndArglist)
		{
			SDL.INTERNAL_SDL_LogMessageV(category, priority, SDL.UTF8_ToNative(fmtAndArglist));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_LogPriority SDL_LogGetPriority(int category);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_LogSetPriority(int category, SDL.SDL_LogPriority priority);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_LogSetAllPriority(SDL.SDL_LogPriority priority);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_LogResetPriorities();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		private static extern void SDL_LogGetOutputFunction(out IntPtr callback, out IntPtr userdata);

		public static void SDL_LogGetOutputFunction(out SDL.SDL_LogOutputFunction callback, out IntPtr userdata)
		{
			IntPtr zero = IntPtr.Zero;
			SDL.SDL_LogGetOutputFunction(out zero, out userdata);
			if (zero != IntPtr.Zero)
			{
				callback = (SDL.SDL_LogOutputFunction)Marshal.GetDelegateForFunctionPointer(zero, typeof(SDL.SDL_LogOutputFunction));
				return;
			}
			callback = null;
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_LogSetOutputFunction(SDL.SDL_LogOutputFunction callback, IntPtr userdata);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_ShowMessageBox")]
		private static extern int INTERNAL_SDL_ShowMessageBox([In] ref SDL.INTERNAL_SDL_MessageBoxData messageboxdata, out int buttonid);

		private static IntPtr INTERNAL_AllocUTF8(string str)
		{
			if (string.IsNullOrEmpty(str))
			{
				return IntPtr.Zero;
			}
			byte[] bytes = Encoding.UTF8.GetBytes(str + "\0");
			IntPtr intPtr = SDL.SDL_malloc((IntPtr)bytes.Length);
			Marshal.Copy(bytes, 0, intPtr, bytes.Length);
			return intPtr;
		}

		public unsafe static int SDL_ShowMessageBox([In] ref SDL.SDL_MessageBoxData messageboxdata, out int buttonid)
		{
			SDL.INTERNAL_SDL_MessageBoxData internal_SDL_MessageBoxData = new SDL.INTERNAL_SDL_MessageBoxData
			{
				flags = messageboxdata.flags,
				window = messageboxdata.window,
				title = SDL.INTERNAL_AllocUTF8(messageboxdata.title),
				message = SDL.INTERNAL_AllocUTF8(messageboxdata.message),
				numbuttons = messageboxdata.numbuttons
			};
			SDL.INTERNAL_SDL_MessageBoxButtonData[] array = new SDL.INTERNAL_SDL_MessageBoxButtonData[messageboxdata.numbuttons];
			for (int i = 0; i < messageboxdata.numbuttons; i++)
			{
				array[i] = new SDL.INTERNAL_SDL_MessageBoxButtonData
				{
					flags = messageboxdata.buttons[i].flags,
					buttonid = messageboxdata.buttons[i].buttonid,
					text = SDL.INTERNAL_AllocUTF8(messageboxdata.buttons[i].text)
				};
			}
			if (messageboxdata.colorScheme != null)
			{
				internal_SDL_MessageBoxData.colorScheme = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(SDL.SDL_MessageBoxColorScheme)));
				Marshal.StructureToPtr<SDL.SDL_MessageBoxColorScheme>(messageboxdata.colorScheme.Value, internal_SDL_MessageBoxData.colorScheme, false);
			}
			int result;
			fixed (SDL.INTERNAL_SDL_MessageBoxButtonData* ptr = &array[0])
			{
				SDL.INTERNAL_SDL_MessageBoxButtonData* value = ptr;
				internal_SDL_MessageBoxData.buttons = (IntPtr)((void*)value);
				result = SDL.INTERNAL_SDL_ShowMessageBox(ref internal_SDL_MessageBoxData, out buttonid);
			}
			Marshal.FreeHGlobal(internal_SDL_MessageBoxData.colorScheme);
			for (int j = 0; j < messageboxdata.numbuttons; j++)
			{
				SDL.SDL_free(array[j].text);
			}
			SDL.SDL_free(internal_SDL_MessageBoxData.message);
			SDL.SDL_free(internal_SDL_MessageBoxData.title);
			return result;
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_ShowSimpleMessageBox")]
		private static extern int INTERNAL_SDL_ShowSimpleMessageBox(SDL.SDL_MessageBoxFlags flags, byte[] title, byte[] message, IntPtr window);

		public static int SDL_ShowSimpleMessageBox(SDL.SDL_MessageBoxFlags flags, string title, string message, IntPtr window)
		{
			return SDL.INTERNAL_SDL_ShowSimpleMessageBox(flags, SDL.UTF8_ToNative(title), SDL.UTF8_ToNative(message), window);
		}

		public static void SDL_VERSION(out SDL.SDL_version x)
		{
			x.major = 2;
			x.minor = 0;
			x.patch = 9;
		}

		public static int SDL_VERSIONNUM(int X, int Y, int Z)
		{
			return X * 1000 + Y * 100 + Z;
		}

		public static bool SDL_VERSION_ATLEAST(int X, int Y, int Z)
		{
			return SDL.SDL_COMPILEDVERSION >= SDL.SDL_VERSIONNUM(X, Y, Z);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GetVersion(out SDL.SDL_version ver);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetRevision")]
		private static extern IntPtr INTERNAL_SDL_GetRevision();

		public static string SDL_GetRevision()
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetRevision(), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetRevisionNumber();

		public static int SDL_WINDOWPOS_UNDEFINED_DISPLAY(int X)
		{
			return 536805376 | X;
		}

		public static bool SDL_WINDOWPOS_ISUNDEFINED(int X)
		{
			return ((long)X & (long)((ulong)-65536)) == 536805376L;
		}

		public static int SDL_WINDOWPOS_CENTERED_DISPLAY(int X)
		{
			return 805240832 | X;
		}

		public static bool SDL_WINDOWPOS_ISCENTERED(int X)
		{
			return ((long)X & (long)((ulong)-65536)) == 805240832L;
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_CreateWindow")]
		private static extern IntPtr INTERNAL_SDL_CreateWindow(byte[] title, int x, int y, int w, int h, SDL.SDL_WindowFlags flags);

		public static IntPtr SDL_CreateWindow(string title, int x, int y, int w, int h, SDL.SDL_WindowFlags flags)
		{
			return SDL.INTERNAL_SDL_CreateWindow(SDL.UTF8_ToNative(title), x, y, w, h, flags);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_CreateWindowAndRenderer(int width, int height, SDL.SDL_WindowFlags window_flags, out IntPtr window, out IntPtr renderer);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_CreateWindowFrom(IntPtr data);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_DestroyWindow(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_DisableScreenSaver();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_EnableScreenSaver();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GetClosestDisplayMode(int displayIndex, ref SDL.SDL_DisplayMode mode, out SDL.SDL_DisplayMode closest);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetCurrentDisplayMode(int displayIndex, out SDL.SDL_DisplayMode mode);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetCurrentVideoDriver")]
		private static extern IntPtr INTERNAL_SDL_GetCurrentVideoDriver();

		public static string SDL_GetCurrentVideoDriver()
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetCurrentVideoDriver(), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetDesktopDisplayMode(int displayIndex, out SDL.SDL_DisplayMode mode);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetDisplayName")]
		private static extern IntPtr INTERNAL_SDL_GetDisplayName(int index);

		public static string SDL_GetDisplayName(int index)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetDisplayName(index), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetDisplayBounds(int displayIndex, out SDL.SDL_Rect rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetDisplayDPI(int displayIndex, out float ddpi, out float hdpi, out float vdpi);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_DisplayOrientation SDL_GetDisplayOrientation(int displayIndex);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetDisplayMode(int displayIndex, int modeIndex, out SDL.SDL_DisplayMode mode);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetDisplayUsableBounds(int displayIndex, out SDL.SDL_Rect rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetNumDisplayModes(int displayIndex);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetNumVideoDisplays();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetNumVideoDrivers();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetVideoDriver")]
		private static extern IntPtr INTERNAL_SDL_GetVideoDriver(int index);

		public static string SDL_GetVideoDriver(int index)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetVideoDriver(index), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern float SDL_GetWindowBrightness(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetWindowOpacity(IntPtr window, float opacity);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetWindowOpacity(IntPtr window, out float out_opacity);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetWindowModalFor(IntPtr modal_window, IntPtr parent_window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetWindowInputFocus(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetWindowData")]
		private static extern IntPtr INTERNAL_SDL_GetWindowData(IntPtr window, byte[] name);

		public static IntPtr SDL_GetWindowData(IntPtr window, string name)
		{
			return SDL.INTERNAL_SDL_GetWindowData(window, SDL.UTF8_ToNative(name));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetWindowDisplayIndex(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetWindowDisplayMode(IntPtr window, out SDL.SDL_DisplayMode mode);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetWindowFlags(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GetWindowFromID(uint id);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetWindowGammaRamp(IntPtr window, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U2, SizeConst = 256)] [Out] ushort[] red, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U2, SizeConst = 256)] [Out] ushort[] green, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U2, SizeConst = 256)] [Out] ushort[] blue);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_GetWindowGrab(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetWindowID(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetWindowPixelFormat(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GetWindowMaximumSize(IntPtr window, out int max_w, out int max_h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GetWindowMinimumSize(IntPtr window, out int min_w, out int min_h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GetWindowPosition(IntPtr window, out int x, out int y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GetWindowSize(IntPtr window, out int w, out int h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GetWindowSurface(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetWindowTitle")]
		private static extern IntPtr INTERNAL_SDL_GetWindowTitle(IntPtr window);

		public static string SDL_GetWindowTitle(IntPtr window)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetWindowTitle(window), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GL_BindTexture(IntPtr texture, out float texw, out float texh);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GL_CreateContext(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GL_DeleteContext(IntPtr context);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GL_GetProcAddress")]
		private static extern IntPtr INTERNAL_SDL_GL_GetProcAddress(byte[] proc);

		public static IntPtr SDL_GL_GetProcAddress(string proc)
		{
			return SDL.INTERNAL_SDL_GL_GetProcAddress(SDL.UTF8_ToNative(proc));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GL_LoadLibrary")]
		private static extern int INTERNAL_SDL_GL_LoadLibrary(byte[] path);

		public static int SDL_GL_LoadLibrary(string path)
		{
			return SDL.INTERNAL_SDL_GL_LoadLibrary(SDL.UTF8_ToNative(path));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GL_GetProcAddress(IntPtr proc);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GL_UnloadLibrary();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GL_ExtensionSupported")]
		private static extern SDL.SDL_bool INTERNAL_SDL_GL_ExtensionSupported(byte[] extension);

		public static SDL.SDL_bool SDL_GL_ExtensionSupported(string extension)
		{
			return SDL.INTERNAL_SDL_GL_ExtensionSupported(SDL.UTF8_ToNative(extension));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GL_ResetAttributes();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GL_GetAttribute(SDL.SDL_GLattr attr, out int value);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GL_GetSwapInterval();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GL_MakeCurrent(IntPtr window, IntPtr context);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GL_GetCurrentWindow();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GL_GetCurrentContext();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GL_GetDrawableSize(IntPtr window, out int w, out int h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GL_SetAttribute(SDL.SDL_GLattr attr, int value);

		public static int SDL_GL_SetAttribute(SDL.SDL_GLattr attr, SDL.SDL_GLprofile profile)
		{
			return SDL.SDL_GL_SetAttribute(attr, (int)profile);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GL_SetSwapInterval(int interval);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GL_SwapWindow(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GL_UnbindTexture(IntPtr texture);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_HideWindow(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_IsScreenSaverEnabled();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_MaximizeWindow(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_MinimizeWindow(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_RaiseWindow(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_RestoreWindow(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetWindowBrightness(IntPtr window, float brightness);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_SetWindowData")]
		private static extern IntPtr INTERNAL_SDL_SetWindowData(IntPtr window, byte[] name, IntPtr userdata);

		public static IntPtr SDL_SetWindowData(IntPtr window, string name, IntPtr userdata)
		{
			return SDL.INTERNAL_SDL_SetWindowData(window, SDL.UTF8_ToNative(name), userdata);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetWindowDisplayMode(IntPtr window, ref SDL.SDL_DisplayMode mode);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetWindowFullscreen(IntPtr window, uint flags);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetWindowGammaRamp(IntPtr window, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U2, SizeConst = 256)] [In] ushort[] red, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U2, SizeConst = 256)] [In] ushort[] green, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U2, SizeConst = 256)] [In] ushort[] blue);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetWindowGrab(IntPtr window, SDL.SDL_bool grabbed);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetWindowIcon(IntPtr window, IntPtr icon);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetWindowMaximumSize(IntPtr window, int max_w, int max_h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetWindowMinimumSize(IntPtr window, int min_w, int min_h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetWindowPosition(IntPtr window, int x, int y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetWindowSize(IntPtr window, int w, int h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetWindowBordered(IntPtr window, SDL.SDL_bool bordered);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetWindowBordersSize(IntPtr window, out int top, out int left, out int bottom, out int right);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetWindowResizable(IntPtr window, SDL.SDL_bool resizable);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_SetWindowTitle")]
		private static extern void INTERNAL_SDL_SetWindowTitle(IntPtr window, byte[] title);

		public static void SDL_SetWindowTitle(IntPtr window, string title)
		{
			SDL.INTERNAL_SDL_SetWindowTitle(window, SDL.UTF8_ToNative(title));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_ShowWindow(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_UpdateWindowSurface(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_UpdateWindowSurfaceRects(IntPtr window, [In] SDL.SDL_Rect[] rects, int numrects);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_VideoInit")]
		private static extern int INTERNAL_SDL_VideoInit(byte[] driver_name);

		public static int SDL_VideoInit(string driver_name)
		{
			return SDL.INTERNAL_SDL_VideoInit(SDL.UTF8_ToNative(driver_name));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_VideoQuit();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetWindowHitTest(IntPtr window, SDL.SDL_HitTest callback, IntPtr callback_data);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GetGrabbedWindow();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_BlendMode SDL_ComposeCustomBlendMode(SDL.SDL_BlendFactor srcColorFactor, SDL.SDL_BlendFactor dstColorFactor, SDL.SDL_BlendOperation colorOperation, SDL.SDL_BlendFactor srcAlphaFactor, SDL.SDL_BlendFactor dstAlphaFactor, SDL.SDL_BlendOperation alphaOperation);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_Vulkan_LoadLibrary")]
		private static extern int INTERNAL_SDL_Vulkan_LoadLibrary(byte[] path);

		public static int SDL_Vulkan_LoadLibrary(string path)
		{
			return SDL.INTERNAL_SDL_Vulkan_LoadLibrary(SDL.UTF8_ToNative(path));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_Vulkan_GetVkGetInstanceProcAddr();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_Vulkan_UnloadLibrary();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_Vulkan_GetInstanceExtensions(IntPtr window, out uint pCount, IntPtr[] pNames);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_Vulkan_CreateSurface(IntPtr window, IntPtr instance, out IntPtr surface);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_Vulkan_GetDrawableSize(IntPtr window, out int w, out int h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_CreateRenderer(IntPtr window, int index, SDL.SDL_RendererFlags flags);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_CreateSoftwareRenderer(IntPtr surface);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_CreateTexture(IntPtr renderer, uint format, int access, int w, int h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_CreateTextureFromSurface(IntPtr renderer, IntPtr surface);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_DestroyRenderer(IntPtr renderer);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_DestroyTexture(IntPtr texture);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetNumRenderDrivers();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetRenderDrawBlendMode(IntPtr renderer, out SDL.SDL_BlendMode blendMode);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetRenderDrawColor(IntPtr renderer, out byte r, out byte g, out byte b, out byte a);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetRenderDriverInfo(int index, out SDL.SDL_RendererInfo info);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GetRenderer(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetRendererInfo(IntPtr renderer, out SDL.SDL_RendererInfo info);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetRendererOutputSize(IntPtr renderer, out int w, out int h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetTextureAlphaMod(IntPtr texture, out byte alpha);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetTextureBlendMode(IntPtr texture, out SDL.SDL_BlendMode blendMode);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetTextureColorMod(IntPtr texture, out byte r, out byte g, out byte b);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_LockTexture(IntPtr texture, ref SDL.SDL_Rect rect, out IntPtr pixels, out int pitch);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_LockTexture(IntPtr texture, IntPtr rect, out IntPtr pixels, out int pitch);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_QueryTexture(IntPtr texture, out uint format, out int access, out int w, out int h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderClear(IntPtr renderer);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderCopy(IntPtr renderer, IntPtr texture, ref SDL.SDL_Rect srcrect, ref SDL.SDL_Rect dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderCopy(IntPtr renderer, IntPtr texture, IntPtr srcrect, ref SDL.SDL_Rect dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderCopy(IntPtr renderer, IntPtr texture, ref SDL.SDL_Rect srcrect, IntPtr dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderCopy(IntPtr renderer, IntPtr texture, IntPtr srcrect, IntPtr dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderCopyEx(IntPtr renderer, IntPtr texture, ref SDL.SDL_Rect srcrect, ref SDL.SDL_Rect dstrect, double angle, ref SDL.SDL_Point center, SDL.SDL_RendererFlip flip);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderCopyEx(IntPtr renderer, IntPtr texture, IntPtr srcrect, ref SDL.SDL_Rect dstrect, double angle, ref SDL.SDL_Point center, SDL.SDL_RendererFlip flip);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderCopyEx(IntPtr renderer, IntPtr texture, ref SDL.SDL_Rect srcrect, IntPtr dstrect, double angle, ref SDL.SDL_Point center, SDL.SDL_RendererFlip flip);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderCopyEx(IntPtr renderer, IntPtr texture, ref SDL.SDL_Rect srcrect, ref SDL.SDL_Rect dstrect, double angle, IntPtr center, SDL.SDL_RendererFlip flip);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderCopyEx(IntPtr renderer, IntPtr texture, IntPtr srcrect, IntPtr dstrect, double angle, ref SDL.SDL_Point center, SDL.SDL_RendererFlip flip);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderCopyEx(IntPtr renderer, IntPtr texture, IntPtr srcrect, ref SDL.SDL_Rect dstrect, double angle, IntPtr center, SDL.SDL_RendererFlip flip);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderCopyEx(IntPtr renderer, IntPtr texture, ref SDL.SDL_Rect srcrect, IntPtr dstrect, double angle, IntPtr center, SDL.SDL_RendererFlip flip);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderCopyEx(IntPtr renderer, IntPtr texture, IntPtr srcrect, IntPtr dstrect, double angle, IntPtr center, SDL.SDL_RendererFlip flip);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderDrawLine(IntPtr renderer, int x1, int y1, int x2, int y2);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderDrawLines(IntPtr renderer, [In] SDL.SDL_Point[] points, int count);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderDrawPoint(IntPtr renderer, int x, int y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderDrawPoints(IntPtr renderer, [In] SDL.SDL_Point[] points, int count);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderDrawRect(IntPtr renderer, ref SDL.SDL_Rect rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderDrawRect(IntPtr renderer, IntPtr rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderDrawRects(IntPtr renderer, [In] SDL.SDL_Rect[] rects, int count);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderFillRect(IntPtr renderer, ref SDL.SDL_Rect rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderFillRect(IntPtr renderer, IntPtr rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderFillRects(IntPtr renderer, [In] SDL.SDL_Rect[] rects, int count);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_RenderGetClipRect(IntPtr renderer, out SDL.SDL_Rect rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_RenderGetLogicalSize(IntPtr renderer, out int w, out int h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_RenderGetScale(IntPtr renderer, out float scaleX, out float scaleY);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderGetViewport(IntPtr renderer, out SDL.SDL_Rect rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_RenderPresent(IntPtr renderer);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderReadPixels(IntPtr renderer, ref SDL.SDL_Rect rect, uint format, IntPtr pixels, int pitch);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderSetClipRect(IntPtr renderer, ref SDL.SDL_Rect rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderSetClipRect(IntPtr renderer, IntPtr rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderSetLogicalSize(IntPtr renderer, int w, int h);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderSetScale(IntPtr renderer, float scaleX, float scaleY);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderSetIntegerScale(IntPtr renderer, SDL.SDL_bool enable);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_RenderSetViewport(IntPtr renderer, ref SDL.SDL_Rect rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetRenderDrawBlendMode(IntPtr renderer, SDL.SDL_BlendMode blendMode);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetRenderDrawColor(IntPtr renderer, byte r, byte g, byte b, byte a);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetRenderTarget(IntPtr renderer, IntPtr texture);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetTextureAlphaMod(IntPtr texture, byte alpha);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetTextureBlendMode(IntPtr texture, SDL.SDL_BlendMode blendMode);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetTextureColorMod(IntPtr texture, byte r, byte g, byte b);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_UnlockTexture(IntPtr texture);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_UpdateTexture(IntPtr texture, ref SDL.SDL_Rect rect, IntPtr pixels, int pitch);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_UpdateTexture(IntPtr texture, IntPtr rect, IntPtr pixels, int pitch);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_UpdateYUVTexture(IntPtr texture, ref SDL.SDL_Rect rect, IntPtr yPlane, int yPitch, IntPtr uPlane, int uPitch, IntPtr vPlane, int vPitch);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_RenderTargetSupported(IntPtr renderer);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GetRenderTarget(IntPtr renderer);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_RenderIsClipEnabled(IntPtr renderer);

		public static uint SDL_DEFINE_PIXELFOURCC(byte A, byte B, byte C, byte D)
		{
			return SDL.SDL_FOURCC(A, B, C, D);
		}

		public static uint SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM type, SDL.SDL_PIXELORDER_ENUM order, SDL.SDL_PACKEDLAYOUT_ENUM layout, byte bits, byte bytes)
		{
			return (uint)(268435456 | (int)((byte)type) << 24 | (int)((byte)order) << 20 | (int)((byte)layout) << 16 | (int)bits << 8 | (int)bytes);
		}

		public static byte SDL_PIXELFLAG(uint X)
		{
			return (byte)(X >> 28 & 15u);
		}

		public static byte SDL_PIXELTYPE(uint X)
		{
			return (byte)(X >> 24 & 15u);
		}

		public static byte SDL_PIXELORDER(uint X)
		{
			return (byte)(X >> 20 & 15u);
		}

		public static byte SDL_PIXELLAYOUT(uint X)
		{
			return (byte)(X >> 16 & 15u);
		}

		public static byte SDL_BITSPERPIXEL(uint X)
		{
			return (byte)(X >> 8 & 255u);
		}

		public static byte SDL_BYTESPERPIXEL(uint X)
		{
			if (!SDL.SDL_ISPIXELFORMAT_FOURCC(X))
			{
				return (byte)(X & 255u);
			}
			if (X == SDL.SDL_PIXELFORMAT_YUY2 || X == SDL.SDL_PIXELFORMAT_UYVY || X == SDL.SDL_PIXELFORMAT_YVYU)
			{
				return 2;
			}
			return 1;
		}

		public static bool SDL_ISPIXELFORMAT_INDEXED(uint format)
		{
			if (SDL.SDL_ISPIXELFORMAT_FOURCC(format))
			{
				return false;
			}
			SDL.SDL_PIXELTYPE_ENUM sdl_PIXELTYPE_ENUM = (SDL.SDL_PIXELTYPE_ENUM)SDL.SDL_PIXELTYPE(format);
			return sdl_PIXELTYPE_ENUM == SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX1 || sdl_PIXELTYPE_ENUM == SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX4 || sdl_PIXELTYPE_ENUM == SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX8;
		}

		public static bool SDL_ISPIXELFORMAT_ALPHA(uint format)
		{
			if (SDL.SDL_ISPIXELFORMAT_FOURCC(format))
			{
				return false;
			}
			SDL.SDL_PIXELORDER_ENUM sdl_PIXELORDER_ENUM = (SDL.SDL_PIXELORDER_ENUM)SDL.SDL_PIXELORDER(format);
			return sdl_PIXELORDER_ENUM == SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB || sdl_PIXELORDER_ENUM == SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBA || sdl_PIXELORDER_ENUM == SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ABGR || sdl_PIXELORDER_ENUM == SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRA;
		}

		public static bool SDL_ISPIXELFORMAT_FOURCC(uint format)
		{
			return format == 0u && SDL.SDL_PIXELFLAG(format) != 1;
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_AllocFormat(uint pixel_format);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_AllocPalette(int ncolors);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_CalculateGammaRamp(float gamma, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U2, SizeConst = 256)] [Out] ushort[] ramp);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_FreeFormat(IntPtr format);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_FreePalette(IntPtr palette);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetPixelFormatName")]
		private static extern IntPtr INTERNAL_SDL_GetPixelFormatName(uint format);

		public static string SDL_GetPixelFormatName(uint format)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetPixelFormatName(format), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GetRGB(uint pixel, IntPtr format, out byte r, out byte g, out byte b);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GetRGBA(uint pixel, IntPtr format, out byte r, out byte g, out byte b, out byte a);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_MapRGB(IntPtr format, byte r, byte g, byte b);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_MapRGBA(IntPtr format, byte r, byte g, byte b, byte a);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_MasksToPixelFormatEnum(int bpp, uint Rmask, uint Gmask, uint Bmask, uint Amask);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_PixelFormatEnumToMasks(uint format, out int bpp, out uint Rmask, out uint Gmask, out uint Bmask, out uint Amask);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetPaletteColors(IntPtr palette, [In] SDL.SDL_Color[] colors, int firstcolor, int ncolors);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetPixelFormatPalette(IntPtr format, IntPtr palette);

		public static SDL.SDL_bool SDL_PointInRect(ref SDL.SDL_Point p, ref SDL.SDL_Rect r)
		{
			if (p.x < r.x || p.x >= r.x + r.w || p.y < r.y || p.y >= r.y + r.h)
			{
				return SDL.SDL_bool.SDL_FALSE;
			}
			return SDL.SDL_bool.SDL_TRUE;
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_EnclosePoints([In] SDL.SDL_Point[] points, int count, ref SDL.SDL_Rect clip, out SDL.SDL_Rect result);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_HasIntersection(ref SDL.SDL_Rect A, ref SDL.SDL_Rect B);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_IntersectRect(ref SDL.SDL_Rect A, ref SDL.SDL_Rect B, out SDL.SDL_Rect result);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_IntersectRectAndLine(ref SDL.SDL_Rect rect, ref int X1, ref int Y1, ref int X2, ref int Y2);

		public static SDL.SDL_bool SDL_RectEmpty(ref SDL.SDL_Rect r)
		{
			if (r.w > 0 && r.h > 0)
			{
				return SDL.SDL_bool.SDL_FALSE;
			}
			return SDL.SDL_bool.SDL_TRUE;
		}

		public static SDL.SDL_bool SDL_RectEquals(ref SDL.SDL_Rect a, ref SDL.SDL_Rect b)
		{
			if (a.x != b.x || a.y != b.y || a.w != b.w || a.h != b.h)
			{
				return SDL.SDL_bool.SDL_FALSE;
			}
			return SDL.SDL_bool.SDL_TRUE;
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_UnionRect(ref SDL.SDL_Rect A, ref SDL.SDL_Rect B, out SDL.SDL_Rect result);

		public static bool SDL_MUSTLOCK(IntPtr surface)
		{
			return (((SDL.SDL_Surface)Marshal.PtrToStructure(surface, typeof(SDL.SDL_Surface))).flags & 2u) > 0u;
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_UpperBlit")]
		public static extern int SDL_BlitSurface(IntPtr src, ref SDL.SDL_Rect srcrect, IntPtr dst, ref SDL.SDL_Rect dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_UpperBlit")]
		public static extern int SDL_BlitSurface(IntPtr src, IntPtr srcrect, IntPtr dst, ref SDL.SDL_Rect dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_UpperBlit")]
		public static extern int SDL_BlitSurface(IntPtr src, ref SDL.SDL_Rect srcrect, IntPtr dst, IntPtr dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_UpperBlit")]
		public static extern int SDL_BlitSurface(IntPtr src, IntPtr srcrect, IntPtr dst, IntPtr dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_UpperBlitScaled")]
		public static extern int SDL_BlitScaled(IntPtr src, ref SDL.SDL_Rect srcrect, IntPtr dst, ref SDL.SDL_Rect dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_UpperBlitScaled")]
		public static extern int SDL_BlitScaled(IntPtr src, IntPtr srcrect, IntPtr dst, ref SDL.SDL_Rect dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_UpperBlitScaled")]
		public static extern int SDL_BlitScaled(IntPtr src, ref SDL.SDL_Rect srcrect, IntPtr dst, IntPtr dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_UpperBlitScaled")]
		public static extern int SDL_BlitScaled(IntPtr src, IntPtr srcrect, IntPtr dst, IntPtr dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_ConvertPixels(int width, int height, uint src_format, IntPtr src, int src_pitch, uint dst_format, IntPtr dst, int dst_pitch);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_ConvertSurface(IntPtr src, IntPtr fmt, uint flags);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_ConvertSurfaceFormat(IntPtr src, uint pixel_format, uint flags);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_CreateRGBSurface(uint flags, int width, int height, int depth, uint Rmask, uint Gmask, uint Bmask, uint Amask);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_CreateRGBSurfaceFrom(IntPtr pixels, int width, int height, int depth, int pitch, uint Rmask, uint Gmask, uint Bmask, uint Amask);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_CreateRGBSurfaceWithFormat(uint flags, int width, int height, int depth, uint format);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_CreateRGBSurfaceWithFormatFrom(IntPtr pixels, int width, int height, int depth, int pitch, uint format);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_FillRect(IntPtr dst, ref SDL.SDL_Rect rect, uint color);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_FillRect(IntPtr dst, IntPtr rect, uint color);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_FillRects(IntPtr dst, [In] SDL.SDL_Rect[] rects, int count, uint color);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_FreeSurface(IntPtr surface);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GetClipRect(IntPtr surface, out SDL.SDL_Rect rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_HasColorKey(IntPtr surface);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetColorKey(IntPtr surface, out uint key);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetSurfaceAlphaMod(IntPtr surface, out byte alpha);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetSurfaceBlendMode(IntPtr surface, out SDL.SDL_BlendMode blendMode);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetSurfaceColorMod(IntPtr surface, out byte r, out byte g, out byte b);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_LoadBMP_RW")]
		private static extern IntPtr INTERNAL_SDL_LoadBMP_RW(IntPtr src, int freesrc);

		public static IntPtr SDL_LoadBMP(string file)
		{
			return SDL.INTERNAL_SDL_LoadBMP_RW(SDL.INTERNAL_SDL_RWFromFile(file, "rb"), 1);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_LockSurface(IntPtr surface);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_LowerBlit(IntPtr src, ref SDL.SDL_Rect srcrect, IntPtr dst, ref SDL.SDL_Rect dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_LowerBlitScaled(IntPtr src, ref SDL.SDL_Rect srcrect, IntPtr dst, ref SDL.SDL_Rect dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_SaveBMP_RW")]
		private static extern int INTERNAL_SDL_SaveBMP_RW(IntPtr surface, IntPtr src, int freesrc);

		public static int SDL_SaveBMP(IntPtr surface, string file)
		{
			IntPtr src = SDL.INTERNAL_SDL_RWFromFile(file, "wb");
			return SDL.INTERNAL_SDL_SaveBMP_RW(surface, src, 1);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_SetClipRect(IntPtr surface, ref SDL.SDL_Rect rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetColorKey(IntPtr surface, int flag, uint key);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetSurfaceAlphaMod(IntPtr surface, byte alpha);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetSurfaceBlendMode(IntPtr surface, SDL.SDL_BlendMode blendMode);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetSurfaceColorMod(IntPtr surface, byte r, byte g, byte b);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetSurfacePalette(IntPtr surface, IntPtr palette);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetSurfaceRLE(IntPtr surface, int flag);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SoftStretch(IntPtr src, ref SDL.SDL_Rect srcrect, IntPtr dst, ref SDL.SDL_Rect dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_UnlockSurface(IntPtr surface);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_UpperBlit(IntPtr src, ref SDL.SDL_Rect srcrect, IntPtr dst, ref SDL.SDL_Rect dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_UpperBlitScaled(IntPtr src, ref SDL.SDL_Rect srcrect, IntPtr dst, ref SDL.SDL_Rect dstrect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_DuplicateSurface(IntPtr surface);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_HasClipboardText();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetClipboardText")]
		private static extern IntPtr INTERNAL_SDL_GetClipboardText();

		public static string SDL_GetClipboardText()
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetClipboardText(), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_SetClipboardText")]
		private static extern int INTERNAL_SDL_SetClipboardText(byte[] text);

		public static int SDL_SetClipboardText(string text)
		{
			return SDL.INTERNAL_SDL_SetClipboardText(SDL.UTF8_ToNative(text));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_PumpEvents();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_PeepEvents([Out] SDL.SDL_Event[] events, int numevents, SDL.SDL_eventaction action, SDL.SDL_EventType minType, SDL.SDL_EventType maxType);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_HasEvent(SDL.SDL_EventType type);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_HasEvents(SDL.SDL_EventType minType, SDL.SDL_EventType maxType);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_FlushEvent(SDL.SDL_EventType type);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_FlushEvents(SDL.SDL_EventType min, SDL.SDL_EventType max);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_PollEvent(out SDL.SDL_Event _event);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_WaitEvent(out SDL.SDL_Event _event);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_WaitEventTimeout(out SDL.SDL_Event _event, int timeout);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_PushEvent(ref SDL.SDL_Event _event);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetEventFilter(SDL.SDL_EventFilter filter, IntPtr userdata);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		private static extern SDL.SDL_bool SDL_GetEventFilter(out IntPtr filter, out IntPtr userdata);

		public static SDL.SDL_bool SDL_GetEventFilter(out SDL.SDL_EventFilter filter, out IntPtr userdata)
		{
			IntPtr zero = IntPtr.Zero;
			SDL.SDL_bool result = SDL.SDL_GetEventFilter(out zero, out userdata);
			if (zero != IntPtr.Zero)
			{
				filter = (SDL.SDL_EventFilter)Marshal.GetDelegateForFunctionPointer(zero, typeof(SDL.SDL_EventFilter));
				return result;
			}
			filter = null;
			return result;
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_AddEventWatch(SDL.SDL_EventFilter filter, IntPtr userdata);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_DelEventWatch(SDL.SDL_EventFilter filter, IntPtr userdata);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_FilterEvents(SDL.SDL_EventFilter filter, IntPtr userdata);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern byte SDL_EventState(SDL.SDL_EventType type, int state);

		public static byte SDL_GetEventState(SDL.SDL_EventType type)
		{
			return SDL.SDL_EventState(type, -1);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_RegisterEvents(int numevents);

		public static SDL.SDL_Keycode SDL_SCANCODE_TO_KEYCODE(SDL.SDL_Scancode X)
		{
			return (SDL.SDL_Keycode)(X | (SDL.SDL_Scancode)1073741824);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GetKeyboardFocus();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GetKeyboardState(out int numkeys);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_Keymod SDL_GetModState();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetModState(SDL.SDL_Keymod modstate);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_Keycode SDL_GetKeyFromScancode(SDL.SDL_Scancode scancode);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_Scancode SDL_GetScancodeFromKey(SDL.SDL_Keycode key);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetScancodeName")]
		private static extern IntPtr INTERNAL_SDL_GetScancodeName(SDL.SDL_Scancode scancode);

		public static string SDL_GetScancodeName(SDL.SDL_Scancode scancode)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetScancodeName(scancode), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetScancodeFromName")]
		private static extern SDL.SDL_Scancode INTERNAL_SDL_GetScancodeFromName(byte[] name);

		public static SDL.SDL_Scancode SDL_GetScancodeFromName(string name)
		{
			return SDL.INTERNAL_SDL_GetScancodeFromName(SDL.UTF8_ToNative(name));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetKeyName")]
		private static extern IntPtr INTERNAL_SDL_GetKeyName(SDL.SDL_Keycode key);

		public static string SDL_GetKeyName(SDL.SDL_Keycode key)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetKeyName(key), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetKeyFromName")]
		private static extern SDL.SDL_Keycode INTERNAL_SDL_GetKeyFromName(byte[] name);

		public static SDL.SDL_Keycode SDL_GetKeyFromName(string name)
		{
			return SDL.INTERNAL_SDL_GetKeyFromName(SDL.UTF8_ToNative(name));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_StartTextInput();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_IsTextInputActive();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_StopTextInput();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetTextInputRect(ref SDL.SDL_Rect rect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_HasScreenKeyboardSupport();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_IsScreenKeyboardShown(IntPtr window);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GetMouseFocus();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetMouseState(out int x, out int y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetMouseState(IntPtr x, out int y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetMouseState(out int x, IntPtr y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetMouseState(IntPtr x, IntPtr y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetGlobalMouseState(out int x, out int y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetGlobalMouseState(IntPtr x, out int y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetGlobalMouseState(out int x, IntPtr y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetGlobalMouseState(IntPtr x, IntPtr y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetRelativeMouseState(out int x, out int y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_WarpMouseInWindow(IntPtr window, int x, int y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_WarpMouseGlobal(int x, int y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SetRelativeMouseMode(SDL.SDL_bool enabled);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_CaptureMouse(SDL.SDL_bool enabled);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_GetRelativeMouseMode();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_CreateCursor(IntPtr data, IntPtr mask, int w, int h, int hot_x, int hot_y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_CreateColorCursor(IntPtr surface, int hot_x, int hot_y);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_CreateSystemCursor(SDL.SDL_SystemCursor id);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetCursor(IntPtr cursor);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GetCursor();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_FreeCursor(IntPtr cursor);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_ShowCursor(int toggle);

		public static uint SDL_BUTTON(uint X)
		{
			return 1u << (int)(X - 1u);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetNumTouchDevices();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern long SDL_GetTouchDevice(int index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetNumTouchFingers(long touchID);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GetTouchFinger(long touchID, int index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_JoystickRumble(IntPtr joystick, ushort low_frequency_rumble, ushort high_frequency_rumble, uint duration_ms);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_JoystickClose(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_JoystickEventState(int state);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern short SDL_JoystickGetAxis(IntPtr joystick, int axis);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_JoystickGetAxisInitialState(IntPtr joystick, int axis, out ushort state);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_JoystickGetBall(IntPtr joystick, int ball, out int dx, out int dy);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern byte SDL_JoystickGetButton(IntPtr joystick, int button);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern byte SDL_JoystickGetHat(IntPtr joystick, int hat);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_JoystickName")]
		private static extern IntPtr INTERNAL_SDL_JoystickName(IntPtr joystick);

		public static string SDL_JoystickName(IntPtr joystick)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_JoystickName(joystick), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_JoystickNameForIndex")]
		private static extern IntPtr INTERNAL_SDL_JoystickNameForIndex(int device_index);

		public static string SDL_JoystickNameForIndex(int device_index)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_JoystickNameForIndex(device_index), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_JoystickNumAxes(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_JoystickNumBalls(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_JoystickNumButtons(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_JoystickNumHats(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_JoystickOpen(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_JoystickUpdate();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_NumJoysticks();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern Guid SDL_JoystickGetDeviceGUID(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern Guid SDL_JoystickGetGUID(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_JoystickGetGUIDString(Guid guid, byte[] pszGUID, int cbGUID);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_JoystickGetGUIDFromString")]
		private static extern Guid INTERNAL_SDL_JoystickGetGUIDFromString(byte[] pchGUID);

		public static Guid SDL_JoystickGetGUIDFromString(string pchGuid)
		{
			return SDL.INTERNAL_SDL_JoystickGetGUIDFromString(SDL.UTF8_ToNative(pchGuid));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern ushort SDL_JoystickGetDeviceVendor(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern ushort SDL_JoystickGetDeviceProduct(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern ushort SDL_JoystickGetDeviceProductVersion(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_JoystickType SDL_JoystickGetDeviceType(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_JoystickGetDeviceInstanceID(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern ushort SDL_JoystickGetVendor(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern ushort SDL_JoystickGetProduct(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern ushort SDL_JoystickGetProductVersion(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_JoystickType SDL_JoystickGetType(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_JoystickGetAttached(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_JoystickInstanceID(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_JoystickPowerLevel SDL_JoystickCurrentPowerLevel(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_JoystickFromInstanceID(int joyid);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_LockJoysticks();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_UnlockJoysticks();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerAddMapping")]
		private static extern int INTERNAL_SDL_GameControllerAddMapping(byte[] mappingString);

		public static int SDL_GameControllerAddMapping(string mappingString)
		{
			return SDL.INTERNAL_SDL_GameControllerAddMapping(SDL.UTF8_ToNative(mappingString));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GameControllerNumMappings();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerMappingForIndex")]
		private static extern IntPtr INTERNAL_SDL_GameControllerMappingForIndex(int mapping_index);

		public static string SDL_GameControllerMappingForIndex(int mapping_index)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GameControllerMappingForIndex(mapping_index), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerAddMappingsFromRW")]
		private static extern int INTERNAL_SDL_GameControllerAddMappingsFromRW(IntPtr rw, int freerw);

		public static int SDL_GameControllerAddMappingsFromFile(string file)
		{
			return SDL.INTERNAL_SDL_GameControllerAddMappingsFromRW(SDL.INTERNAL_SDL_RWFromFile(file, "rb"), 1);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerMappingForGUID")]
		private static extern IntPtr INTERNAL_SDL_GameControllerMappingForGUID(Guid guid);

		public static string SDL_GameControllerMappingForGUID(Guid guid)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GameControllerMappingForGUID(guid), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerMapping")]
		private static extern IntPtr INTERNAL_SDL_GameControllerMapping(IntPtr gamecontroller);

		public static string SDL_GameControllerMapping(IntPtr gamecontroller)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GameControllerMapping(gamecontroller), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_IsGameController(int joystick_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerNameForIndex")]
		private static extern IntPtr INTERNAL_SDL_GameControllerNameForIndex(int joystick_index);

		public static string SDL_GameControllerNameForIndex(int joystick_index)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GameControllerNameForIndex(joystick_index), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerMappingForDeviceIndex")]
		private static extern IntPtr INTERNAL_SDL_GameControllerMappingForDeviceIndex(int joystick_index);

		public static string SDL_GameControllerMappingForDeviceIndex(int joystick_index)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GameControllerMappingForDeviceIndex(joystick_index), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GameControllerOpen(int joystick_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerName")]
		private static extern IntPtr INTERNAL_SDL_GameControllerName(IntPtr gamecontroller);

		public static string SDL_GameControllerName(IntPtr gamecontroller)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GameControllerName(gamecontroller), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern ushort SDL_GameControllerGetVendor(IntPtr gamecontroller);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern ushort SDL_GameControllerGetProduct(IntPtr gamecontroller);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern ushort SDL_GameControllerGetProductVersion(IntPtr gamecontroller);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_GameControllerGetAttached(IntPtr gamecontroller);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GameControllerGetJoystick(IntPtr gamecontroller);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GameControllerEventState(int state);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GameControllerUpdate();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerGetAxisFromString")]
		private static extern SDL.SDL_GameControllerAxis INTERNAL_SDL_GameControllerGetAxisFromString(byte[] pchString);

		public static SDL.SDL_GameControllerAxis SDL_GameControllerGetAxisFromString(string pchString)
		{
			return SDL.INTERNAL_SDL_GameControllerGetAxisFromString(SDL.UTF8_ToNative(pchString));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerGetStringForAxis")]
		private static extern IntPtr INTERNAL_SDL_GameControllerGetStringForAxis(SDL.SDL_GameControllerAxis axis);

		public static string SDL_GameControllerGetStringForAxis(SDL.SDL_GameControllerAxis axis)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GameControllerGetStringForAxis(axis), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerGetBindForAxis")]
		private static extern SDL.INTERNAL_SDL_GameControllerButtonBind INTERNAL_SDL_GameControllerGetBindForAxis(IntPtr gamecontroller, SDL.SDL_GameControllerAxis axis);

		public static SDL.SDL_GameControllerButtonBind SDL_GameControllerGetBindForAxis(IntPtr gamecontroller, SDL.SDL_GameControllerAxis axis)
		{
			SDL.INTERNAL_SDL_GameControllerButtonBind internal_SDL_GameControllerButtonBind = SDL.INTERNAL_SDL_GameControllerGetBindForAxis(gamecontroller, axis);
			SDL.SDL_GameControllerButtonBind result = default(SDL.SDL_GameControllerButtonBind);
			result.bindType = (SDL.SDL_GameControllerBindType)internal_SDL_GameControllerButtonBind.bindType;
			result.value.hat.hat = internal_SDL_GameControllerButtonBind.unionVal0;
			result.value.hat.hat_mask = internal_SDL_GameControllerButtonBind.unionVal1;
			return result;
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern short SDL_GameControllerGetAxis(IntPtr gamecontroller, SDL.SDL_GameControllerAxis axis);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerGetButtonFromString")]
		private static extern SDL.SDL_GameControllerButton INTERNAL_SDL_GameControllerGetButtonFromString(byte[] pchString);

		public static SDL.SDL_GameControllerButton SDL_GameControllerGetButtonFromString(string pchString)
		{
			return SDL.INTERNAL_SDL_GameControllerGetButtonFromString(SDL.UTF8_ToNative(pchString));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerGetStringForButton")]
		private static extern IntPtr INTERNAL_SDL_GameControllerGetStringForButton(SDL.SDL_GameControllerButton button);

		public static string SDL_GameControllerGetStringForButton(SDL.SDL_GameControllerButton button)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GameControllerGetStringForButton(button), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GameControllerGetBindForButton")]
		private static extern SDL.INTERNAL_SDL_GameControllerButtonBind INTERNAL_SDL_GameControllerGetBindForButton(IntPtr gamecontroller, SDL.SDL_GameControllerButton button);

		public static SDL.SDL_GameControllerButtonBind SDL_GameControllerGetBindForButton(IntPtr gamecontroller, SDL.SDL_GameControllerButton button)
		{
			SDL.INTERNAL_SDL_GameControllerButtonBind internal_SDL_GameControllerButtonBind = SDL.INTERNAL_SDL_GameControllerGetBindForButton(gamecontroller, button);
			SDL.SDL_GameControllerButtonBind result = default(SDL.SDL_GameControllerButtonBind);
			result.bindType = (SDL.SDL_GameControllerBindType)internal_SDL_GameControllerButtonBind.bindType;
			result.value.hat.hat = internal_SDL_GameControllerButtonBind.unionVal0;
			result.value.hat.hat_mask = internal_SDL_GameControllerButtonBind.unionVal1;
			return result;
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern byte SDL_GameControllerGetButton(IntPtr gamecontroller, SDL.SDL_GameControllerButton button);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GameControllerRumble(IntPtr gamecontroller, ushort low_frequency_rumble, ushort high_frequency_rumble, uint duration_ms);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_GameControllerClose(IntPtr gamecontroller);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_GameControllerFromInstanceID(int joyid);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_HapticClose(IntPtr haptic);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_HapticDestroyEffect(IntPtr haptic, int effect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticEffectSupported(IntPtr haptic, ref SDL.SDL_HapticEffect effect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticGetEffectStatus(IntPtr haptic, int effect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticIndex(IntPtr haptic);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_HapticName")]
		private static extern IntPtr INTERNAL_SDL_HapticName(int device_index);

		public static string SDL_HapticName(int device_index)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_HapticName(device_index), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticNewEffect(IntPtr haptic, ref SDL.SDL_HapticEffect effect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticNumAxes(IntPtr haptic);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticNumEffects(IntPtr haptic);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticNumEffectsPlaying(IntPtr haptic);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_HapticOpen(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticOpened(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_HapticOpenFromJoystick(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_HapticOpenFromMouse();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticPause(IntPtr haptic);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_HapticQuery(IntPtr haptic);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticRumbleInit(IntPtr haptic);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticRumblePlay(IntPtr haptic, float strength, uint length);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticRumbleStop(IntPtr haptic);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticRumbleSupported(IntPtr haptic);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticRunEffect(IntPtr haptic, int effect, uint iterations);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticSetAutocenter(IntPtr haptic, int autocenter);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticSetGain(IntPtr haptic, int gain);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticStopAll(IntPtr haptic);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticStopEffect(IntPtr haptic, int effect);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticUnpause(IntPtr haptic);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_HapticUpdateEffect(IntPtr haptic, int effect, ref SDL.SDL_HapticEffect data);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_JoystickIsHaptic(IntPtr joystick);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_MouseIsHaptic();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_NumHaptics();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_NumSensors();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_SensorGetDeviceName")]
		private static extern IntPtr INTERNAL_SDL_SensorGetDeviceName(int device_index);

		public static string SDL_SensorGetDeviceName(int device_index)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_SensorGetDeviceName(device_index), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_SensorType SDL_SensorGetDeviceType(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SensorGetDeviceNonPortableType(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SensorGetDeviceInstanceID(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_SensorOpen(int device_index);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_SensorFromInstanceID(int instance_id);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_SensorGetName")]
		private static extern IntPtr INTERNAL_SDL_SensorGetName(IntPtr sensor);

		public static string SDL_SensorGetName(IntPtr sensor)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_SensorGetName(sensor), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_SensorType SDL_SensorGetType(IntPtr sensor);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SensorGetNonPortableType(IntPtr sensor);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SensorGetInstanceID(IntPtr sensor);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_SensorGetData(IntPtr sensor, float[] data, int num_values);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SensorClose(IntPtr sensor);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SensorUpdate();

		public static ushort SDL_AUDIO_BITSIZE(ushort x)
		{
			return x & 255;
		}

		public static bool SDL_AUDIO_ISFLOAT(ushort x)
		{
			return (x & 256) > 0;
		}

		public static bool SDL_AUDIO_ISBIGENDIAN(ushort x)
		{
			return (x & 4096) > 0;
		}

		public static bool SDL_AUDIO_ISSIGNED(ushort x)
		{
			return (x & 32768) > 0;
		}

		public static bool SDL_AUDIO_ISINT(ushort x)
		{
			return (x & 256) == 0;
		}

		public static bool SDL_AUDIO_ISLITTLEENDIAN(ushort x)
		{
			return (x & 4096) == 0;
		}

		public static bool SDL_AUDIO_ISUNSIGNED(ushort x)
		{
			return (x & 32768) == 0;
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_AudioInit")]
		private static extern int INTERNAL_SDL_AudioInit(byte[] driver_name);

		public static int SDL_AudioInit(string driver_name)
		{
			return SDL.INTERNAL_SDL_AudioInit(SDL.UTF8_ToNative(driver_name));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_AudioQuit();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_CloseAudio();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_CloseAudioDevice(uint dev);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_FreeWAV(IntPtr audio_buf);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAudioDeviceName")]
		private static extern IntPtr INTERNAL_SDL_GetAudioDeviceName(int index, int iscapture);

		public static string SDL_GetAudioDeviceName(int index, int iscapture)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetAudioDeviceName(index, iscapture), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_AudioStatus SDL_GetAudioDeviceStatus(uint dev);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAudioDriver")]
		private static extern IntPtr INTERNAL_SDL_GetAudioDriver(int index);

		public static string SDL_GetAudioDriver(int index)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetAudioDriver(index), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_AudioStatus SDL_GetAudioStatus();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetCurrentAudioDriver")]
		private static extern IntPtr INTERNAL_SDL_GetCurrentAudioDriver();

		public static string SDL_GetCurrentAudioDriver()
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetCurrentAudioDriver(), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetNumAudioDevices(int iscapture);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetNumAudioDrivers();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_LoadWAV_RW")]
		private static extern IntPtr INTERNAL_SDL_LoadWAV_RW(IntPtr src, int freesrc, ref SDL.SDL_AudioSpec spec, out IntPtr audio_buf, out uint audio_len);

		public static SDL.SDL_AudioSpec SDL_LoadWAV(string file, ref SDL.SDL_AudioSpec spec, out IntPtr audio_buf, out uint audio_len)
		{
			return (SDL.SDL_AudioSpec)Marshal.PtrToStructure(SDL.INTERNAL_SDL_LoadWAV_RW(SDL.INTERNAL_SDL_RWFromFile(file, "rb"), 1, ref spec, out audio_buf, out audio_len), typeof(SDL.SDL_AudioSpec));
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_LockAudio();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_LockAudioDevice(uint dev);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_MixAudio([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U1, SizeParamIndex = 2)] [Out] byte[] dst, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U1, SizeParamIndex = 2)] [In] byte[] src, uint len, int volume);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_MixAudioFormat([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U1, SizeParamIndex = 3)] [Out] byte[] dst, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U1, SizeParamIndex = 3)] [In] byte[] src, ushort format, uint len, int volume);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_OpenAudio(ref SDL.SDL_AudioSpec desired, out SDL.SDL_AudioSpec obtained);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_OpenAudio(ref SDL.SDL_AudioSpec desired, IntPtr obtained);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_OpenAudioDevice")]
		private static extern uint INTERNAL_SDL_OpenAudioDevice(byte[] device, int iscapture, ref SDL.SDL_AudioSpec desired, out SDL.SDL_AudioSpec obtained, int allowed_changes);

		public static uint SDL_OpenAudioDevice(string device, int iscapture, ref SDL.SDL_AudioSpec desired, out SDL.SDL_AudioSpec obtained, int allowed_changes)
		{
			return SDL.INTERNAL_SDL_OpenAudioDevice(SDL.UTF8_ToNative(device), iscapture, ref desired, out obtained, allowed_changes);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_PauseAudio(int pause_on);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_PauseAudioDevice(uint dev, int pause_on);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_UnlockAudio();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_UnlockAudioDevice(uint dev);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_QueueAudio(uint dev, IntPtr data, uint len);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_DequeueAudio(uint dev, IntPtr data, uint len);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetQueuedAudioSize(uint dev);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_ClearQueuedAudio(uint dev);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_NewAudioStream(ushort src_format, byte src_channels, int src_rate, ushort dst_format, byte dst_channels, int dst_rate);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_AudioStreamPut(IntPtr stream, IntPtr buf, int len);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_AudioStreamGet(IntPtr stream, IntPtr buf, int len);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_AudioStreamAvailable(IntPtr stream);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_AudioStreamClear(IntPtr stream);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_FreeAudioStream(IntPtr stream);

		public static bool SDL_TICKS_PASSED(uint A, uint B)
		{
			return B - A <= 0u;
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_Delay(uint ms);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern uint SDL_GetTicks();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern ulong SDL_GetPerformanceCounter();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern ulong SDL_GetPerformanceFrequency();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_AddTimer(uint interval, SDL.SDL_TimerCallback callback, IntPtr param);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_RemoveTimer(int id);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_SetWindowsMessageHook(SDL.SDL_WindowsMessageHook callback, IntPtr userdata);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_iPhoneSetAnimationCallback(IntPtr window, int interval, SDL.SDL_iPhoneAnimationCallback callback, IntPtr callbackParam);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_iPhoneSetEventPump(SDL.SDL_bool enabled);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_AndroidGetJNIEnv();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr SDL_AndroidGetActivity();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_IsAndroidTV();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_IsChromebook();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_IsDeXMode();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern void SDL_AndroidBackButton();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_AndroidGetInternalStoragePath")]
		private static extern IntPtr INTERNAL_SDL_AndroidGetInternalStoragePath();

		public static string SDL_AndroidGetInternalStoragePath()
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_AndroidGetInternalStoragePath(), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_AndroidGetExternalStorageState();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		private static extern IntPtr INTERNAL_SDL_AndroidGetExternalStoragePath();

		public static string SDL_AndroidGetExternalStoragePath()
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_AndroidGetExternalStoragePath(), false);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_WinRT_DeviceFamily SDL_WinRTGetDeviceFamily();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_IsTablet();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_bool SDL_GetWindowWMInfo(IntPtr window, ref SDL.SDL_SysWMinfo info);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetBasePath")]
		private static extern IntPtr INTERNAL_SDL_GetBasePath();

		public static string SDL_GetBasePath()
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetBasePath(), true);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetPrefPath")]
		private static extern IntPtr INTERNAL_SDL_GetPrefPath(byte[] org, byte[] app);

		public static string SDL_GetPrefPath(string org, string app)
		{
			return SDL.UTF8_ToManaged(SDL.INTERNAL_SDL_GetPrefPath(SDL.UTF8_ToNative(org), SDL.UTF8_ToNative(app)), true);
		}

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern SDL.SDL_PowerState SDL_GetPowerInfo(out int secs, out int pct);

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetCPUCount();

		[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
		public static extern int SDL_GetSystemRAM();

		private const string nativeLibName = "SDL2";

		public const uint SDL_INIT_TIMER = 1u;

		public const uint SDL_INIT_AUDIO = 16u;

		public const uint SDL_INIT_VIDEO = 32u;

		public const uint SDL_INIT_JOYSTICK = 512u;

		public const uint SDL_INIT_HAPTIC = 4096u;

		public const uint SDL_INIT_GAMECONTROLLER = 8192u;

		public const uint SDL_INIT_EVENTS = 16384u;

		public const uint SDL_INIT_SENSOR = 32768u;

		public const uint SDL_INIT_NOPARACHUTE = 1048576u;

		public const uint SDL_INIT_EVERYTHING = 62001u;

		public const string SDL_HINT_FRAMEBUFFER_ACCELERATION = "SDL_FRAMEBUFFER_ACCELERATION";

		public const string SDL_HINT_RENDER_DRIVER = "SDL_RENDER_DRIVER";

		public const string SDL_HINT_RENDER_OPENGL_SHADERS = "SDL_RENDER_OPENGL_SHADERS";

		public const string SDL_HINT_RENDER_DIRECT3D_THREADSAFE = "SDL_RENDER_DIRECT3D_THREADSAFE";

		public const string SDL_HINT_RENDER_VSYNC = "SDL_RENDER_VSYNC";

		public const string SDL_HINT_VIDEO_X11_XVIDMODE = "SDL_VIDEO_X11_XVIDMODE";

		public const string SDL_HINT_VIDEO_X11_XINERAMA = "SDL_VIDEO_X11_XINERAMA";

		public const string SDL_HINT_VIDEO_X11_XRANDR = "SDL_VIDEO_X11_XRANDR";

		public const string SDL_HINT_GRAB_KEYBOARD = "SDL_GRAB_KEYBOARD";

		public const string SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS";

		public const string SDL_HINT_IDLE_TIMER_DISABLED = "SDL_IOS_IDLE_TIMER_DISABLED";

		public const string SDL_HINT_ORIENTATIONS = "SDL_IOS_ORIENTATIONS";

		public const string SDL_HINT_XINPUT_ENABLED = "SDL_XINPUT_ENABLED";

		public const string SDL_HINT_GAMECONTROLLERCONFIG = "SDL_GAMECONTROLLERCONFIG";

		public const string SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS = "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS";

		public const string SDL_HINT_ALLOW_TOPMOST = "SDL_ALLOW_TOPMOST";

		public const string SDL_HINT_TIMER_RESOLUTION = "SDL_TIMER_RESOLUTION";

		public const string SDL_HINT_RENDER_SCALE_QUALITY = "SDL_RENDER_SCALE_QUALITY";

		public const string SDL_HINT_VIDEO_HIGHDPI_DISABLED = "SDL_VIDEO_HIGHDPI_DISABLED";

		public const string SDL_HINT_CTRL_CLICK_EMULATE_RIGHT_CLICK = "SDL_CTRL_CLICK_EMULATE_RIGHT_CLICK";

		public const string SDL_HINT_VIDEO_WIN_D3DCOMPILER = "SDL_VIDEO_WIN_D3DCOMPILER";

		public const string SDL_HINT_MOUSE_RELATIVE_MODE_WARP = "SDL_MOUSE_RELATIVE_MODE_WARP";

		public const string SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT = "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT";

		public const string SDL_HINT_VIDEO_ALLOW_SCREENSAVER = "SDL_VIDEO_ALLOW_SCREENSAVER";

		public const string SDL_HINT_ACCELEROMETER_AS_JOYSTICK = "SDL_ACCELEROMETER_AS_JOYSTICK";

		public const string SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES = "SDL_VIDEO_MAC_FULLSCREEN_SPACES";

		public const string SDL_HINT_WINRT_PRIVACY_POLICY_URL = "SDL_WINRT_PRIVACY_POLICY_URL";

		public const string SDL_HINT_WINRT_PRIVACY_POLICY_LABEL = "SDL_WINRT_PRIVACY_POLICY_LABEL";

		public const string SDL_HINT_WINRT_HANDLE_BACK_BUTTON = "SDL_WINRT_HANDLE_BACK_BUTTON";

		public const string SDL_HINT_NO_SIGNAL_HANDLERS = "SDL_NO_SIGNAL_HANDLERS";

		public const string SDL_HINT_IME_INTERNAL_EDITING = "SDL_IME_INTERNAL_EDITING";

		public const string SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH = "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH";

		public const string SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT = "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT";

		public const string SDL_HINT_THREAD_STACK_SIZE = "SDL_THREAD_STACK_SIZE";

		public const string SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN = "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN";

		public const string SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP = "SDL_WINDOWS_ENABLE_MESSAGELOOP";

		public const string SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 = "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4";

		public const string SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING = "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING";

		public const string SDL_HINT_MAC_BACKGROUND_APP = "SDL_MAC_BACKGROUND_APP";

		public const string SDL_HINT_VIDEO_X11_NET_WM_PING = "SDL_VIDEO_X11_NET_WM_PING";

		public const string SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION = "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION";

		public const string SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION = "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION";

		public const string SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH = "SDL_MOUSE_FOCUS_CLICKTHROUGH";

		public const string SDL_HINT_BMP_SAVE_LEGACY_FORMAT = "SDL_BMP_SAVE_LEGACY_FORMAT";

		public const string SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING = "SDL_WINDOWS_DISABLE_THREAD_NAMING";

		public const string SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION = "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION";

		public const string SDL_HINT_AUDIO_RESAMPLING_MODE = "SDL_AUDIO_RESAMPLING_MODE";

		public const string SDL_HINT_RENDER_LOGICAL_SIZE_MODE = "SDL_RENDER_LOGICAL_SIZE_MODE";

		public const string SDL_HINT_MOUSE_NORMAL_SPEED_SCALE = "SDL_MOUSE_NORMAL_SPEED_SCALE";

		public const string SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE = "SDL_MOUSE_RELATIVE_SPEED_SCALE";

		public const string SDL_HINT_TOUCH_MOUSE_EVENTS = "SDL_TOUCH_MOUSE_EVENTS";

		public const string SDL_HINT_WINDOWS_INTRESOURCE_ICON = "SDL_WINDOWS_INTRESOURCE_ICON";

		public const string SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL = "SDL_WINDOWS_INTRESOURCE_ICON_SMALL";

		public const string SDL_HINT_MOUSE_DOUBLE_CLICK_TIME = "SDL_MOUSE_DOUBLE_CLICK_TIME";

		public const string SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS = "SDL_MOUSE_DOUBLE_CLICK_RADIUS";

		public const string SDL_HINT_JOYSTICK_HIDAPI = "SDL_JOYSTICK_HIDAPI";

		public const string SDL_HINT_JOYSTICK_HIDAPI_PS4 = "SDL_JOYSTICK_HIDAPI_PS4";

		public const string SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE = "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE";

		public const string SDL_HINT_JOYSTICK_HIDAPI_STEAM = "SDL_JOYSTICK_HIDAPI_STEAM";

		public const string SDL_HINT_JOYSTICK_HIDAPI_SWITCH = "SDL_JOYSTICK_HIDAPI_SWITCH";

		public const string SDL_HINT_JOYSTICK_HIDAPI_XBOX = "SDL_JOYSTICK_HIDAPI_XBOX";

		public const string SDL_HINT_ENABLE_STEAM_CONTROLLERS = "SDL_ENABLE_STEAM_CONTROLLERS";

		public const string SDL_HINT_ANDROID_TRAP_BACK_BUTTON = "SDL_ANDROID_TRAP_BACK_BUTTON";

		public const int SDL_LOG_CATEGORY_APPLICATION = 0;

		public const int SDL_LOG_CATEGORY_ERROR = 1;

		public const int SDL_LOG_CATEGORY_ASSERT = 2;

		public const int SDL_LOG_CATEGORY_SYSTEM = 3;

		public const int SDL_LOG_CATEGORY_AUDIO = 4;

		public const int SDL_LOG_CATEGORY_VIDEO = 5;

		public const int SDL_LOG_CATEGORY_RENDER = 6;

		public const int SDL_LOG_CATEGORY_INPUT = 7;

		public const int SDL_LOG_CATEGORY_TEST = 8;

		public const int SDL_LOG_CATEGORY_RESERVED1 = 9;

		public const int SDL_LOG_CATEGORY_RESERVED2 = 10;

		public const int SDL_LOG_CATEGORY_RESERVED3 = 11;

		public const int SDL_LOG_CATEGORY_RESERVED4 = 12;

		public const int SDL_LOG_CATEGORY_RESERVED5 = 13;

		public const int SDL_LOG_CATEGORY_RESERVED6 = 14;

		public const int SDL_LOG_CATEGORY_RESERVED7 = 15;

		public const int SDL_LOG_CATEGORY_RESERVED8 = 16;

		public const int SDL_LOG_CATEGORY_RESERVED9 = 17;

		public const int SDL_LOG_CATEGORY_RESERVED10 = 18;

		public const int SDL_LOG_CATEGORY_CUSTOM = 19;

		public const int SDL_MAJOR_VERSION = 2;

		public const int SDL_MINOR_VERSION = 0;

		public const int SDL_PATCHLEVEL = 9;

		public static readonly int SDL_COMPILEDVERSION = SDL.SDL_VERSIONNUM(2, 0, 9);

		public const int SDL_WINDOWPOS_UNDEFINED_MASK = 536805376;

		public const int SDL_WINDOWPOS_CENTERED_MASK = 805240832;

		public const int SDL_WINDOWPOS_UNDEFINED = 536805376;

		public const int SDL_WINDOWPOS_CENTERED = 805240832;

		public static readonly uint SDL_PIXELFORMAT_UNKNOWN = 0u;

		public static readonly uint SDL_PIXELFORMAT_INDEX1LSB = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX1, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_NONE, 1, 0);

		public static readonly uint SDL_PIXELFORMAT_INDEX1MSB = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX1, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_1234, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_NONE, 1, 0);

		public static readonly uint SDL_PIXELFORMAT_INDEX4LSB = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX4, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_NONE, 4, 0);

		public static readonly uint SDL_PIXELFORMAT_INDEX4MSB = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX4, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_1234, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_NONE, 4, 0);

		public static readonly uint SDL_PIXELFORMAT_INDEX8 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX8, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_NONE, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_NONE, 8, 1);

		public static readonly uint SDL_PIXELFORMAT_RGB332 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED8, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_332, 8, 1);

		public static readonly uint SDL_PIXELFORMAT_RGB444 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444, 12, 2);

		public static readonly uint SDL_PIXELFORMAT_RGB555 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_1555, 15, 2);

		public static readonly uint SDL_PIXELFORMAT_BGR555 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX1, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_1555, 15, 2);

		public static readonly uint SDL_PIXELFORMAT_ARGB4444 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444, 16, 2);

		public static readonly uint SDL_PIXELFORMAT_RGBA4444 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBA, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444, 16, 2);

		public static readonly uint SDL_PIXELFORMAT_ABGR4444 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ABGR, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444, 16, 2);

		public static readonly uint SDL_PIXELFORMAT_BGRA4444 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRA, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444, 16, 2);

		public static readonly uint SDL_PIXELFORMAT_ARGB1555 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_1555, 16, 2);

		public static readonly uint SDL_PIXELFORMAT_RGBA5551 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBA, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_5551, 16, 2);

		public static readonly uint SDL_PIXELFORMAT_ABGR1555 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ABGR, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_1555, 16, 2);

		public static readonly uint SDL_PIXELFORMAT_BGRA5551 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRA, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_5551, 16, 2);

		public static readonly uint SDL_PIXELFORMAT_RGB565 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_565, 16, 2);

		public static readonly uint SDL_PIXELFORMAT_BGR565 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XBGR, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_565, 16, 2);

		public static readonly uint SDL_PIXELFORMAT_RGB24 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_ARRAYU8, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_NONE, 24, 3);

		public static readonly uint SDL_PIXELFORMAT_BGR24 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_ARRAYU8, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBA, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_NONE, 24, 3);

		public static readonly uint SDL_PIXELFORMAT_RGB888 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888, 24, 4);

		public static readonly uint SDL_PIXELFORMAT_RGBX8888 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32, SDL.SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_1234, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888, 24, 4);

		public static readonly uint SDL_PIXELFORMAT_BGR888 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XBGR, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888, 24, 4);

		public static readonly uint SDL_PIXELFORMAT_BGRX8888 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRX, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888, 24, 4);

		public static readonly uint SDL_PIXELFORMAT_ARGB8888 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888, 32, 4);

		public static readonly uint SDL_PIXELFORMAT_RGBA8888 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBA, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888, 32, 4);

		public static readonly uint SDL_PIXELFORMAT_ABGR8888 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ABGR, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888, 32, 4);

		public static readonly uint SDL_PIXELFORMAT_BGRA8888 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRA, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888, 32, 4);

		public static readonly uint SDL_PIXELFORMAT_ARGB2101010 = SDL.SDL_DEFINE_PIXELFORMAT(SDL.SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32, SDL.SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB, SDL.SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_2101010, 32, 4);

		public static readonly uint SDL_PIXELFORMAT_YV12 = SDL.SDL_DEFINE_PIXELFOURCC(89, 86, 49, 50);

		public static readonly uint SDL_PIXELFORMAT_IYUV = SDL.SDL_DEFINE_PIXELFOURCC(73, 89, 85, 86);

		public static readonly uint SDL_PIXELFORMAT_YUY2 = SDL.SDL_DEFINE_PIXELFOURCC(89, 85, 89, 50);

		public static readonly uint SDL_PIXELFORMAT_UYVY = SDL.SDL_DEFINE_PIXELFOURCC(85, 89, 86, 89);

		public static readonly uint SDL_PIXELFORMAT_YVYU = SDL.SDL_DEFINE_PIXELFOURCC(89, 86, 89, 85);

		public const uint SDL_SWSURFACE = 0u;

		public const uint SDL_PREALLOC = 1u;

		public const uint SDL_RLEACCEL = 2u;

		public const uint SDL_DONTFREE = 4u;

		public const byte SDL_PRESSED = 1;

		public const byte SDL_RELEASED = 0;

		public const int SDL_TEXTEDITINGEVENT_TEXT_SIZE = 32;

		public const int SDL_TEXTINPUTEVENT_TEXT_SIZE = 32;

		public const int SDL_QUERY = -1;

		public const int SDL_IGNORE = 0;

		public const int SDL_DISABLE = 0;

		public const int SDL_ENABLE = 1;

		public const int SDLK_SCANCODE_MASK = 1073741824;

		public const uint SDL_BUTTON_LEFT = 1u;

		public const uint SDL_BUTTON_MIDDLE = 2u;

		public const uint SDL_BUTTON_RIGHT = 3u;

		public const uint SDL_BUTTON_X1 = 4u;

		public const uint SDL_BUTTON_X2 = 5u;

		public static readonly uint SDL_BUTTON_LMASK = SDL.SDL_BUTTON(1u);

		public static readonly uint SDL_BUTTON_MMASK = SDL.SDL_BUTTON(2u);

		public static readonly uint SDL_BUTTON_RMASK = SDL.SDL_BUTTON(3u);

		public static readonly uint SDL_BUTTON_X1MASK = SDL.SDL_BUTTON(4u);

		public static readonly uint SDL_BUTTON_X2MASK = SDL.SDL_BUTTON(5u);

		public const uint SDL_TOUCH_MOUSEID = 4294967295u;

		public const byte SDL_HAT_CENTERED = 0;

		public const byte SDL_HAT_UP = 1;

		public const byte SDL_HAT_RIGHT = 2;

		public const byte SDL_HAT_DOWN = 4;

		public const byte SDL_HAT_LEFT = 8;

		public const byte SDL_HAT_RIGHTUP = 3;

		public const byte SDL_HAT_RIGHTDOWN = 6;

		public const byte SDL_HAT_LEFTUP = 9;

		public const byte SDL_HAT_LEFTDOWN = 12;

		public const ushort SDL_HAPTIC_CONSTANT = 1;

		public const ushort SDL_HAPTIC_SINE = 2;

		public const ushort SDL_HAPTIC_LEFTRIGHT = 4;

		public const ushort SDL_HAPTIC_TRIANGLE = 8;

		public const ushort SDL_HAPTIC_SAWTOOTHUP = 16;

		public const ushort SDL_HAPTIC_SAWTOOTHDOWN = 32;

		public const ushort SDL_HAPTIC_SPRING = 128;

		public const ushort SDL_HAPTIC_DAMPER = 256;

		public const ushort SDL_HAPTIC_INERTIA = 512;

		public const ushort SDL_HAPTIC_FRICTION = 1024;

		public const ushort SDL_HAPTIC_CUSTOM = 2048;

		public const ushort SDL_HAPTIC_GAIN = 4096;

		public const ushort SDL_HAPTIC_AUTOCENTER = 8192;

		public const ushort SDL_HAPTIC_STATUS = 16384;

		public const ushort SDL_HAPTIC_PAUSE = 32768;

		public const byte SDL_HAPTIC_POLAR = 0;

		public const byte SDL_HAPTIC_CARTESIAN = 1;

		public const byte SDL_HAPTIC_SPHERICAL = 2;

		public const uint SDL_HAPTIC_INFINITY = 4294967295u;

		public const float SDL_STANDARD_GRAVITY = 9.80665f;

		public const ushort SDL_AUDIO_MASK_BITSIZE = 255;

		public const ushort SDL_AUDIO_MASK_DATATYPE = 256;

		public const ushort SDL_AUDIO_MASK_ENDIAN = 4096;

		public const ushort SDL_AUDIO_MASK_SIGNED = 32768;

		public const ushort AUDIO_U8 = 8;

		public const ushort AUDIO_S8 = 32776;

		public const ushort AUDIO_U16LSB = 16;

		public const ushort AUDIO_S16LSB = 32784;

		public const ushort AUDIO_U16MSB = 4112;

		public const ushort AUDIO_S16MSB = 36880;

		public const ushort AUDIO_U16 = 16;

		public const ushort AUDIO_S16 = 32784;

		public const ushort AUDIO_S32LSB = 32800;

		public const ushort AUDIO_S32MSB = 36896;

		public const ushort AUDIO_S32 = 32800;

		public const ushort AUDIO_F32LSB = 33056;

		public const ushort AUDIO_F32MSB = 37152;

		public const ushort AUDIO_F32 = 33056;

		public static readonly ushort AUDIO_U16SYS = BitConverter.IsLittleEndian ? 16 : 4112;

		public static readonly ushort AUDIO_S16SYS = BitConverter.IsLittleEndian ? 32784 : 36880;

		public static readonly ushort AUDIO_S32SYS = BitConverter.IsLittleEndian ? 32800 : 36896;

		public static readonly ushort AUDIO_F32SYS = BitConverter.IsLittleEndian ? 33056 : 37152;

		public const uint SDL_AUDIO_ALLOW_FREQUENCY_CHANGE = 1u;

		public const uint SDL_AUDIO_ALLOW_FORMAT_CHANGE = 2u;

		public const uint SDL_AUDIO_ALLOW_CHANNELS_CHANGE = 4u;

		public const uint SDL_AUDIO_ALLOW_SAMPLES_CHANGE = 8u;

		public const uint SDL_AUDIO_ALLOW_ANY_CHANGE = 15u;

		public const int SDL_MIX_MAXVOLUME = 128;

		public const int SDL_ANDROID_EXTERNAL_STORAGE_READ = 1;

		public const int SDL_ANDROID_EXTERNAL_STORAGE_WRITE = 2;

		public enum SDL_bool
		{
			SDL_FALSE,
			SDL_TRUE
		}

		public delegate int SDL_WinRT_mainFunction(int argc, IntPtr[] argv);

		public enum SDL_HintPriority
		{
			SDL_HINT_DEFAULT,
			SDL_HINT_NORMAL,
			SDL_HINT_OVERRIDE
		}

		public enum SDL_LogPriority
		{
			SDL_LOG_PRIORITY_VERBOSE = 1,
			SDL_LOG_PRIORITY_DEBUG,
			SDL_LOG_PRIORITY_INFO,
			SDL_LOG_PRIORITY_WARN,
			SDL_LOG_PRIORITY_ERROR,
			SDL_LOG_PRIORITY_CRITICAL,
			SDL_NUM_LOG_PRIORITIES
		}

		[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
		public delegate void SDL_LogOutputFunction(IntPtr userdata, int category, SDL.SDL_LogPriority priority, IntPtr message);

		[Flags]
		public enum SDL_MessageBoxFlags : uint
		{
			SDL_MESSAGEBOX_ERROR = 16u,
			SDL_MESSAGEBOX_WARNING = 32u,
			SDL_MESSAGEBOX_INFORMATION = 64u
		}

		[Flags]
		public enum SDL_MessageBoxButtonFlags : uint
		{
			SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 1u,
			SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 2u
		}

		private struct INTERNAL_SDL_MessageBoxButtonData
		{
			public SDL.SDL_MessageBoxButtonFlags flags;

			public int buttonid;

			public IntPtr text;
		}

		public struct SDL_MessageBoxButtonData
		{
			public SDL.SDL_MessageBoxButtonFlags flags;

			public int buttonid;

			public string text;
		}

		public struct SDL_MessageBoxColor
		{
			public byte r;

			public byte g;

			public byte b;
		}

		public enum SDL_MessageBoxColorType
		{
			SDL_MESSAGEBOX_COLOR_BACKGROUND,
			SDL_MESSAGEBOX_COLOR_TEXT,
			SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
			SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
			SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
			SDL_MESSAGEBOX_COLOR_MAX
		}

		public struct SDL_MessageBoxColorScheme
		{
			[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.Struct)]
			public SDL.SDL_MessageBoxColor[] colors;
		}

		private struct INTERNAL_SDL_MessageBoxData
		{
			public SDL.SDL_MessageBoxFlags flags;

			public IntPtr window;

			public IntPtr title;

			public IntPtr message;

			public int numbuttons;

			public IntPtr buttons;

			public IntPtr colorScheme;
		}

		public struct SDL_MessageBoxData
		{
			public SDL.SDL_MessageBoxFlags flags;

			public IntPtr window;

			public string title;

			public string message;

			public int numbuttons;

			public SDL.SDL_MessageBoxButtonData[] buttons;

			public SDL.SDL_MessageBoxColorScheme? colorScheme;
		}

		public struct SDL_version
		{
			public byte major;

			public byte minor;

			public byte patch;
		}

		public enum SDL_GLattr
		{
			SDL_GL_RED_SIZE,
			SDL_GL_GREEN_SIZE,
			SDL_GL_BLUE_SIZE,
			SDL_GL_ALPHA_SIZE,
			SDL_GL_BUFFER_SIZE,
			SDL_GL_DOUBLEBUFFER,
			SDL_GL_DEPTH_SIZE,
			SDL_GL_STENCIL_SIZE,
			SDL_GL_ACCUM_RED_SIZE,
			SDL_GL_ACCUM_GREEN_SIZE,
			SDL_GL_ACCUM_BLUE_SIZE,
			SDL_GL_ACCUM_ALPHA_SIZE,
			SDL_GL_STEREO,
			SDL_GL_MULTISAMPLEBUFFERS,
			SDL_GL_MULTISAMPLESAMPLES,
			SDL_GL_ACCELERATED_VISUAL,
			SDL_GL_RETAINED_BACKING,
			SDL_GL_CONTEXT_MAJOR_VERSION,
			SDL_GL_CONTEXT_MINOR_VERSION,
			SDL_GL_CONTEXT_EGL,
			SDL_GL_CONTEXT_FLAGS,
			SDL_GL_CONTEXT_PROFILE_MASK,
			SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
			SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
			SDL_GL_CONTEXT_RELEASE_BEHAVIOR,
			SDL_GL_CONTEXT_RESET_NOTIFICATION,
			SDL_GL_CONTEXT_NO_ERROR
		}

		[Flags]
		public enum SDL_GLprofile
		{
			SDL_GL_CONTEXT_PROFILE_CORE = 1,
			SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 2,
			SDL_GL_CONTEXT_PROFILE_ES = 4
		}

		[Flags]
		public enum SDL_GLcontext
		{
			SDL_GL_CONTEXT_DEBUG_FLAG = 1,
			SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 2,
			SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = 4,
			SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = 8
		}

		public enum SDL_WindowEventID : byte
		{
			SDL_WINDOWEVENT_NONE,
			SDL_WINDOWEVENT_SHOWN,
			SDL_WINDOWEVENT_HIDDEN,
			SDL_WINDOWEVENT_EXPOSED,
			SDL_WINDOWEVENT_MOVED,
			SDL_WINDOWEVENT_RESIZED,
			SDL_WINDOWEVENT_SIZE_CHANGED,
			SDL_WINDOWEVENT_MINIMIZED,
			SDL_WINDOWEVENT_MAXIMIZED,
			SDL_WINDOWEVENT_RESTORED,
			SDL_WINDOWEVENT_ENTER,
			SDL_WINDOWEVENT_LEAVE,
			SDL_WINDOWEVENT_FOCUS_GAINED,
			SDL_WINDOWEVENT_FOCUS_LOST,
			SDL_WINDOWEVENT_CLOSE,
			SDL_WINDOWEVENT_TAKE_FOCUS,
			SDL_WINDOWEVENT_HIT_TEST
		}

		public enum SDL_DisplayEventID : byte
		{
			SDL_DISPLAYEVENT_NONE,
			SDL_DISPLAYEVENT_ORIENTATION
		}

		public enum SDL_DisplayOrientation
		{
			SDL_ORIENTATION_UNKNOWN,
			SDL_ORIENTATION_LANDSCAPE,
			SDL_ORIENTATION_LANDSCAPE_FLIPPED,
			SDL_ORIENTATION_PORTRAIT,
			SDL_ORIENTATION_PORTRAIT_FLIPPED
		}

		[Flags]
		public enum SDL_WindowFlags : uint
		{
			SDL_WINDOW_FULLSCREEN = 1u,
			SDL_WINDOW_OPENGL = 2u,
			SDL_WINDOW_SHOWN = 4u,
			SDL_WINDOW_HIDDEN = 8u,
			SDL_WINDOW_BORDERLESS = 16u,
			SDL_WINDOW_RESIZABLE = 32u,
			SDL_WINDOW_MINIMIZED = 64u,
			SDL_WINDOW_MAXIMIZED = 128u,
			SDL_WINDOW_INPUT_GRABBED = 256u,
			SDL_WINDOW_INPUT_FOCUS = 512u,
			SDL_WINDOW_MOUSE_FOCUS = 1024u,
			SDL_WINDOW_FULLSCREEN_DESKTOP = 4097u,
			SDL_WINDOW_FOREIGN = 2048u,
			SDL_WINDOW_ALLOW_HIGHDPI = 8192u,
			SDL_WINDOW_MOUSE_CAPTURE = 16384u,
			SDL_WINDOW_ALWAYS_ON_TOP = 32768u,
			SDL_WINDOW_SKIP_TASKBAR = 65536u,
			SDL_WINDOW_UTILITY = 131072u,
			SDL_WINDOW_TOOLTIP = 262144u,
			SDL_WINDOW_POPUP_MENU = 524288u,
			SDL_WINDOW_VULKAN = 268435456u
		}

		public enum SDL_HitTestResult
		{
			SDL_HITTEST_NORMAL,
			SDL_HITTEST_DRAGGABLE,
			SDL_HITTEST_RESIZE_TOPLEFT,
			SDL_HITTEST_RESIZE_TOP,
			SDL_HITTEST_RESIZE_TOPRIGHT,
			SDL_HITTEST_RESIZE_RIGHT,
			SDL_HITTEST_RESIZE_BOTTOMRIGHT,
			SDL_HITTEST_RESIZE_BOTTOM,
			SDL_HITTEST_RESIZE_BOTTOMLEFT,
			SDL_HITTEST_RESIZE_LEFT
		}

		public struct SDL_DisplayMode
		{
			public uint format;

			public int w;

			public int h;

			public int refresh_rate;

			public IntPtr driverdata;
		}

		[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
		public delegate SDL.SDL_HitTestResult SDL_HitTest(IntPtr win, IntPtr area, IntPtr data);

		[Flags]
		public enum SDL_BlendMode
		{
			SDL_BLENDMODE_NONE = 0,
			SDL_BLENDMODE_BLEND = 1,
			SDL_BLENDMODE_ADD = 2,
			SDL_BLENDMODE_MOD = 4,
			SDL_BLENDMODE_INVALID = 2147483647
		}

		public enum SDL_BlendOperation
		{
			SDL_BLENDOPERATION_ADD = 1,
			SDL_BLENDOPERATION_SUBTRACT,
			SDL_BLENDOPERATION_REV_SUBTRACT,
			SDL_BLENDOPERATION_MINIMUM,
			SDL_BLENDOPERATION_MAXIMUM
		}

		public enum SDL_BlendFactor
		{
			SDL_BLENDFACTOR_ZERO = 1,
			SDL_BLENDFACTOR_ONE,
			SDL_BLENDFACTOR_SRC_COLOR,
			SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR,
			SDL_BLENDFACTOR_SRC_ALPHA,
			SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA,
			SDL_BLENDFACTOR_DST_COLOR,
			SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR,
			SDL_BLENDFACTOR_DST_ALPHA,
			SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA
		}

		[Flags]
		public enum SDL_RendererFlags : uint
		{
			SDL_RENDERER_SOFTWARE = 1u,
			SDL_RENDERER_ACCELERATED = 2u,
			SDL_RENDERER_PRESENTVSYNC = 4u,
			SDL_RENDERER_TARGETTEXTURE = 8u
		}

		[Flags]
		public enum SDL_RendererFlip
		{
			SDL_FLIP_NONE = 0,
			SDL_FLIP_HORIZONTAL = 1,
			SDL_FLIP_VERTICAL = 2
		}

		public enum SDL_TextureAccess
		{
			SDL_TEXTUREACCESS_STATIC,
			SDL_TEXTUREACCESS_STREAMING,
			SDL_TEXTUREACCESS_TARGET
		}

		[Flags]
		public enum SDL_TextureModulate
		{
			SDL_TEXTUREMODULATE_NONE = 0,
			SDL_TEXTUREMODULATE_HORIZONTAL = 1,
			SDL_TEXTUREMODULATE_VERTICAL = 2
		}

		public struct SDL_RendererInfo
		{
			public IntPtr name;

			public uint flags;

			public uint num_texture_formats;

			[FixedBuffer(typeof(uint), 16)]
			public SDL.SDL_RendererInfo.<texture_formats>e__FixedBuffer texture_formats;

			public int max_texture_width;

			public int max_texture_height;

			[CompilerGenerated]
			[UnsafeValueType]
			[StructLayout(LayoutKind.Sequential, Size = 64)]
			public struct <texture_formats>e__FixedBuffer
			{
				public uint FixedElementField;
			}
		}

		public enum SDL_PIXELTYPE_ENUM
		{
			SDL_PIXELTYPE_UNKNOWN,
			SDL_PIXELTYPE_INDEX1,
			SDL_PIXELTYPE_INDEX4,
			SDL_PIXELTYPE_INDEX8,
			SDL_PIXELTYPE_PACKED8,
			SDL_PIXELTYPE_PACKED16,
			SDL_PIXELTYPE_PACKED32,
			SDL_PIXELTYPE_ARRAYU8,
			SDL_PIXELTYPE_ARRAYU16,
			SDL_PIXELTYPE_ARRAYU32,
			SDL_PIXELTYPE_ARRAYF16,
			SDL_PIXELTYPE_ARRAYF32
		}

		public enum SDL_PIXELORDER_ENUM
		{
			SDL_BITMAPORDER_NONE,
			SDL_BITMAPORDER_4321,
			SDL_BITMAPORDER_1234,
			SDL_PACKEDORDER_NONE = 0,
			SDL_PACKEDORDER_XRGB,
			SDL_PACKEDORDER_RGBX,
			SDL_PACKEDORDER_ARGB,
			SDL_PACKEDORDER_RGBA,
			SDL_PACKEDORDER_XBGR,
			SDL_PACKEDORDER_BGRX,
			SDL_PACKEDORDER_ABGR,
			SDL_PACKEDORDER_BGRA,
			SDL_ARRAYORDER_NONE = 0,
			SDL_ARRAYORDER_RGB,
			SDL_ARRAYORDER_RGBA,
			SDL_ARRAYORDER_ARGB,
			SDL_ARRAYORDER_BGR,
			SDL_ARRAYORDER_BGRA,
			SDL_ARRAYORDER_ABGR
		}

		public enum SDL_PACKEDLAYOUT_ENUM
		{
			SDL_PACKEDLAYOUT_NONE,
			SDL_PACKEDLAYOUT_332,
			SDL_PACKEDLAYOUT_4444,
			SDL_PACKEDLAYOUT_1555,
			SDL_PACKEDLAYOUT_5551,
			SDL_PACKEDLAYOUT_565,
			SDL_PACKEDLAYOUT_8888,
			SDL_PACKEDLAYOUT_2101010,
			SDL_PACKEDLAYOUT_1010102
		}

		public struct SDL_Color
		{
			public byte r;

			public byte g;

			public byte b;

			public byte a;
		}

		public struct SDL_Palette
		{
			public int ncolors;

			public IntPtr colors;

			public int version;

			public int refcount;
		}

		public struct SDL_PixelFormat
		{
			public uint format;

			public IntPtr palette;

			public byte BitsPerPixel;

			public byte BytesPerPixel;

			public uint Rmask;

			public uint Gmask;

			public uint Bmask;

			public uint Amask;

			public byte Rloss;

			public byte Gloss;

			public byte Bloss;

			public byte Aloss;

			public byte Rshift;

			public byte Gshift;

			public byte Bshift;

			public byte Ashift;

			public int refcount;

			public IntPtr next;
		}

		public struct SDL_Point
		{
			public int x;

			public int y;
		}

		public struct SDL_Rect
		{
			public int x;

			public int y;

			public int w;

			public int h;
		}

		public struct SDL_Surface
		{
			public uint flags;

			public IntPtr format;

			public int w;

			public int h;

			public int pitch;

			public IntPtr pixels;

			public IntPtr userdata;

			public int locked;

			public IntPtr lock_data;

			public SDL.SDL_Rect clip_rect;

			public IntPtr map;

			public int refcount;
		}

		public enum SDL_EventType : uint
		{
			SDL_FIRSTEVENT,
			SDL_QUIT = 256u,
			SDL_APP_TERMINATING,
			SDL_APP_LOWMEMORY,
			SDL_APP_WILLENTERBACKGROUND,
			SDL_APP_DIDENTERBACKGROUND,
			SDL_APP_WILLENTERFOREGROUND,
			SDL_APP_DIDENTERFOREGROUND,
			SDL_DISPLAYEVENT = 336u,
			SDL_WINDOWEVENT = 512u,
			SDL_SYSWMEVENT,
			SDL_KEYDOWN = 768u,
			SDL_KEYUP,
			SDL_TEXTEDITING,
			SDL_TEXTINPUT,
			SDL_KEYMAPCHANGED,
			SDL_MOUSEMOTION = 1024u,
			SDL_MOUSEBUTTONDOWN,
			SDL_MOUSEBUTTONUP,
			SDL_MOUSEWHEEL,
			SDL_JOYAXISMOTION = 1536u,
			SDL_JOYBALLMOTION,
			SDL_JOYHATMOTION,
			SDL_JOYBUTTONDOWN,
			SDL_JOYBUTTONUP,
			SDL_JOYDEVICEADDED,
			SDL_JOYDEVICEREMOVED,
			SDL_CONTROLLERAXISMOTION = 1616u,
			SDL_CONTROLLERBUTTONDOWN,
			SDL_CONTROLLERBUTTONUP,
			SDL_CONTROLLERDEVICEADDED,
			SDL_CONTROLLERDEVICEREMOVED,
			SDL_CONTROLLERDEVICEREMAPPED,
			SDL_FINGERDOWN = 1792u,
			SDL_FINGERUP,
			SDL_FINGERMOTION,
			SDL_DOLLARGESTURE = 2048u,
			SDL_DOLLARRECORD,
			SDL_MULTIGESTURE,
			SDL_CLIPBOARDUPDATE = 2304u,
			SDL_DROPFILE = 4096u,
			SDL_DROPTEXT,
			SDL_DROPBEGIN,
			SDL_DROPCOMPLETE,
			SDL_AUDIODEVICEADDED = 4352u,
			SDL_AUDIODEVICEREMOVED,
			SDL_SENSORUPDATE = 4608u,
			SDL_RENDER_TARGETS_RESET = 8192u,
			SDL_RENDER_DEVICE_RESET,
			SDL_USEREVENT = 32768u,
			SDL_LASTEVENT = 65535u
		}

		public enum SDL_MouseWheelDirection : uint
		{
			SDL_MOUSEWHEEL_NORMAL,
			SDL_MOUSEWHEEL_FLIPPED
		}

		public struct SDL_GenericEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;
		}

		public struct SDL_DisplayEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public uint display;

			public SDL.SDL_DisplayEventID displayEvent;

			private byte padding1;

			private byte padding2;

			private byte padding3;

			public int data1;
		}

		public struct SDL_WindowEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public uint windowID;

			public SDL.SDL_WindowEventID windowEvent;

			private byte padding1;

			private byte padding2;

			private byte padding3;

			public int data1;

			public int data2;
		}

		public struct SDL_KeyboardEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public uint windowID;

			public byte state;

			public byte repeat;

			private byte padding2;

			private byte padding3;

			public SDL.SDL_Keysym keysym;
		}

		public struct SDL_TextEditingEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public uint windowID;

			[FixedBuffer(typeof(byte), 32)]
			public SDL.SDL_TextEditingEvent.<text>e__FixedBuffer text;

			public int start;

			public int length;

			[CompilerGenerated]
			[UnsafeValueType]
			[StructLayout(LayoutKind.Sequential, Size = 32)]
			public struct <text>e__FixedBuffer
			{
				public byte FixedElementField;
			}
		}

		public struct SDL_TextInputEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public uint windowID;

			[FixedBuffer(typeof(byte), 32)]
			public SDL.SDL_TextInputEvent.<text>e__FixedBuffer text;

			[CompilerGenerated]
			[UnsafeValueType]
			[StructLayout(LayoutKind.Sequential, Size = 32)]
			public struct <text>e__FixedBuffer
			{
				public byte FixedElementField;
			}
		}

		public struct SDL_MouseMotionEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public uint windowID;

			public uint which;

			public byte state;

			private byte padding1;

			private byte padding2;

			private byte padding3;

			public int x;

			public int y;

			public int xrel;

			public int yrel;
		}

		public struct SDL_MouseButtonEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public uint windowID;

			public uint which;

			public byte button;

			public byte state;

			public byte clicks;

			private byte padding1;

			public int x;

			public int y;
		}

		public struct SDL_MouseWheelEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public uint windowID;

			public uint which;

			public int x;

			public int y;

			public uint direction;
		}

		public struct SDL_JoyAxisEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public int which;

			public byte axis;

			private byte padding1;

			private byte padding2;

			private byte padding3;

			public short axisValue;

			public ushort padding4;
		}

		public struct SDL_JoyBallEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public int which;

			public byte ball;

			private byte padding1;

			private byte padding2;

			private byte padding3;

			public short xrel;

			public short yrel;
		}

		public struct SDL_JoyHatEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public int which;

			public byte hat;

			public byte hatValue;

			private byte padding1;

			private byte padding2;
		}

		public struct SDL_JoyButtonEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public int which;

			public byte button;

			public byte state;

			private byte padding1;

			private byte padding2;
		}

		public struct SDL_JoyDeviceEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public int which;
		}

		public struct SDL_ControllerAxisEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public int which;

			public byte axis;

			private byte padding1;

			private byte padding2;

			private byte padding3;

			public short axisValue;

			private ushort padding4;
		}

		public struct SDL_ControllerButtonEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public int which;

			public byte button;

			public byte state;

			private byte padding1;

			private byte padding2;
		}

		public struct SDL_ControllerDeviceEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public int which;
		}

		public struct SDL_AudioDeviceEvent
		{
			public uint type;

			public uint timestamp;

			public uint which;

			public byte iscapture;

			private byte padding1;

			private byte padding2;

			private byte padding3;
		}

		public struct SDL_TouchFingerEvent
		{
			public uint type;

			public uint timestamp;

			public long touchId;

			public long fingerId;

			public float x;

			public float y;

			public float dx;

			public float dy;

			public float pressure;
		}

		public struct SDL_MultiGestureEvent
		{
			public uint type;

			public uint timestamp;

			public long touchId;

			public float dTheta;

			public float dDist;

			public float x;

			public float y;

			public ushort numFingers;

			public ushort padding;
		}

		public struct SDL_DollarGestureEvent
		{
			public uint type;

			public uint timestamp;

			public long touchId;

			public long gestureId;

			public uint numFingers;

			public float error;

			public float x;

			public float y;
		}

		public struct SDL_DropEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public IntPtr file;

			public uint windowID;
		}

		public struct SDL_SensorEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public int which;

			[FixedBuffer(typeof(float), 6)]
			public SDL.SDL_SensorEvent.<data>e__FixedBuffer data;

			[CompilerGenerated]
			[UnsafeValueType]
			[StructLayout(LayoutKind.Sequential, Size = 24)]
			public struct <data>e__FixedBuffer
			{
				public float FixedElementField;
			}
		}

		public struct SDL_QuitEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;
		}

		public struct SDL_UserEvent
		{
			public uint type;

			public uint timestamp;

			public uint windowID;

			public int code;

			public IntPtr data1;

			public IntPtr data2;
		}

		public struct SDL_SysWMEvent
		{
			public SDL.SDL_EventType type;

			public uint timestamp;

			public IntPtr msg;
		}

		[StructLayout(LayoutKind.Explicit)]
		public struct SDL_Event
		{
			[FieldOffset(0)]
			public SDL.SDL_EventType type;

			[FieldOffset(0)]
			public SDL.SDL_DisplayEvent display;

			[FieldOffset(0)]
			public SDL.SDL_WindowEvent window;

			[FieldOffset(0)]
			public SDL.SDL_KeyboardEvent key;

			[FieldOffset(0)]
			public SDL.SDL_TextEditingEvent edit;

			[FieldOffset(0)]
			public SDL.SDL_TextInputEvent text;

			[FieldOffset(0)]
			public SDL.SDL_MouseMotionEvent motion;

			[FieldOffset(0)]
			public SDL.SDL_MouseButtonEvent button;

			[FieldOffset(0)]
			public SDL.SDL_MouseWheelEvent wheel;

			[FieldOffset(0)]
			public SDL.SDL_JoyAxisEvent jaxis;

			[FieldOffset(0)]
			public SDL.SDL_JoyBallEvent jball;

			[FieldOffset(0)]
			public SDL.SDL_JoyHatEvent jhat;

			[FieldOffset(0)]
			public SDL.SDL_JoyButtonEvent jbutton;

			[FieldOffset(0)]
			public SDL.SDL_JoyDeviceEvent jdevice;

			[FieldOffset(0)]
			public SDL.SDL_ControllerAxisEvent caxis;

			[FieldOffset(0)]
			public SDL.SDL_ControllerButtonEvent cbutton;

			[FieldOffset(0)]
			public SDL.SDL_ControllerDeviceEvent cdevice;

			[FieldOffset(0)]
			public SDL.SDL_AudioDeviceEvent adevice;

			[FieldOffset(0)]
			public SDL.SDL_SensorEvent sensor;

			[FieldOffset(0)]
			public SDL.SDL_QuitEvent quit;

			[FieldOffset(0)]
			public SDL.SDL_UserEvent user;

			[FieldOffset(0)]
			public SDL.SDL_SysWMEvent syswm;

			[FieldOffset(0)]
			public SDL.SDL_TouchFingerEvent tfinger;

			[FieldOffset(0)]
			public SDL.SDL_MultiGestureEvent mgesture;

			[FieldOffset(0)]
			public SDL.SDL_DollarGestureEvent dgesture;

			[FieldOffset(0)]
			public SDL.SDL_DropEvent drop;
		}

		[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
		public delegate int SDL_EventFilter(IntPtr userdata, IntPtr sdlevent);

		public enum SDL_eventaction
		{
			SDL_ADDEVENT,
			SDL_PEEKEVENT,
			SDL_GETEVENT
		}

		public enum SDL_Scancode
		{
			SDL_SCANCODE_UNKNOWN,
			SDL_SCANCODE_A = 4,
			SDL_SCANCODE_B,
			SDL_SCANCODE_C,
			SDL_SCANCODE_D,
			SDL_SCANCODE_E,
			SDL_SCANCODE_F,
			SDL_SCANCODE_G,
			SDL_SCANCODE_H,
			SDL_SCANCODE_I,
			SDL_SCANCODE_J,
			SDL_SCANCODE_K,
			SDL_SCANCODE_L,
			SDL_SCANCODE_M,
			SDL_SCANCODE_N,
			SDL_SCANCODE_O,
			SDL_SCANCODE_P,
			SDL_SCANCODE_Q,
			SDL_SCANCODE_R,
			SDL_SCANCODE_S,
			SDL_SCANCODE_T,
			SDL_SCANCODE_U,
			SDL_SCANCODE_V,
			SDL_SCANCODE_W,
			SDL_SCANCODE_X,
			SDL_SCANCODE_Y,
			SDL_SCANCODE_Z,
			SDL_SCANCODE_1,
			SDL_SCANCODE_2,
			SDL_SCANCODE_3,
			SDL_SCANCODE_4,
			SDL_SCANCODE_5,
			SDL_SCANCODE_6,
			SDL_SCANCODE_7,
			SDL_SCANCODE_8,
			SDL_SCANCODE_9,
			SDL_SCANCODE_0,
			SDL_SCANCODE_RETURN,
			SDL_SCANCODE_ESCAPE,
			SDL_SCANCODE_BACKSPACE,
			SDL_SCANCODE_TAB,
			SDL_SCANCODE_SPACE,
			SDL_SCANCODE_MINUS,
			SDL_SCANCODE_EQUALS,
			SDL_SCANCODE_LEFTBRACKET,
			SDL_SCANCODE_RIGHTBRACKET,
			SDL_SCANCODE_BACKSLASH,
			SDL_SCANCODE_NONUSHASH,
			SDL_SCANCODE_SEMICOLON,
			SDL_SCANCODE_APOSTROPHE,
			SDL_SCANCODE_GRAVE,
			SDL_SCANCODE_COMMA,
			SDL_SCANCODE_PERIOD,
			SDL_SCANCODE_SLASH,
			SDL_SCANCODE_CAPSLOCK,
			SDL_SCANCODE_F1,
			SDL_SCANCODE_F2,
			SDL_SCANCODE_F3,
			SDL_SCANCODE_F4,
			SDL_SCANCODE_F5,
			SDL_SCANCODE_F6,
			SDL_SCANCODE_F7,
			SDL_SCANCODE_F8,
			SDL_SCANCODE_F9,
			SDL_SCANCODE_F10,
			SDL_SCANCODE_F11,
			SDL_SCANCODE_F12,
			SDL_SCANCODE_PRINTSCREEN,
			SDL_SCANCODE_SCROLLLOCK,
			SDL_SCANCODE_PAUSE,
			SDL_SCANCODE_INSERT,
			SDL_SCANCODE_HOME,
			SDL_SCANCODE_PAGEUP,
			SDL_SCANCODE_DELETE,
			SDL_SCANCODE_END,
			SDL_SCANCODE_PAGEDOWN,
			SDL_SCANCODE_RIGHT,
			SDL_SCANCODE_LEFT,
			SDL_SCANCODE_DOWN,
			SDL_SCANCODE_UP,
			SDL_SCANCODE_NUMLOCKCLEAR,
			SDL_SCANCODE_KP_DIVIDE,
			SDL_SCANCODE_KP_MULTIPLY,
			SDL_SCANCODE_KP_MINUS,
			SDL_SCANCODE_KP_PLUS,
			SDL_SCANCODE_KP_ENTER,
			SDL_SCANCODE_KP_1,
			SDL_SCANCODE_KP_2,
			SDL_SCANCODE_KP_3,
			SDL_SCANCODE_KP_4,
			SDL_SCANCODE_KP_5,
			SDL_SCANCODE_KP_6,
			SDL_SCANCODE_KP_7,
			SDL_SCANCODE_KP_8,
			SDL_SCANCODE_KP_9,
			SDL_SCANCODE_KP_0,
			SDL_SCANCODE_KP_PERIOD,
			SDL_SCANCODE_NONUSBACKSLASH,
			SDL_SCANCODE_APPLICATION,
			SDL_SCANCODE_POWER,
			SDL_SCANCODE_KP_EQUALS,
			SDL_SCANCODE_F13,
			SDL_SCANCODE_F14,
			SDL_SCANCODE_F15,
			SDL_SCANCODE_F16,
			SDL_SCANCODE_F17,
			SDL_SCANCODE_F18,
			SDL_SCANCODE_F19,
			SDL_SCANCODE_F20,
			SDL_SCANCODE_F21,
			SDL_SCANCODE_F22,
			SDL_SCANCODE_F23,
			SDL_SCANCODE_F24,
			SDL_SCANCODE_EXECUTE,
			SDL_SCANCODE_HELP,
			SDL_SCANCODE_MENU,
			SDL_SCANCODE_SELECT,
			SDL_SCANCODE_STOP,
			SDL_SCANCODE_AGAIN,
			SDL_SCANCODE_UNDO,
			SDL_SCANCODE_CUT,
			SDL_SCANCODE_COPY,
			SDL_SCANCODE_PASTE,
			SDL_SCANCODE_FIND,
			SDL_SCANCODE_MUTE,
			SDL_SCANCODE_VOLUMEUP,
			SDL_SCANCODE_VOLUMEDOWN,
			SDL_SCANCODE_KP_COMMA = 133,
			SDL_SCANCODE_KP_EQUALSAS400,
			SDL_SCANCODE_INTERNATIONAL1,
			SDL_SCANCODE_INTERNATIONAL2,
			SDL_SCANCODE_INTERNATIONAL3,
			SDL_SCANCODE_INTERNATIONAL4,
			SDL_SCANCODE_INTERNATIONAL5,
			SDL_SCANCODE_INTERNATIONAL6,
			SDL_SCANCODE_INTERNATIONAL7,
			SDL_SCANCODE_INTERNATIONAL8,
			SDL_SCANCODE_INTERNATIONAL9,
			SDL_SCANCODE_LANG1,
			SDL_SCANCODE_LANG2,
			SDL_SCANCODE_LANG3,
			SDL_SCANCODE_LANG4,
			SDL_SCANCODE_LANG5,
			SDL_SCANCODE_LANG6,
			SDL_SCANCODE_LANG7,
			SDL_SCANCODE_LANG8,
			SDL_SCANCODE_LANG9,
			SDL_SCANCODE_ALTERASE,
			SDL_SCANCODE_SYSREQ,
			SDL_SCANCODE_CANCEL,
			SDL_SCANCODE_CLEAR,
			SDL_SCANCODE_PRIOR,
			SDL_SCANCODE_RETURN2,
			SDL_SCANCODE_SEPARATOR,
			SDL_SCANCODE_OUT,
			SDL_SCANCODE_OPER,
			SDL_SCANCODE_CLEARAGAIN,
			SDL_SCANCODE_CRSEL,
			SDL_SCANCODE_EXSEL,
			SDL_SCANCODE_KP_00 = 176,
			SDL_SCANCODE_KP_000,
			SDL_SCANCODE_THOUSANDSSEPARATOR,
			SDL_SCANCODE_DECIMALSEPARATOR,
			SDL_SCANCODE_CURRENCYUNIT,
			SDL_SCANCODE_CURRENCYSUBUNIT,
			SDL_SCANCODE_KP_LEFTPAREN,
			SDL_SCANCODE_KP_RIGHTPAREN,
			SDL_SCANCODE_KP_LEFTBRACE,
			SDL_SCANCODE_KP_RIGHTBRACE,
			SDL_SCANCODE_KP_TAB,
			SDL_SCANCODE_KP_BACKSPACE,
			SDL_SCANCODE_KP_A,
			SDL_SCANCODE_KP_B,
			SDL_SCANCODE_KP_C,
			SDL_SCANCODE_KP_D,
			SDL_SCANCODE_KP_E,
			SDL_SCANCODE_KP_F,
			SDL_SCANCODE_KP_XOR,
			SDL_SCANCODE_KP_POWER,
			SDL_SCANCODE_KP_PERCENT,
			SDL_SCANCODE_KP_LESS,
			SDL_SCANCODE_KP_GREATER,
			SDL_SCANCODE_KP_AMPERSAND,
			SDL_SCANCODE_KP_DBLAMPERSAND,
			SDL_SCANCODE_KP_VERTICALBAR,
			SDL_SCANCODE_KP_DBLVERTICALBAR,
			SDL_SCANCODE_KP_COLON,
			SDL_SCANCODE_KP_HASH,
			SDL_SCANCODE_KP_SPACE,
			SDL_SCANCODE_KP_AT,
			SDL_SCANCODE_KP_EXCLAM,
			SDL_SCANCODE_KP_MEMSTORE,
			SDL_SCANCODE_KP_MEMRECALL,
			SDL_SCANCODE_KP_MEMCLEAR,
			SDL_SCANCODE_KP_MEMADD,
			SDL_SCANCODE_KP_MEMSUBTRACT,
			SDL_SCANCODE_KP_MEMMULTIPLY,
			SDL_SCANCODE_KP_MEMDIVIDE,
			SDL_SCANCODE_KP_PLUSMINUS,
			SDL_SCANCODE_KP_CLEAR,
			SDL_SCANCODE_KP_CLEARENTRY,
			SDL_SCANCODE_KP_BINARY,
			SDL_SCANCODE_KP_OCTAL,
			SDL_SCANCODE_KP_DECIMAL,
			SDL_SCANCODE_KP_HEXADECIMAL,
			SDL_SCANCODE_LCTRL = 224,
			SDL_SCANCODE_LSHIFT,
			SDL_SCANCODE_LALT,
			SDL_SCANCODE_LGUI,
			SDL_SCANCODE_RCTRL,
			SDL_SCANCODE_RSHIFT,
			SDL_SCANCODE_RALT,
			SDL_SCANCODE_RGUI,
			SDL_SCANCODE_MODE = 257,
			SDL_SCANCODE_AUDIONEXT,
			SDL_SCANCODE_AUDIOPREV,
			SDL_SCANCODE_AUDIOSTOP,
			SDL_SCANCODE_AUDIOPLAY,
			SDL_SCANCODE_AUDIOMUTE,
			SDL_SCANCODE_MEDIASELECT,
			SDL_SCANCODE_WWW,
			SDL_SCANCODE_MAIL,
			SDL_SCANCODE_CALCULATOR,
			SDL_SCANCODE_COMPUTER,
			SDL_SCANCODE_AC_SEARCH,
			SDL_SCANCODE_AC_HOME,
			SDL_SCANCODE_AC_BACK,
			SDL_SCANCODE_AC_FORWARD,
			SDL_SCANCODE_AC_STOP,
			SDL_SCANCODE_AC_REFRESH,
			SDL_SCANCODE_AC_BOOKMARKS,
			SDL_SCANCODE_BRIGHTNESSDOWN,
			SDL_SCANCODE_BRIGHTNESSUP,
			SDL_SCANCODE_DISPLAYSWITCH,
			SDL_SCANCODE_KBDILLUMTOGGLE,
			SDL_SCANCODE_KBDILLUMDOWN,
			SDL_SCANCODE_KBDILLUMUP,
			SDL_SCANCODE_EJECT,
			SDL_SCANCODE_SLEEP,
			SDL_SCANCODE_APP1,
			SDL_SCANCODE_APP2,
			SDL_NUM_SCANCODES = 512
		}

		public enum SDL_Keycode
		{
			SDLK_UNKNOWN,
			SDLK_RETURN = 13,
			SDLK_ESCAPE = 27,
			SDLK_BACKSPACE = 8,
			SDLK_TAB,
			SDLK_SPACE = 32,
			SDLK_EXCLAIM,
			SDLK_QUOTEDBL,
			SDLK_HASH,
			SDLK_PERCENT = 37,
			SDLK_DOLLAR = 36,
			SDLK_AMPERSAND = 38,
			SDLK_QUOTE,
			SDLK_LEFTPAREN,
			SDLK_RIGHTPAREN,
			SDLK_ASTERISK,
			SDLK_PLUS,
			SDLK_COMMA,
			SDLK_MINUS,
			SDLK_PERIOD,
			SDLK_SLASH,
			SDLK_0,
			SDLK_1,
			SDLK_2,
			SDLK_3,
			SDLK_4,
			SDLK_5,
			SDLK_6,
			SDLK_7,
			SDLK_8,
			SDLK_9,
			SDLK_COLON,
			SDLK_SEMICOLON,
			SDLK_LESS,
			SDLK_EQUALS,
			SDLK_GREATER,
			SDLK_QUESTION,
			SDLK_AT,
			SDLK_LEFTBRACKET = 91,
			SDLK_BACKSLASH,
			SDLK_RIGHTBRACKET,
			SDLK_CARET,
			SDLK_UNDERSCORE,
			SDLK_BACKQUOTE,
			SDLK_a,
			SDLK_b,
			SDLK_c,
			SDLK_d,
			SDLK_e,
			SDLK_f,
			SDLK_g,
			SDLK_h,
			SDLK_i,
			SDLK_j,
			SDLK_k,
			SDLK_l,
			SDLK_m,
			SDLK_n,
			SDLK_o,
			SDLK_p,
			SDLK_q,
			SDLK_r,
			SDLK_s,
			SDLK_t,
			SDLK_u,
			SDLK_v,
			SDLK_w,
			SDLK_x,
			SDLK_y,
			SDLK_z,
			SDLK_CAPSLOCK = 1073741881,
			SDLK_F1,
			SDLK_F2,
			SDLK_F3,
			SDLK_F4,
			SDLK_F5,
			SDLK_F6,
			SDLK_F7,
			SDLK_F8,
			SDLK_F9,
			SDLK_F10,
			SDLK_F11,
			SDLK_F12,
			SDLK_PRINTSCREEN,
			SDLK_SCROLLLOCK,
			SDLK_PAUSE,
			SDLK_INSERT,
			SDLK_HOME,
			SDLK_PAGEUP,
			SDLK_DELETE = 127,
			SDLK_END = 1073741901,
			SDLK_PAGEDOWN,
			SDLK_RIGHT,
			SDLK_LEFT,
			SDLK_DOWN,
			SDLK_UP,
			SDLK_NUMLOCKCLEAR,
			SDLK_KP_DIVIDE,
			SDLK_KP_MULTIPLY,
			SDLK_KP_MINUS,
			SDLK_KP_PLUS,
			SDLK_KP_ENTER,
			SDLK_KP_1,
			SDLK_KP_2,
			SDLK_KP_3,
			SDLK_KP_4,
			SDLK_KP_5,
			SDLK_KP_6,
			SDLK_KP_7,
			SDLK_KP_8,
			SDLK_KP_9,
			SDLK_KP_0,
			SDLK_KP_PERIOD,
			SDLK_APPLICATION = 1073741925,
			SDLK_POWER,
			SDLK_KP_EQUALS,
			SDLK_F13,
			SDLK_F14,
			SDLK_F15,
			SDLK_F16,
			SDLK_F17,
			SDLK_F18,
			SDLK_F19,
			SDLK_F20,
			SDLK_F21,
			SDLK_F22,
			SDLK_F23,
			SDLK_F24,
			SDLK_EXECUTE,
			SDLK_HELP,
			SDLK_MENU,
			SDLK_SELECT,
			SDLK_STOP,
			SDLK_AGAIN,
			SDLK_UNDO,
			SDLK_CUT,
			SDLK_COPY,
			SDLK_PASTE,
			SDLK_FIND,
			SDLK_MUTE,
			SDLK_VOLUMEUP,
			SDLK_VOLUMEDOWN,
			SDLK_KP_COMMA = 1073741957,
			SDLK_KP_EQUALSAS400,
			SDLK_ALTERASE = 1073741977,
			SDLK_SYSREQ,
			SDLK_CANCEL,
			SDLK_CLEAR,
			SDLK_PRIOR,
			SDLK_RETURN2,
			SDLK_SEPARATOR,
			SDLK_OUT,
			SDLK_OPER,
			SDLK_CLEARAGAIN,
			SDLK_CRSEL,
			SDLK_EXSEL,
			SDLK_KP_00 = 1073742000,
			SDLK_KP_000,
			SDLK_THOUSANDSSEPARATOR,
			SDLK_DECIMALSEPARATOR,
			SDLK_CURRENCYUNIT,
			SDLK_CURRENCYSUBUNIT,
			SDLK_KP_LEFTPAREN,
			SDLK_KP_RIGHTPAREN,
			SDLK_KP_LEFTBRACE,
			SDLK_KP_RIGHTBRACE,
			SDLK_KP_TAB,
			SDLK_KP_BACKSPACE,
			SDLK_KP_A,
			SDLK_KP_B,
			SDLK_KP_C,
			SDLK_KP_D,
			SDLK_KP_E,
			SDLK_KP_F,
			SDLK_KP_XOR,
			SDLK_KP_POWER,
			SDLK_KP_PERCENT,
			SDLK_KP_LESS,
			SDLK_KP_GREATER,
			SDLK_KP_AMPERSAND,
			SDLK_KP_DBLAMPERSAND,
			SDLK_KP_VERTICALBAR,
			SDLK_KP_DBLVERTICALBAR,
			SDLK_KP_COLON,
			SDLK_KP_HASH,
			SDLK_KP_SPACE,
			SDLK_KP_AT,
			SDLK_KP_EXCLAM,
			SDLK_KP_MEMSTORE,
			SDLK_KP_MEMRECALL,
			SDLK_KP_MEMCLEAR,
			SDLK_KP_MEMADD,
			SDLK_KP_MEMSUBTRACT,
			SDLK_KP_MEMMULTIPLY,
			SDLK_KP_MEMDIVIDE,
			SDLK_KP_PLUSMINUS,
			SDLK_KP_CLEAR,
			SDLK_KP_CLEARENTRY,
			SDLK_KP_BINARY,
			SDLK_KP_OCTAL,
			SDLK_KP_DECIMAL,
			SDLK_KP_HEXADECIMAL,
			SDLK_LCTRL = 1073742048,
			SDLK_LSHIFT,
			SDLK_LALT,
			SDLK_LGUI,
			SDLK_RCTRL,
			SDLK_RSHIFT,
			SDLK_RALT,
			SDLK_RGUI,
			SDLK_MODE = 1073742081,
			SDLK_AUDIONEXT,
			SDLK_AUDIOPREV,
			SDLK_AUDIOSTOP,
			SDLK_AUDIOPLAY,
			SDLK_AUDIOMUTE,
			SDLK_MEDIASELECT,
			SDLK_WWW,
			SDLK_MAIL,
			SDLK_CALCULATOR,
			SDLK_COMPUTER,
			SDLK_AC_SEARCH,
			SDLK_AC_HOME,
			SDLK_AC_BACK,
			SDLK_AC_FORWARD,
			SDLK_AC_STOP,
			SDLK_AC_REFRESH,
			SDLK_AC_BOOKMARKS,
			SDLK_BRIGHTNESSDOWN,
			SDLK_BRIGHTNESSUP,
			SDLK_DISPLAYSWITCH,
			SDLK_KBDILLUMTOGGLE,
			SDLK_KBDILLUMDOWN,
			SDLK_KBDILLUMUP,
			SDLK_EJECT,
			SDLK_SLEEP
		}

		[Flags]
		public enum SDL_Keymod : ushort
		{
			KMOD_NONE = 0,
			KMOD_LSHIFT = 1,
			KMOD_RSHIFT = 2,
			KMOD_LCTRL = 64,
			KMOD_RCTRL = 128,
			KMOD_LALT = 256,
			KMOD_RALT = 512,
			KMOD_LGUI = 1024,
			KMOD_RGUI = 2048,
			KMOD_NUM = 4096,
			KMOD_CAPS = 8192,
			KMOD_MODE = 16384,
			KMOD_RESERVED = 32768,
			KMOD_CTRL = 192,
			KMOD_SHIFT = 3,
			KMOD_ALT = 768,
			KMOD_GUI = 3072
		}

		public struct SDL_Keysym
		{
			public SDL.SDL_Scancode scancode;

			public SDL.SDL_Keycode sym;

			public SDL.SDL_Keymod mod;

			public uint unicode;
		}

		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_NUM_SYSTEM_CURSORS
		}

		public struct SDL_Finger
		{
			public long id;

			public float x;

			public float y;

			public float pressure;
		}

		public enum SDL_JoystickPowerLevel
		{
			SDL_JOYSTICK_POWER_UNKNOWN = -1,
			SDL_JOYSTICK_POWER_EMPTY,
			SDL_JOYSTICK_POWER_LOW,
			SDL_JOYSTICK_POWER_MEDIUM,
			SDL_JOYSTICK_POWER_FULL,
			SDL_JOYSTICK_POWER_WIRED,
			SDL_JOYSTICK_POWER_MAX
		}

		public enum SDL_JoystickType
		{
			SDL_JOYSTICK_TYPE_UNKNOWN,
			SDL_JOYSTICK_TYPE_GAMECONTROLLER,
			SDL_JOYSTICK_TYPE_WHEEL,
			SDL_JOYSTICK_TYPE_ARCADE_STICK,
			SDL_JOYSTICK_TYPE_FLIGHT_STICK,
			SDL_JOYSTICK_TYPE_DANCE_PAD,
			SDL_JOYSTICK_TYPE_GUITAR,
			SDL_JOYSTICK_TYPE_DRUM_KIT,
			SDL_JOYSTICK_TYPE_ARCADE_PAD
		}

		public enum SDL_GameControllerBindType
		{
			SDL_CONTROLLER_BINDTYPE_NONE,
			SDL_CONTROLLER_BINDTYPE_BUTTON,
			SDL_CONTROLLER_BINDTYPE_AXIS,
			SDL_CONTROLLER_BINDTYPE_HAT
		}

		public enum SDL_GameControllerAxis
		{
			SDL_CONTROLLER_AXIS_INVALID = -1,
			SDL_CONTROLLER_AXIS_LEFTX,
			SDL_CONTROLLER_AXIS_LEFTY,
			SDL_CONTROLLER_AXIS_RIGHTX,
			SDL_CONTROLLER_AXIS_RIGHTY,
			SDL_CONTROLLER_AXIS_TRIGGERLEFT,
			SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
			SDL_CONTROLLER_AXIS_MAX
		}

		public enum SDL_GameControllerButton
		{
			SDL_CONTROLLER_BUTTON_INVALID = -1,
			SDL_CONTROLLER_BUTTON_A,
			SDL_CONTROLLER_BUTTON_B,
			SDL_CONTROLLER_BUTTON_X,
			SDL_CONTROLLER_BUTTON_Y,
			SDL_CONTROLLER_BUTTON_BACK,
			SDL_CONTROLLER_BUTTON_GUIDE,
			SDL_CONTROLLER_BUTTON_START,
			SDL_CONTROLLER_BUTTON_LEFTSTICK,
			SDL_CONTROLLER_BUTTON_RIGHTSTICK,
			SDL_CONTROLLER_BUTTON_LEFTSHOULDER,
			SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,
			SDL_CONTROLLER_BUTTON_DPAD_UP,
			SDL_CONTROLLER_BUTTON_DPAD_DOWN,
			SDL_CONTROLLER_BUTTON_DPAD_LEFT,
			SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
			SDL_CONTROLLER_BUTTON_MAX
		}

		public struct INTERNAL_GameControllerButtonBind_hat
		{
			public int hat;

			public int hat_mask;
		}

		[StructLayout(LayoutKind.Explicit)]
		public struct INTERNAL_GameControllerButtonBind_union
		{
			[FieldOffset(0)]
			public int button;

			[FieldOffset(0)]
			public int axis;

			[FieldOffset(0)]
			public SDL.INTERNAL_GameControllerButtonBind_hat hat;
		}

		public struct SDL_GameControllerButtonBind
		{
			public SDL.SDL_GameControllerBindType bindType;

			public SDL.INTERNAL_GameControllerButtonBind_union value;
		}

		private struct INTERNAL_SDL_GameControllerButtonBind
		{
			public int bindType;

			public int unionVal0;

			public int unionVal1;
		}

		public struct SDL_HapticDirection
		{
			public byte type;

			[FixedBuffer(typeof(int), 3)]
			public SDL.SDL_HapticDirection.<dir>e__FixedBuffer dir;

			[CompilerGenerated]
			[UnsafeValueType]
			[StructLayout(LayoutKind.Sequential, Size = 12)]
			public struct <dir>e__FixedBuffer
			{
				public int FixedElementField;
			}
		}

		public struct SDL_HapticConstant
		{
			public ushort type;

			public SDL.SDL_HapticDirection direction;

			public uint length;

			public ushort delay;

			public ushort button;

			public ushort interval;

			public short level;

			public ushort attack_length;

			public ushort attack_level;

			public ushort fade_length;

			public ushort fade_level;
		}

		public struct SDL_HapticPeriodic
		{
			public ushort type;

			public SDL.SDL_HapticDirection direction;

			public uint length;

			public ushort delay;

			public ushort button;

			public ushort interval;

			public ushort period;

			public short magnitude;

			public short offset;

			public ushort phase;

			public ushort attack_length;

			public ushort attack_level;

			public ushort fade_length;

			public ushort fade_level;
		}

		public struct SDL_HapticCondition
		{
			public ushort type;

			public SDL.SDL_HapticDirection direction;

			public uint length;

			public ushort delay;

			public ushort button;

			public ushort interval;

			[FixedBuffer(typeof(ushort), 3)]
			public SDL.SDL_HapticCondition.<right_sat>e__FixedBuffer right_sat;

			[FixedBuffer(typeof(ushort), 3)]
			public SDL.SDL_HapticCondition.<left_sat>e__FixedBuffer left_sat;

			[FixedBuffer(typeof(short), 3)]
			public SDL.SDL_HapticCondition.<right_coeff>e__FixedBuffer right_coeff;

			[FixedBuffer(typeof(short), 3)]
			public SDL.SDL_HapticCondition.<left_coeff>e__FixedBuffer left_coeff;

			[FixedBuffer(typeof(ushort), 3)]
			public SDL.SDL_HapticCondition.<deadband>e__FixedBuffer deadband;

			[FixedBuffer(typeof(short), 3)]
			public SDL.SDL_HapticCondition.<center>e__FixedBuffer center;

			[CompilerGenerated]
			[UnsafeValueType]
			[StructLayout(LayoutKind.Sequential, Size = 6)]
			public struct <right_sat>e__FixedBuffer
			{
				public ushort FixedElementField;
			}

			[CompilerGenerated]
			[UnsafeValueType]
			[StructLayout(LayoutKind.Sequential, Size = 6)]
			public struct <left_sat>e__FixedBuffer
			{
				public ushort FixedElementField;
			}

			[CompilerGenerated]
			[UnsafeValueType]
			[StructLayout(LayoutKind.Sequential, Size = 6)]
			public struct <right_coeff>e__FixedBuffer
			{
				public short FixedElementField;
			}

			[CompilerGenerated]
			[UnsafeValueType]
			[StructLayout(LayoutKind.Sequential, Size = 6)]
			public struct <left_coeff>e__FixedBuffer
			{
				public short FixedElementField;
			}

			[CompilerGenerated]
			[UnsafeValueType]
			[StructLayout(LayoutKind.Sequential, Size = 6)]
			public struct <deadband>e__FixedBuffer
			{
				public ushort FixedElementField;
			}

			[CompilerGenerated]
			[UnsafeValueType]
			[StructLayout(LayoutKind.Sequential, Size = 6)]
			public struct <center>e__FixedBuffer
			{
				public short FixedElementField;
			}
		}

		public struct SDL_HapticRamp
		{
			public ushort type;

			public SDL.SDL_HapticDirection direction;

			public uint length;

			public ushort delay;

			public ushort button;

			public ushort interval;

			public short start;

			public short end;

			public ushort attack_length;

			public ushort attack_level;

			public ushort fade_length;

			public ushort fade_level;
		}

		public struct SDL_HapticLeftRight
		{
			public ushort type;

			public uint length;

			public ushort large_magnitude;

			public ushort small_magnitude;
		}

		public struct SDL_HapticCustom
		{
			public ushort type;

			public SDL.SDL_HapticDirection direction;

			public uint length;

			public ushort delay;

			public ushort button;

			public ushort interval;

			public byte channels;

			public ushort period;

			public ushort samples;

			public IntPtr data;

			public ushort attack_length;

			public ushort attack_level;

			public ushort fade_length;

			public ushort fade_level;
		}

		[StructLayout(LayoutKind.Explicit)]
		public struct SDL_HapticEffect
		{
			[FieldOffset(0)]
			public ushort type;

			[FieldOffset(0)]
			public SDL.SDL_HapticConstant constant;

			[FieldOffset(0)]
			public SDL.SDL_HapticPeriodic periodic;

			[FieldOffset(0)]
			public SDL.SDL_HapticCondition condition;

			[FieldOffset(0)]
			public SDL.SDL_HapticRamp ramp;

			[FieldOffset(0)]
			public SDL.SDL_HapticLeftRight leftright;

			[FieldOffset(0)]
			public SDL.SDL_HapticCustom custom;
		}

		public enum SDL_SensorType
		{
			SDL_SENSOR_INVALID = -1,
			SDL_SENSOR_UNKNOWN,
			SDL_SENSOR_ACCEL,
			SDL_SENSOR_GYRO
		}

		public enum SDL_AudioStatus
		{
			SDL_AUDIO_STOPPED,
			SDL_AUDIO_PLAYING,
			SDL_AUDIO_PAUSED
		}

		public struct SDL_AudioSpec
		{
			public int freq;

			public ushort format;

			public byte channels;

			public byte silence;

			public ushort samples;

			public uint size;

			public SDL.SDL_AudioCallback callback;

			public IntPtr userdata;
		}

		[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
		public delegate void SDL_AudioCallback(IntPtr userdata, IntPtr stream, int len);

		[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
		public delegate uint SDL_TimerCallback(uint interval, IntPtr param);

		[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
		public delegate IntPtr SDL_WindowsMessageHook(IntPtr userdata, IntPtr hWnd, uint message, ulong wParam, long lParam);

		[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
		public delegate void SDL_iPhoneAnimationCallback(IntPtr p);

		public enum SDL_WinRT_DeviceFamily
		{
			SDL_WINRT_DEVICEFAMILY_UNKNOWN,
			SDL_WINRT_DEVICEFAMILY_DESKTOP,
			SDL_WINRT_DEVICEFAMILY_MOBILE,
			SDL_WINRT_DEVICEFAMILY_XBOX
		}

		public enum SDL_SYSWM_TYPE
		{
			SDL_SYSWM_UNKNOWN,
			SDL_SYSWM_WINDOWS,
			SDL_SYSWM_X11,
			SDL_SYSWM_DIRECTFB,
			SDL_SYSWM_COCOA,
			SDL_SYSWM_UIKIT,
			SDL_SYSWM_WAYLAND,
			SDL_SYSWM_MIR,
			SDL_SYSWM_WINRT,
			SDL_SYSWM_ANDROID
		}

		public struct INTERNAL_windows_wminfo
		{
			public IntPtr window;

			public IntPtr hdc;
		}

		public struct INTERNAL_winrt_wminfo
		{
			public IntPtr window;
		}

		public struct INTERNAL_x11_wminfo
		{
			public IntPtr display;

			public IntPtr window;
		}

		public struct INTERNAL_directfb_wminfo
		{
			public IntPtr dfb;

			public IntPtr window;

			public IntPtr surface;
		}

		public struct INTERNAL_cocoa_wminfo
		{
			public IntPtr window;
		}

		public struct INTERNAL_uikit_wminfo
		{
			public IntPtr window;

			public uint framebuffer;

			public uint colorbuffer;

			public uint resolveFramebuffer;
		}

		public struct INTERNAL_wayland_wminfo
		{
			public IntPtr display;

			public IntPtr surface;

			public IntPtr shell_surface;
		}

		public struct INTERNAL_mir_wminfo
		{
			public IntPtr connection;

			public IntPtr surface;
		}

		public struct INTERNAL_android_wminfo
		{
			public IntPtr window;

			public IntPtr surface;
		}

		[StructLayout(LayoutKind.Explicit)]
		public struct INTERNAL_SysWMDriverUnion
		{
			[FieldOffset(0)]
			public SDL.INTERNAL_windows_wminfo win;

			[FieldOffset(0)]
			public SDL.INTERNAL_winrt_wminfo winrt;

			[FieldOffset(0)]
			public SDL.INTERNAL_x11_wminfo x11;

			[FieldOffset(0)]
			public SDL.INTERNAL_directfb_wminfo dfb;

			[FieldOffset(0)]
			public SDL.INTERNAL_cocoa_wminfo cocoa;

			[FieldOffset(0)]
			public SDL.INTERNAL_uikit_wminfo uikit;

			[FieldOffset(0)]
			public SDL.INTERNAL_wayland_wminfo wl;

			[FieldOffset(0)]
			public SDL.INTERNAL_mir_wminfo mir;

			[FieldOffset(0)]
			public SDL.INTERNAL_android_wminfo android;
		}

		public struct SDL_SysWMinfo
		{
			public SDL.SDL_version version;

			public SDL.SDL_SYSWM_TYPE subsystem;

			public SDL.INTERNAL_SysWMDriverUnion info;
		}

		public enum SDL_PowerState
		{
			SDL_POWERSTATE_UNKNOWN,
			SDL_POWERSTATE_ON_BATTERY,
			SDL_POWERSTATE_NO_BATTERY,
			SDL_POWERSTATE_CHARGING,
			SDL_POWERSTATE_CHARGED
		}
	}
}
