mirror of https://github.com/ppy/SDL3-CS.git
114 lines
5.4 KiB
C#
114 lines
5.4 KiB
C#
/*
|
|
<auto-generated/>
|
|
C# bindings for Simple DirectMedia Layer.
|
|
Original copyright notice of input files:
|
|
|
|
Simple DirectMedia Layer
|
|
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
|
|
|
This software is provided 'as-is', without any express or implied
|
|
warranty. In no event will the authors be held liable for any damages
|
|
arising from the use of this software.
|
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
including commercial applications, and to alter it and redistribute it
|
|
freely, subject to the following restrictions:
|
|
|
|
1. The origin of this software must not be misrepresented; you must not
|
|
claim that you wrote the original software. If you use this software
|
|
in a product, an acknowledgment in the product documentation would be
|
|
appreciated but is not required.
|
|
2. Altered source versions must be plainly marked as such, and must not be
|
|
misrepresented as being the original software.
|
|
3. This notice may not be removed or altered from any source distribution.
|
|
*/
|
|
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace SDL
|
|
{
|
|
public enum SDL_LogCategory
|
|
{
|
|
SDL_LOG_CATEGORY_APPLICATION,
|
|
SDL_LOG_CATEGORY_ERROR,
|
|
SDL_LOG_CATEGORY_ASSERT,
|
|
SDL_LOG_CATEGORY_SYSTEM,
|
|
SDL_LOG_CATEGORY_AUDIO,
|
|
SDL_LOG_CATEGORY_VIDEO,
|
|
SDL_LOG_CATEGORY_RENDER,
|
|
SDL_LOG_CATEGORY_INPUT,
|
|
SDL_LOG_CATEGORY_TEST,
|
|
SDL_LOG_CATEGORY_RESERVED1,
|
|
SDL_LOG_CATEGORY_RESERVED2,
|
|
SDL_LOG_CATEGORY_RESERVED3,
|
|
SDL_LOG_CATEGORY_RESERVED4,
|
|
SDL_LOG_CATEGORY_RESERVED5,
|
|
SDL_LOG_CATEGORY_RESERVED6,
|
|
SDL_LOG_CATEGORY_RESERVED7,
|
|
SDL_LOG_CATEGORY_RESERVED8,
|
|
SDL_LOG_CATEGORY_RESERVED9,
|
|
SDL_LOG_CATEGORY_RESERVED10,
|
|
SDL_LOG_CATEGORY_CUSTOM,
|
|
}
|
|
|
|
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,
|
|
}
|
|
|
|
public static unsafe partial class SDL3
|
|
{
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_SetLogPriorities(SDL_LogPriority priority);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_SetLogPriority(int category, SDL_LogPriority priority);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_LogPriority SDL_GetLogPriority(int category);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_ResetLogPriorities();
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_Log([NativeTypeName("const char *")] byte* fmt, __arglist);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_LogVerbose(int category, [NativeTypeName("const char *")] byte* fmt, __arglist);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_LogDebug(int category, [NativeTypeName("const char *")] byte* fmt, __arglist);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_LogInfo(int category, [NativeTypeName("const char *")] byte* fmt, __arglist);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_LogWarn(int category, [NativeTypeName("const char *")] byte* fmt, __arglist);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_LogError(int category, [NativeTypeName("const char *")] byte* fmt, __arglist);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_LogCritical(int category, [NativeTypeName("const char *")] byte* fmt, __arglist);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_LogMessage(int category, SDL_LogPriority priority, [NativeTypeName("const char *")] byte* fmt, __arglist);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_LogMessageV(int category, SDL_LogPriority priority, [NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] byte* ap);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_GetLogOutputFunction([NativeTypeName("SDL_LogOutputFunction *")] delegate* unmanaged[Cdecl]<IntPtr, SDL_LogCategory, SDL_LogPriority, byte*, void>* callback, [NativeTypeName("void **")] IntPtr* userdata);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_SetLogOutputFunction([NativeTypeName("SDL_LogOutputFunction")] delegate* unmanaged[Cdecl]<IntPtr, SDL_LogCategory, SDL_LogPriority, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
|
}
|
|
}
|