// ------------------------------------------------------------------------------ // // 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 ImFontGlyph { public uint RawBits0; /// /// To be documented. /// public float AdvanceX; /// /// To be documented. /// public float X0; /// /// To be documented. /// public float Y0; /// /// To be documented. /// public float X1; /// /// To be documented. /// public float Y1; /// /// To be documented. /// public float U0; /// /// To be documented. /// public float V0; /// /// To be documented. /// public float U1; /// /// To be documented. /// public float V1; /// /// To be documented. /// public unsafe ImFontGlyph(uint colored = default, uint visible = default, uint textureIndex = default, uint codepoint = default, float advanceX = default, float x0 = default, float y0 = default, float x1 = default, float y1 = default, float u0 = default, float v0 = default, float u1 = default, float v1 = default) { Colored = colored; Visible = visible; TextureIndex = textureIndex; Codepoint = codepoint; AdvanceX = advanceX; X0 = x0; Y0 = y0; X1 = x1; Y1 = y1; U0 = u0; V0 = v0; U1 = u1; V1 = v1; } public uint Colored { get => Bitfield.Get(RawBits0, 0, 1); set => Bitfield.Set(ref RawBits0, value, 0, 1); } public uint Visible { get => Bitfield.Get(RawBits0, 1, 1); set => Bitfield.Set(ref RawBits0, value, 1, 1); } public uint TextureIndex { get => Bitfield.Get(RawBits0, 2, 9); set => Bitfield.Set(ref RawBits0, value, 2, 9); } public uint Codepoint { get => Bitfield.Get(RawBits0, 11, 21); set => Bitfield.Set(ref RawBits0, value, 11, 21); } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImFontGlyphPtr : IEquatable { public ImFontGlyphPtr(ImFontGlyph* handle) { Handle = handle; } public ImFontGlyph* Handle; public bool IsNull => Handle == null; public static ImFontGlyphPtr Null => new ImFontGlyphPtr(null); public ImFontGlyph this[int index] { get => Handle[index]; set => Handle[index] = value; } public static implicit operator ImFontGlyphPtr(ImFontGlyph* handle) => new ImFontGlyphPtr(handle); public static implicit operator ImFontGlyph*(ImFontGlyphPtr handle) => handle.Handle; public static bool operator ==(ImFontGlyphPtr left, ImFontGlyphPtr right) => left.Handle == right.Handle; public static bool operator !=(ImFontGlyphPtr left, ImFontGlyphPtr right) => left.Handle != right.Handle; public static bool operator ==(ImFontGlyphPtr left, ImFontGlyph* right) => left.Handle == right; public static bool operator !=(ImFontGlyphPtr left, ImFontGlyph* right) => left.Handle != right; public bool Equals(ImFontGlyphPtr other) => Handle == other.Handle; /// public override bool Equals(object obj) => obj is ImFontGlyphPtr handle && Equals(handle); /// public override int GetHashCode() => ((nuint)Handle).GetHashCode(); #if NET5_0_OR_GREATER private string DebuggerDisplay => string.Format("ImFontGlyphPtr [0x{0}]", ((nuint)Handle).ToString("X")); #endif /// /// To be documented. /// public uint Colored { get => Handle->Colored; set => Handle->Colored = value; } /// /// To be documented. /// public uint Visible { get => Handle->Visible; set => Handle->Visible = value; } /// /// To be documented. /// public uint TextureIndex { get => Handle->TextureIndex; set => Handle->TextureIndex = value; } /// /// To be documented. /// public uint Codepoint { get => Handle->Codepoint; set => Handle->Codepoint = value; } /// /// To be documented. /// public ref float AdvanceX => ref Unsafe.AsRef(&Handle->AdvanceX); /// /// To be documented. /// public ref float X0 => ref Unsafe.AsRef(&Handle->X0); /// /// To be documented. /// public ref float Y0 => ref Unsafe.AsRef(&Handle->Y0); /// /// To be documented. /// public ref float X1 => ref Unsafe.AsRef(&Handle->X1); /// /// To be documented. /// public ref float Y1 => ref Unsafe.AsRef(&Handle->Y1); /// /// To be documented. /// public ref float U0 => ref Unsafe.AsRef(&Handle->U0); /// /// To be documented. /// public ref float V0 => ref Unsafe.AsRef(&Handle->V0); /// /// To be documented. /// public ref float U1 => ref Unsafe.AsRef(&Handle->U1); /// /// To be documented. /// public ref float V1 => ref Unsafe.AsRef(&Handle->V1); } }