diff --git a/Raylib-cs/Raylib.Utils.cs b/Raylib-cs/Raylib.Utils.cs index c937259..df225f0 100644 --- a/Raylib-cs/Raylib.Utils.cs +++ b/Raylib-cs/Raylib.Utils.cs @@ -89,16 +89,6 @@ namespace Raylib_cs } } - [DllImport(nativeLibName, EntryPoint = "SetTraceLogCallback", CallingConvention = CallingConvention.Cdecl)] - private static extern void SetTraceLogCallbackInternal(TraceLogCallback callback); - - /// Set custom trace log - public static void SetTraceLogCallback(TraceLogCallback callback) - { - SetTraceLogCallbackInternal(callback); - traceLogCallback = callback; - } - /// Load file data as byte array (read) public static byte* LoadFileData(string fileName, ref uint bytesRead) { diff --git a/Raylib-cs/Raylib.cs b/Raylib-cs/Raylib.cs index f171810..a96870b 100644 --- a/Raylib-cs/Raylib.cs +++ b/Raylib-cs/Raylib.cs @@ -18,48 +18,6 @@ namespace Raylib_cs public const float DEG2RAD = MathF.PI / 180.0f; public const float RAD2DEG = 180.0f / MathF.PI; - // Callbacks to hook some internal functions - // WARNING: These callbacks are intended for advance users - - /// - /// Logging: Redirect trace log messages
- /// WARNING: This callback is intended for advance users - ///
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void TraceLogCallback(TraceLogLevel logLevel, IntPtr text, IntPtr args); - - /// - /// FileIO: Load binary data
- /// WARNING: This callback is intended for advance users - ///
- /// refers to a unsigned char * - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate IntPtr LoadFileDataCallback(string fileName, int* bytesRead); - - /// - /// FileIO: Save binary data
- /// WARNING: This callback is intended for advance users - ///
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate CBool SaveFileDataCallback(string fileName, IntPtr data, int* bytesToWrite); - - /// - /// FileIO: Load text data
- /// WARNING: This callback is intended for advance users - ///
- /// refers to a char * - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate IntPtr LoadFileTextCallback(string fileName); - - /// - /// FileIO: Save text data
- /// WARNING: This callback is intended for advance users - ///
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate CBool SaveFileTextCallback(string fileName, string text); - - private static TraceLogCallback traceLogCallback; - /// /// Returns color with alpha applied, alpha goes from 0.0f to 1.0f
/// NOTE: Added for compatability with previous versions @@ -492,19 +450,19 @@ namespace Raylib_cs /// Set custom file binary data loader [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void SetLoadFileDataCallback(LoadFileDataCallback callback); + public static extern void SetLoadFileDataCallback(delegate* unmanaged[Cdecl] callback); /// Set custom file binary data saver [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void SetSaveFileDataCallback(SaveFileDataCallback callback); + public static extern void SetSaveFileDataCallback(delegate* unmanaged[Cdecl] callback); /// Set custom file text data loader [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void SetLoadFileTextCallback(LoadFileTextCallback callback); + public static extern void SetLoadFileTextCallback(delegate* unmanaged[Cdecl] callback); /// Set custom file text data saver [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void SetSaveFileTextCallback(SaveFileTextCallback callback); + public static extern void SetSaveFileTextCallback(delegate* unmanaged[Cdecl] callback); // Files management functions