// ------------------------------------------------------------------------------ // // 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 ImDrawData { /// /// To be documented. /// public byte Valid; /// /// To be documented. /// public int CmdListsCount; /// /// To be documented. /// public int TotalIdxCount; /// /// To be documented. /// public int TotalVtxCount; /// /// To be documented. /// public unsafe ImDrawList** CmdLists; /// /// To be documented. /// public Vector2 DisplayPos; /// /// To be documented. /// public Vector2 DisplaySize; /// /// To be documented. /// public Vector2 FramebufferScale; /// /// To be documented. /// public unsafe ImGuiViewport* OwnerViewport; /// /// To be documented. /// public unsafe ImDrawData(bool valid = default, int cmdListsCount = default, int totalIdxCount = default, int totalVtxCount = default, ImDrawListPtrPtr cmdLists = default, Vector2 displayPos = default, Vector2 displaySize = default, Vector2 framebufferScale = default, ImGuiViewport* ownerViewport = default) { Valid = valid ? (byte)1 : (byte)0; CmdListsCount = cmdListsCount; TotalIdxCount = totalIdxCount; TotalVtxCount = totalVtxCount; CmdLists = cmdLists; DisplayPos = displayPos; DisplaySize = displaySize; FramebufferScale = framebufferScale; OwnerViewport = ownerViewport; } /// /// To be documented. /// public unsafe void Clear() { fixed (ImDrawData* @this = &this) { ImGui.ClearNative(@this); } } /// /// To be documented. /// public unsafe void DeIndexAllBuffers() { fixed (ImDrawData* @this = &this) { ImGui.DeIndexAllBuffersNative(@this); } } /// /// To be documented. /// public unsafe void Destroy() { fixed (ImDrawData* @this = &this) { ImGui.DestroyNative(@this); } } /// /// To be documented. /// public unsafe void ScaleClipRects(Vector2 fbScale) { fixed (ImDrawData* @this = &this) { ImGui.ScaleClipRectsNative(@this, fbScale); } } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImDrawDataPtr : IEquatable { public ImDrawDataPtr(ImDrawData* handle) { Handle = handle; } public ImDrawData* Handle; public bool IsNull => Handle == null; public static ImDrawDataPtr Null => new ImDrawDataPtr(null); public ImDrawData this[int index] { get => Handle[index]; set => Handle[index] = value; } public static implicit operator ImDrawDataPtr(ImDrawData* handle) => new ImDrawDataPtr(handle); public static implicit operator ImDrawData*(ImDrawDataPtr handle) => handle.Handle; public static bool operator ==(ImDrawDataPtr left, ImDrawDataPtr right) => left.Handle == right.Handle; public static bool operator !=(ImDrawDataPtr left, ImDrawDataPtr right) => left.Handle != right.Handle; public static bool operator ==(ImDrawDataPtr left, ImDrawData* right) => left.Handle == right; public static bool operator !=(ImDrawDataPtr left, ImDrawData* right) => left.Handle != right; public bool Equals(ImDrawDataPtr other) => Handle == other.Handle; /// public override bool Equals(object obj) => obj is ImDrawDataPtr handle && Equals(handle); /// public override int GetHashCode() => ((nuint)Handle).GetHashCode(); #if NET5_0_OR_GREATER private string DebuggerDisplay => string.Format("ImDrawDataPtr [0x{0}]", ((nuint)Handle).ToString("X")); #endif /// /// To be documented. /// public ref bool Valid => ref Unsafe.AsRef(&Handle->Valid); /// /// To be documented. /// public ref int CmdListsCount => ref Unsafe.AsRef(&Handle->CmdListsCount); /// /// To be documented. /// public ref int TotalIdxCount => ref Unsafe.AsRef(&Handle->TotalIdxCount); /// /// To be documented. /// public ref int TotalVtxCount => ref Unsafe.AsRef(&Handle->TotalVtxCount); /// /// To be documented. /// public ref ImDrawListPtrPtr CmdLists => ref Unsafe.AsRef(&Handle->CmdLists); /// /// To be documented. /// public ref Vector2 DisplayPos => ref Unsafe.AsRef(&Handle->DisplayPos); /// /// To be documented. /// public ref Vector2 DisplaySize => ref Unsafe.AsRef(&Handle->DisplaySize); /// /// To be documented. /// public ref Vector2 FramebufferScale => ref Unsafe.AsRef(&Handle->FramebufferScale); /// /// To be documented. /// public ref ImGuiViewportPtr OwnerViewport => ref Unsafe.AsRef(&Handle->OwnerViewport); /// /// To be documented. /// public unsafe void Clear() { ImGui.ClearNative(Handle); } /// /// To be documented. /// public unsafe void DeIndexAllBuffers() { ImGui.DeIndexAllBuffersNative(Handle); } /// /// To be documented. /// public unsafe void Destroy() { ImGui.DestroyNative(Handle); } /// /// To be documented. /// public unsafe void ScaleClipRects(Vector2 fbScale) { ImGui.ScaleClipRectsNative(Handle, fbScale); } } }