Add calling convention attributes to unmanaged function pointers.
This commit is contained in:
parent
8e8c86b2c1
commit
50c37e58fc
@ -12,18 +12,23 @@ namespace ReFuel.Stb
|
|||||||
/// <param name="buffer">C array to read into.</param>
|
/// <param name="buffer">C array to read into.</param>
|
||||||
/// <param name="count">Size of the C array in bytes.</param>
|
/// <param name="count">Size of the C array in bytes.</param>
|
||||||
/// <returns>The number of bytes read from the stream.</returns>
|
/// <returns>The number of bytes read from the stream.</returns>
|
||||||
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
public unsafe delegate int StbiReadProc(void *userdata, byte* buffer, int count);
|
public unsafe delegate int StbiReadProc(void *userdata, byte* buffer, int count);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pointer to STBI stream skip function.
|
/// Pointer to STBI stream skip function.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userdata">User provided userdata pointer.</param>
|
/// <param name="userdata">User provided userdata pointer.</param>
|
||||||
/// <param name="count">Number of bytes to skip.</param>
|
/// <param name="count">Number of bytes to skip.</param>
|
||||||
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
public unsafe delegate void StbiSkipProc(void *userdata, int count);
|
public unsafe delegate void StbiSkipProc(void *userdata, int count);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pointer to STBI stream end of file function.
|
/// Pointer to STBI stream end of file function.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userdata">User provided userdata pointer.</param>
|
/// <param name="userdata">User provided userdata pointer.</param>
|
||||||
/// <returns>Non-zero value if the end of the stream has been reached.</returns>
|
/// <returns>Non-zero value if the end of the stream has been reached.</returns>
|
||||||
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
public unsafe delegate int StbiEofProc(void *userdata);
|
public unsafe delegate int StbiEofProc(void *userdata);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -9,6 +9,7 @@ namespace ReFuel.Stb.Native
|
|||||||
/// <param name="context">User provided context pointer.</param>
|
/// <param name="context">User provided context pointer.</param>
|
||||||
/// <param name="data">C Array of data to write.</param>
|
/// <param name="data">C Array of data to write.</param>
|
||||||
/// <param name="size">Size of the C array in bytes.</param>
|
/// <param name="size">Size of the C array in bytes.</param>
|
||||||
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
public unsafe delegate void StbiWriteProc(void* context, void* data, int size);
|
public unsafe delegate void StbiWriteProc(void* context, void* data, int size);
|
||||||
|
|
||||||
public unsafe partial class Stbi
|
public unsafe partial class Stbi
|
||||||
|
Loading…
Reference in New Issue
Block a user