Dalamud/imgui/Dalamud.Bindings.ImPlot/Generated/Structs/ImPlotAnnotationCollection.cs
2025-04-06 21:08:34 +02:00

450 lines
12 KiB
C#

// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using HexaGen.Runtime;
using System.Numerics;
using Dalamud.Bindings.ImGui;
namespace Dalamud.Bindings.ImPlot
{
/// <summary>
/// To be documented.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public partial struct ImPlotAnnotationCollection
{
/// <summary>
/// To be documented.
/// </summary>
public ImVector<ImPlotAnnotation> Annotations;
/// <summary>
/// To be documented.
/// </summary>
public ImGuiTextBuffer TextBuffer;
/// <summary>
/// To be documented.
/// </summary>
public int Size;
/// <summary>
/// To be documented.
/// </summary>
public unsafe ImPlotAnnotationCollection(ImVector<ImPlotAnnotation> annotations = default, ImGuiTextBuffer textBuffer = default, int size = default)
{
Annotations = annotations;
TextBuffer = textBuffer;
Size = size;
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Append(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, byte* fmt)
{
fixed (ImPlotAnnotationCollection* @this = &this)
{
ImPlot.AppendNative(@this, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, fmt);
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Append(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, ref byte fmt)
{
fixed (ImPlotAnnotationCollection* @this = &this)
{
fixed (byte* pfmt = &fmt)
{
ImPlot.AppendNative(@this, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, (byte*)pfmt);
}
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Append(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, ReadOnlySpan<byte> fmt)
{
fixed (ImPlotAnnotationCollection* @this = &this)
{
fixed (byte* pfmt = fmt)
{
ImPlot.AppendNative(@this, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, (byte*)pfmt);
}
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Append(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, string fmt)
{
fixed (ImPlotAnnotationCollection* @this = &this)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (fmt != null)
{
pStrSize0 = Utils.GetByteCountUTF8(fmt);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImPlot.AppendNative(@this, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void AppendV(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, byte* fmt, nuint args)
{
fixed (ImPlotAnnotationCollection* @this = &this)
{
ImPlot.AppendVNative(@this, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, fmt, args);
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void AppendV(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, ref byte fmt, nuint args)
{
fixed (ImPlotAnnotationCollection* @this = &this)
{
fixed (byte* pfmt = &fmt)
{
ImPlot.AppendVNative(@this, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, (byte*)pfmt, args);
}
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void AppendV(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, ReadOnlySpan<byte> fmt, nuint args)
{
fixed (ImPlotAnnotationCollection* @this = &this)
{
fixed (byte* pfmt = fmt)
{
ImPlot.AppendVNative(@this, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, (byte*)pfmt, args);
}
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void AppendV(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, string fmt, nuint args)
{
fixed (ImPlotAnnotationCollection* @this = &this)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (fmt != null)
{
pStrSize0 = Utils.GetByteCountUTF8(fmt);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImPlot.AppendVNative(@this, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, pStr0, args);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Destroy()
{
fixed (ImPlotAnnotationCollection* @this = &this)
{
ImPlot.DestroyNative(@this);
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe byte* GetText(int idx)
{
fixed (ImPlotAnnotationCollection* @this = &this)
{
byte* ret = ImPlot.GetTextNative(@this, idx);
return ret;
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe string GetTextS(int idx)
{
fixed (ImPlotAnnotationCollection* @this = &this)
{
string ret = Utils.DecodeStringUTF8(ImPlot.GetTextNative(@this, idx));
return ret;
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Reset()
{
fixed (ImPlotAnnotationCollection* @this = &this)
{
ImPlot.ResetNative(@this);
}
}
}
/// <summary>
/// To be documented.
/// </summary>
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImPlotAnnotationCollectionPtr : IEquatable<ImPlotAnnotationCollectionPtr>
{
public ImPlotAnnotationCollectionPtr(ImPlotAnnotationCollection* handle) { Handle = handle; }
public ImPlotAnnotationCollection* Handle;
public bool IsNull => Handle == null;
public static ImPlotAnnotationCollectionPtr Null => new ImPlotAnnotationCollectionPtr(null);
public ImPlotAnnotationCollection this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImPlotAnnotationCollectionPtr(ImPlotAnnotationCollection* handle) => new ImPlotAnnotationCollectionPtr(handle);
public static implicit operator ImPlotAnnotationCollection*(ImPlotAnnotationCollectionPtr handle) => handle.Handle;
public static bool operator ==(ImPlotAnnotationCollectionPtr left, ImPlotAnnotationCollectionPtr right) => left.Handle == right.Handle;
public static bool operator !=(ImPlotAnnotationCollectionPtr left, ImPlotAnnotationCollectionPtr right) => left.Handle != right.Handle;
public static bool operator ==(ImPlotAnnotationCollectionPtr left, ImPlotAnnotationCollection* right) => left.Handle == right;
public static bool operator !=(ImPlotAnnotationCollectionPtr left, ImPlotAnnotationCollection* right) => left.Handle != right;
public bool Equals(ImPlotAnnotationCollectionPtr other) => Handle == other.Handle;
/// <inheritdoc/>
public override bool Equals(object obj) => obj is ImPlotAnnotationCollectionPtr handle && Equals(handle);
/// <inheritdoc/>
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImPlotAnnotationCollectionPtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
/// <summary>
/// To be documented.
/// </summary>
public ref ImVector<ImPlotAnnotation> Annotations => ref Unsafe.AsRef<ImVector<ImPlotAnnotation>>(&Handle->Annotations);
/// <summary>
/// To be documented.
/// </summary>
public ref ImGuiTextBuffer TextBuffer => ref Unsafe.AsRef<ImGuiTextBuffer>(&Handle->TextBuffer);
/// <summary>
/// To be documented.
/// </summary>
public ref int Size => ref Unsafe.AsRef<int>(&Handle->Size);
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Append(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, byte* fmt)
{
ImPlot.AppendNative(Handle, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, fmt);
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Append(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, ref byte fmt)
{
fixed (byte* pfmt = &fmt)
{
ImPlot.AppendNative(Handle, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, (byte*)pfmt);
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Append(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, ReadOnlySpan<byte> fmt)
{
fixed (byte* pfmt = fmt)
{
ImPlot.AppendNative(Handle, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, (byte*)pfmt);
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Append(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, string fmt)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (fmt != null)
{
pStrSize0 = Utils.GetByteCountUTF8(fmt);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImPlot.AppendNative(Handle, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void AppendV(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, byte* fmt, nuint args)
{
ImPlot.AppendVNative(Handle, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, fmt, args);
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void AppendV(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, ref byte fmt, nuint args)
{
fixed (byte* pfmt = &fmt)
{
ImPlot.AppendVNative(Handle, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, (byte*)pfmt, args);
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void AppendV(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, ReadOnlySpan<byte> fmt, nuint args)
{
fixed (byte* pfmt = fmt)
{
ImPlot.AppendVNative(Handle, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, (byte*)pfmt, args);
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void AppendV(Vector2 pos, Vector2 off, uint bg, uint fg, bool clamp, string fmt, nuint args)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (fmt != null)
{
pStrSize0 = Utils.GetByteCountUTF8(fmt);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImPlot.AppendVNative(Handle, pos, off, bg, fg, clamp ? (byte)1 : (byte)0, pStr0, args);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Destroy()
{
ImPlot.DestroyNative(Handle);
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe byte* GetText(int idx)
{
byte* ret = ImPlot.GetTextNative(Handle, idx);
return ret;
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe string GetTextS(int idx)
{
string ret = Utils.DecodeStringUTF8(ImPlot.GetTextNative(Handle, idx));
return ret;
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Reset()
{
ImPlot.ResetNative(Handle);
}
}
}