mirror of
https://github.com/Const-me/Whisper.git
synced 2026-10-29 11:37:00 +08:00
24 lines
964 B
C#
24 lines
964 B
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace Whisper.Internal
|
|
{
|
|
/// <summary>Unmanaged code calls this to check for cancellation</summary>
|
|
/// <remarks>Return 0 to proceed, or 1 to stop the process and return from Context.runFull method</remarks>
|
|
[UnmanagedFunctionPointer( CallingConvention.StdCall )]
|
|
public delegate int pfnShouldCancel( IntPtr pv );
|
|
|
|
/// <summary>Unmanaged code calls this to notify about the status</summary>
|
|
[UnmanagedFunctionPointer( CallingConvention.StdCall )]
|
|
public delegate int pfnCaptureStatus( IntPtr pv, eCaptureStatus status );
|
|
|
|
/// <summary>Capture callbacks for unmanaged code</summary>
|
|
public struct sCaptureCallbacks
|
|
{
|
|
/// <summary>Cancellation function pointer</summary>
|
|
public pfnShouldCancel shouldCancel;
|
|
/// <summary>Capture status function pointer</summary>
|
|
public pfnCaptureStatus captureStatus;
|
|
/// <summary>COntext pointer, only needed for C++ compatibility</summary>
|
|
public IntPtr pv;
|
|
}
|
|
} |