move bindings around

This commit is contained in:
goaaats 2025-04-06 21:08:34 +02:00
parent 1bce618684
commit b5a8bfe399
546 changed files with 8 additions and 8 deletions

View file

@ -0,0 +1,192 @@
// ------------------------------------------------------------------------------
// <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;
namespace Dalamud.Bindings.ImGui
{
/// <summary>
/// Typically, 1 command = 1 GPU draw call (unless command is a callback)<br/>
/// - VtxOffset: When 'io.BackendFlags &amp; ImGuiBackendFlags_RendererHasVtxOffset' is enabled,<br/>
/// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.<br/>
/// Backends made for &lt;1.71. will typically ignore the VtxOffset fields.<br/>
/// - The ClipRectTextureIdVtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).<br/>
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public partial struct ImDrawCmd
{
/// <summary>
/// To be documented.
/// </summary>
public Vector4 ClipRect;
/// <summary>
/// To be documented.
/// </summary>
public ImTextureID TextureId;
/// <summary>
/// To be documented.
/// </summary>
public uint VtxOffset;
/// <summary>
/// To be documented.
/// </summary>
public uint IdxOffset;
/// <summary>
/// To be documented.
/// </summary>
public uint ElemCount;
/// <summary>
/// To be documented.
/// </summary>
public unsafe void* UserCallback;
/// <summary>
/// To be documented.
/// </summary>
public unsafe void* UserCallbackData;
/// <summary>
/// To be documented.
/// </summary>
public unsafe ImDrawCmd(Vector4 clipRect = default, ImTextureID textureId = default, uint vtxOffset = default, uint idxOffset = default, uint elemCount = default, ImDrawCallback userCallback = default, void* userCallbackData = default)
{
ClipRect = clipRect;
TextureId = textureId;
VtxOffset = vtxOffset;
IdxOffset = idxOffset;
ElemCount = elemCount;
UserCallback = (void*)Marshal.GetFunctionPointerForDelegate(userCallback);
UserCallbackData = userCallbackData;
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Destroy()
{
fixed (ImDrawCmd* @this = &this)
{
ImGui.DestroyNative(@this);
}
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe ImTextureID GetTexID()
{
fixed (ImDrawCmd* @this = &this)
{
ImTextureID ret = ImGui.GetTexIDNative(@this);
return ret;
}
}
}
/// <summary>
/// To be documented.
/// </summary>
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImDrawCmdPtr : IEquatable<ImDrawCmdPtr>
{
public ImDrawCmdPtr(ImDrawCmd* handle) { Handle = handle; }
public ImDrawCmd* Handle;
public bool IsNull => Handle == null;
public static ImDrawCmdPtr Null => new ImDrawCmdPtr(null);
public ImDrawCmd this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImDrawCmdPtr(ImDrawCmd* handle) => new ImDrawCmdPtr(handle);
public static implicit operator ImDrawCmd*(ImDrawCmdPtr handle) => handle.Handle;
public static bool operator ==(ImDrawCmdPtr left, ImDrawCmdPtr right) => left.Handle == right.Handle;
public static bool operator !=(ImDrawCmdPtr left, ImDrawCmdPtr right) => left.Handle != right.Handle;
public static bool operator ==(ImDrawCmdPtr left, ImDrawCmd* right) => left.Handle == right;
public static bool operator !=(ImDrawCmdPtr left, ImDrawCmd* right) => left.Handle != right;
public bool Equals(ImDrawCmdPtr other) => Handle == other.Handle;
/// <inheritdoc/>
public override bool Equals(object obj) => obj is ImDrawCmdPtr handle && Equals(handle);
/// <inheritdoc/>
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImDrawCmdPtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
/// <summary>
/// To be documented.
/// </summary>
public ref Vector4 ClipRect => ref Unsafe.AsRef<Vector4>(&Handle->ClipRect);
/// <summary>
/// To be documented.
/// </summary>
public ref ImTextureID TextureId => ref Unsafe.AsRef<ImTextureID>(&Handle->TextureId);
/// <summary>
/// To be documented.
/// </summary>
public ref uint VtxOffset => ref Unsafe.AsRef<uint>(&Handle->VtxOffset);
/// <summary>
/// To be documented.
/// </summary>
public ref uint IdxOffset => ref Unsafe.AsRef<uint>(&Handle->IdxOffset);
/// <summary>
/// To be documented.
/// </summary>
public ref uint ElemCount => ref Unsafe.AsRef<uint>(&Handle->ElemCount);
/// <summary>
/// To be documented.
/// </summary>
public void* UserCallback { get => Handle->UserCallback; set => Handle->UserCallback = value; }
/// <summary>
/// To be documented.
/// </summary>
public void* UserCallbackData { get => Handle->UserCallbackData; set => Handle->UserCallbackData = value; }
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Destroy()
{
ImGui.DestroyNative(Handle);
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe ImTextureID GetTexID()
{
ImTextureID ret = ImGui.GetTexIDNative(Handle);
return ret;
}
}
}