// ------------------------------------------------------------------------------ // // 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 ImGuiTextRange { /// /// To be documented. /// public unsafe byte* B; /// /// To be documented. /// public unsafe byte* E; /// /// To be documented. /// public unsafe ImGuiTextRange(byte* b = default, byte* e = default) { B = b; E = e; } /// /// To be documented. /// public unsafe void Destroy() { fixed (ImGuiTextRange* @this = &this) { ImGui.DestroyNative(@this); } } /// /// To be documented. /// public unsafe bool empty() { fixed (ImGuiTextRange* @this = &this) { byte ret = ImGui.emptyNative(@this); return ret != 0; } } /// /// To be documented. /// public unsafe void split(byte separator, ImVector* output) { fixed (ImGuiTextRange* @this = &this) { ImGui.splitNative(@this, separator, output); } } /// /// To be documented. /// public unsafe void split(byte separator, ref ImVector output) { fixed (ImGuiTextRange* @this = &this) { fixed (ImVector* poutput = &output) { ImGui.splitNative(@this, separator, (ImVector*)poutput); } } } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImGuiTextRangePtr : IEquatable { public ImGuiTextRangePtr(ImGuiTextRange* handle) { Handle = handle; } public ImGuiTextRange* Handle; public bool IsNull => Handle == null; public static ImGuiTextRangePtr Null => new ImGuiTextRangePtr(null); public ImGuiTextRange this[int index] { get => Handle[index]; set => Handle[index] = value; } public static implicit operator ImGuiTextRangePtr(ImGuiTextRange* handle) => new ImGuiTextRangePtr(handle); public static implicit operator ImGuiTextRange*(ImGuiTextRangePtr handle) => handle.Handle; public static bool operator ==(ImGuiTextRangePtr left, ImGuiTextRangePtr right) => left.Handle == right.Handle; public static bool operator !=(ImGuiTextRangePtr left, ImGuiTextRangePtr right) => left.Handle != right.Handle; public static bool operator ==(ImGuiTextRangePtr left, ImGuiTextRange* right) => left.Handle == right; public static bool operator !=(ImGuiTextRangePtr left, ImGuiTextRange* right) => left.Handle != right; public bool Equals(ImGuiTextRangePtr other) => Handle == other.Handle; /// public override bool Equals(object obj) => obj is ImGuiTextRangePtr handle && Equals(handle); /// public override int GetHashCode() => ((nuint)Handle).GetHashCode(); #if NET5_0_OR_GREATER private string DebuggerDisplay => string.Format("ImGuiTextRangePtr [0x{0}]", ((nuint)Handle).ToString("X")); #endif /// /// To be documented. /// public byte* B { get => Handle->B; set => Handle->B = value; } /// /// To be documented. /// public byte* E { get => Handle->E; set => Handle->E = value; } /// /// To be documented. /// public unsafe void Destroy() { ImGui.DestroyNative(Handle); } /// /// To be documented. /// public unsafe bool empty() { byte ret = ImGui.emptyNative(Handle); return ret != 0; } /// /// To be documented. /// public unsafe void split(byte separator, ImVector* output) { ImGui.splitNative(Handle, separator, output); } /// /// To be documented. /// public unsafe void split(byte separator, ref ImVector output) { fixed (ImVector* poutput = &output) { ImGui.splitNative(Handle, separator, (ImVector*)poutput); } } } }