// ------------------------------------------------------------------------------ // // 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 ImFontAtlasCustomRect { /// /// To be documented. /// public ushort Width; /// /// To be documented. /// public ushort Height; /// /// To be documented. /// public ushort X; /// /// To be documented. /// public ushort Y; public uint RawBits0; /// /// To be documented. /// public float GlyphAdvanceX; /// /// To be documented. /// public Vector2 GlyphOffset; /// /// To be documented. /// public unsafe ImFont* Font; /// /// To be documented. /// public unsafe ImFontAtlasCustomRect(ushort width = default, ushort height = default, ushort x = default, ushort y = default, uint reserved = default, uint textureIndex = default, uint glyphId = default, float glyphAdvanceX = default, Vector2 glyphOffset = default, ImFontPtr font = default) { Width = width; Height = height; X = x; Y = y; Reserved = reserved; TextureIndex = textureIndex; GlyphID = glyphId; GlyphAdvanceX = glyphAdvanceX; GlyphOffset = glyphOffset; Font = font; } public uint Reserved { get => Bitfield.Get(RawBits0, 0, 2); set => Bitfield.Set(ref RawBits0, value, 0, 2); } public uint TextureIndex { get => Bitfield.Get(RawBits0, 2, 9); set => Bitfield.Set(ref RawBits0, value, 2, 9); } public uint GlyphID { get => Bitfield.Get(RawBits0, 11, 21); set => Bitfield.Set(ref RawBits0, value, 11, 21); } /// /// To be documented. /// public unsafe void Destroy() { fixed (ImFontAtlasCustomRect* @this = &this) { ImGui.DestroyNative(@this); } } /// /// To be documented. /// public unsafe bool IsPacked() { fixed (ImFontAtlasCustomRect* @this = &this) { byte ret = ImGui.IsPackedNative(@this); return ret != 0; } } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImFontAtlasCustomRectPtr : IEquatable { public ImFontAtlasCustomRectPtr(ImFontAtlasCustomRect* handle) { Handle = handle; } public ImFontAtlasCustomRect* Handle; public bool IsNull => Handle == null; public static ImFontAtlasCustomRectPtr Null => new ImFontAtlasCustomRectPtr(null); public ImFontAtlasCustomRect this[int index] { get => Handle[index]; set => Handle[index] = value; } public static implicit operator ImFontAtlasCustomRectPtr(ImFontAtlasCustomRect* handle) => new ImFontAtlasCustomRectPtr(handle); public static implicit operator ImFontAtlasCustomRect*(ImFontAtlasCustomRectPtr handle) => handle.Handle; public static bool operator ==(ImFontAtlasCustomRectPtr left, ImFontAtlasCustomRectPtr right) => left.Handle == right.Handle; public static bool operator !=(ImFontAtlasCustomRectPtr left, ImFontAtlasCustomRectPtr right) => left.Handle != right.Handle; public static bool operator ==(ImFontAtlasCustomRectPtr left, ImFontAtlasCustomRect* right) => left.Handle == right; public static bool operator !=(ImFontAtlasCustomRectPtr left, ImFontAtlasCustomRect* right) => left.Handle != right; public bool Equals(ImFontAtlasCustomRectPtr other) => Handle == other.Handle; /// public override bool Equals(object obj) => obj is ImFontAtlasCustomRectPtr handle && Equals(handle); /// public override int GetHashCode() => ((nuint)Handle).GetHashCode(); #if NET5_0_OR_GREATER private string DebuggerDisplay => string.Format("ImFontAtlasCustomRectPtr [0x{0}]", ((nuint)Handle).ToString("X")); #endif /// /// To be documented. /// public ref ushort Width => ref Unsafe.AsRef(&Handle->Width); /// /// To be documented. /// public ref ushort Height => ref Unsafe.AsRef(&Handle->Height); /// /// To be documented. /// public ref ushort X => ref Unsafe.AsRef(&Handle->X); /// /// To be documented. /// public ref ushort Y => ref Unsafe.AsRef(&Handle->Y); /// /// To be documented. /// public uint Reserved { get => Handle->Reserved; set => Handle->Reserved = value; } /// /// To be documented. /// public uint TextureIndex { get => Handle->TextureIndex; set => Handle->TextureIndex = value; } /// /// To be documented. /// public uint GlyphID { get => Handle->GlyphID; set => Handle->GlyphID = value; } /// /// To be documented. /// public ref float GlyphAdvanceX => ref Unsafe.AsRef(&Handle->GlyphAdvanceX); /// /// To be documented. /// public ref Vector2 GlyphOffset => ref Unsafe.AsRef(&Handle->GlyphOffset); /// /// To be documented. /// public ref ImFontPtr Font => ref Unsafe.AsRef(&Handle->Font); /// /// To be documented. /// public unsafe void Destroy() { ImGui.DestroyNative(Handle); } /// /// To be documented. /// public unsafe bool IsPacked() { byte ret = ImGui.IsPackedNative(Handle); return ret != 0; } } }