// ------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using HexaGen.Runtime; using System.Numerics; namespace Dalamud.Bindings.ImGui { /// /// To be documented. /// [StructLayout(LayoutKind.Sequential)] public partial struct ImDrawCmd { /// /// To be documented. /// public Vector4 ClipRect; /// /// To be documented. /// public ImTextureID TextureId; /// /// To be documented. /// public uint VtxOffset; /// /// To be documented. /// public uint IdxOffset; /// /// To be documented. /// public uint ElemCount; /// /// To be documented. /// public unsafe void* UserCallback; /// /// To be documented. /// public unsafe void* UserCallbackData; /// /// To be documented. /// 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; } /// /// To be documented. /// public unsafe void Destroy() { fixed (ImDrawCmd* @this = &this) { ImGui.DestroyNative(@this); } } /// /// To be documented. /// public unsafe ImTextureID GetTexID() { fixed (ImDrawCmd* @this = &this) { ImTextureID ret = ImGui.GetTexIDNative(@this); return ret; } } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImDrawCmdPtr : IEquatable { 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; /// public override bool Equals(object obj) => obj is ImDrawCmdPtr handle && Equals(handle); /// 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 /// /// To be documented. /// public ref Vector4 ClipRect => ref Unsafe.AsRef(&Handle->ClipRect); /// /// To be documented. /// public ref ImTextureID TextureId => ref Unsafe.AsRef(&Handle->TextureId); /// /// To be documented. /// public ref uint VtxOffset => ref Unsafe.AsRef(&Handle->VtxOffset); /// /// To be documented. /// public ref uint IdxOffset => ref Unsafe.AsRef(&Handle->IdxOffset); /// /// To be documented. /// public ref uint ElemCount => ref Unsafe.AsRef(&Handle->ElemCount); /// /// To be documented. /// public void* UserCallback { get => Handle->UserCallback; set => Handle->UserCallback = value; } /// /// To be documented. /// public void* UserCallbackData { get => Handle->UserCallbackData; set => Handle->UserCallbackData = value; } /// /// To be documented. /// public unsafe void Destroy() { ImGui.DestroyNative(Handle); } /// /// To be documented. /// public unsafe ImTextureID GetTexID() { ImTextureID ret = ImGui.GetTexIDNative(Handle); return ret; } } }