// <auto-generated>
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated>

namespace Ghost.Nvtt;

public unsafe partial struct NvttOutputOptions : System.IDisposable
{
    /// <summary>
    /// From: <see cref="Api.nvttCreateOutputOptions()" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public static NvttOutputOptions* Create()
    {
        return Api.nvttCreateOutputOptions();
    }

    /// <summary>
    /// From: <see cref="Api.nvttDestroyOutputOptions(NvttOutputOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void Dispose()
    {
        Api.nvttDestroyOutputOptions((NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttResetOutputOptions(NvttOutputOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void Reset()
    {
        Api.nvttResetOutputOptions((NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttSetOutputOptionsFileName(NvttOutputOptions*, sbyte*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void SetFileName(ReadOnlySpan<byte> fileName)
    {
        fixed (byte* pfileName = fileName)
        {
            Api.nvttSetOutputOptionsFileName(
                (NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
                (sbyte*)pfileName);
        }
    }

    /// <summary>
    /// From: <see cref="Api.nvttSetOutputOptionsFileHandle(NvttOutputOptions*, void*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void SetFileHandle(void* fp)
    {
        Api.nvttSetOutputOptionsFileHandle(
            (NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            fp);
    }

    /// <summary>
    /// From: <see cref="Api.nvttSetOutputOptionsOutputHandler(NvttOutputOptions*, delegate* unmanaged[Cdecl]<int, int, int, int, int, int, void>, delegate* unmanaged[Cdecl]<void*, int, NvttBoolean>, IntPtr)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void SetOutputHandler(delegate* unmanaged[Cdecl]<int, int, int, int, int, int, void> beginImageHandler, delegate* unmanaged[Cdecl]<void*, int, NvttBoolean> outputHandler, IntPtr endImageHandler)
    {
        Api.nvttSetOutputOptionsOutputHandler(
            (NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            beginImageHandler,
            outputHandler,
            endImageHandler);
    }

    /// <summary>
    /// From: <see cref="Api.nvttSetOutputOptionsErrorHandler(NvttOutputOptions*, delegate* unmanaged[Cdecl]<NvttError, void>)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void SetErrorHandler(delegate* unmanaged[Cdecl]<NvttError, void> errorHandler)
    {
        Api.nvttSetOutputOptionsErrorHandler(
            (NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            errorHandler);
    }

    /// <summary>
    /// From: <see cref="Api.nvttSetOutputOptionsOutputHeader(NvttOutputOptions*, NvttBoolean)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void SetOutputHeader(NvttBoolean b)
    {
        Api.nvttSetOutputOptionsOutputHeader(
            (NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            b);
    }

    /// <summary>
    /// From: <see cref="Api.nvttSetOutputOptionsContainer(NvttOutputOptions*, NvttContainer)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void SetContainer(NvttContainer container)
    {
        Api.nvttSetOutputOptionsContainer(
            (NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            container);
    }

    /// <summary>
    /// From: <see cref="Api.nvttSetOutputOptionsUserVersion(NvttOutputOptions*, int)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void SetUserVersion(int version)
    {
        Api.nvttSetOutputOptionsUserVersion(
            (NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            version);
    }

    /// <summary>
    /// From: <see cref="Api.nvttSetOutputOptionsSrgbFlag(NvttOutputOptions*, NvttBoolean)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void SetSrgbFlag(NvttBoolean b)
    {
        Api.nvttSetOutputOptionsSrgbFlag(
            (NvttOutputOptions*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            b);
    }
}
