brutal/brutal.sdl/Brutal.Sdl.Mixer/Generated/SdlMixer.Handles.gen.cs
2026-10-15 14:12:02 +13:00

98 lines
3.3 KiB
C#

// <auto-generated/>
// Generated by Brutal.Sdl.Generate; do not edit by hand.
#nullable enable
using System;
using Brutal.Interop;
namespace Brutal.SdlApi.Mixer;
/// <summary>
/// A strongly-typed interop handle wrapping the opaque SDL <c>MIX_Audio</c> pointer.
/// </summary>
[InteropHandle]
public readonly unsafe partial struct MixAudio : IDisposable
{
/// <inheritdoc/>
public void Dispose()
{
// A default/zeroed handle owns nothing; forwarding it to the native destructor is at
// best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op
// on a null handle (and so a double-dispose after the value was cleared is harmless).
if (IsNull())
return;
SdlMixer.PInvoke.DestroyAudio(this);
}
}
/// <summary>
/// A strongly-typed interop handle wrapping the opaque SDL <c>MIX_AudioDecoder</c> pointer.
/// </summary>
[InteropHandle]
public readonly unsafe partial struct MixAudioDecoder : IDisposable
{
/// <inheritdoc/>
public void Dispose()
{
// A default/zeroed handle owns nothing; forwarding it to the native destructor is at
// best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op
// on a null handle (and so a double-dispose after the value was cleared is harmless).
if (IsNull())
return;
SdlMixer.PInvoke.DestroyAudioDecoder(this);
}
}
/// <summary>
/// A strongly-typed interop handle wrapping the opaque SDL <c>MIX_Group</c> pointer.
/// </summary>
[InteropHandle]
public readonly unsafe partial struct MixGroup : IDisposable
{
/// <inheritdoc/>
public void Dispose()
{
// A default/zeroed handle owns nothing; forwarding it to the native destructor is at
// best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op
// on a null handle (and so a double-dispose after the value was cleared is harmless).
if (IsNull())
return;
SdlMixer.PInvoke.DestroyGroup(this);
}
}
/// <summary>
/// A strongly-typed interop handle wrapping the opaque SDL <c>MIX_Mixer</c> pointer.
/// </summary>
[InteropHandle]
public readonly unsafe partial struct MixMixer : IDisposable
{
/// <inheritdoc/>
public void Dispose()
{
// A default/zeroed handle owns nothing; forwarding it to the native destructor is at
// best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op
// on a null handle (and so a double-dispose after the value was cleared is harmless).
if (IsNull())
return;
SdlMixer.PInvoke.DestroyMixer(this);
}
}
/// <summary>
/// A strongly-typed interop handle wrapping the opaque SDL <c>MIX_Track</c> pointer.
/// </summary>
[InteropHandle]
public readonly unsafe partial struct MixTrack : IDisposable
{
/// <inheritdoc/>
public void Dispose()
{
// A default/zeroed handle owns nothing; forwarding it to the native destructor is at
// best a wasted call and at worst undefined behaviour. Guard so Dispose is a safe no-op
// on a null handle (and so a double-dispose after the value was cleared is harmless).
if (IsNull())
return;
SdlMixer.PInvoke.DestroyTrack(this);
}
}