Dalamud/imgui/Dalamud.Bindings.ImGui/Generated/Structs/ImFontGlyph.cs
2025-07-20 01:24:17 +02:00

198 lines
5.5 KiB
C#
Generated

// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using HexaGen.Runtime;
using System.Numerics;
namespace Dalamud.Bindings.ImGui
{
/// <summary>
/// To be documented.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public partial struct ImFontGlyph
{
public uint RawBits0;
/// <summary>
/// To be documented.
/// </summary>
public float AdvanceX;
/// <summary>
/// To be documented.
/// </summary>
public float X0;
/// <summary>
/// To be documented.
/// </summary>
public float Y0;
/// <summary>
/// To be documented.
/// </summary>
public float X1;
/// <summary>
/// To be documented.
/// </summary>
public float Y1;
/// <summary>
/// To be documented.
/// </summary>
public float U0;
/// <summary>
/// To be documented.
/// </summary>
public float V0;
/// <summary>
/// To be documented.
/// </summary>
public float U1;
/// <summary>
/// To be documented.
/// </summary>
public float V1;
/// <summary>
/// To be documented.
/// </summary>
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); }
}
/// <summary>
/// To be documented.
/// </summary>
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImFontGlyphPtr : IEquatable<ImFontGlyphPtr>
{
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;
/// <inheritdoc/>
public override bool Equals(object obj) => obj is ImFontGlyphPtr handle && Equals(handle);
/// <inheritdoc/>
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
/// <summary>
/// To be documented.
/// </summary>
public uint Colored { get => Handle->Colored; set => Handle->Colored = value; }
/// <summary>
/// To be documented.
/// </summary>
public uint Visible { get => Handle->Visible; set => Handle->Visible = value; }
/// <summary>
/// To be documented.
/// </summary>
public uint TextureIndex { get => Handle->TextureIndex; set => Handle->TextureIndex = value; }
/// <summary>
/// To be documented.
/// </summary>
public uint Codepoint { get => Handle->Codepoint; set => Handle->Codepoint = value; }
/// <summary>
/// To be documented.
/// </summary>
public ref float AdvanceX => ref Unsafe.AsRef<float>(&Handle->AdvanceX);
/// <summary>
/// To be documented.
/// </summary>
public ref float X0 => ref Unsafe.AsRef<float>(&Handle->X0);
/// <summary>
/// To be documented.
/// </summary>
public ref float Y0 => ref Unsafe.AsRef<float>(&Handle->Y0);
/// <summary>
/// To be documented.
/// </summary>
public ref float X1 => ref Unsafe.AsRef<float>(&Handle->X1);
/// <summary>
/// To be documented.
/// </summary>
public ref float Y1 => ref Unsafe.AsRef<float>(&Handle->Y1);
/// <summary>
/// To be documented.
/// </summary>
public ref float U0 => ref Unsafe.AsRef<float>(&Handle->U0);
/// <summary>
/// To be documented.
/// </summary>
public ref float V0 => ref Unsafe.AsRef<float>(&Handle->V0);
/// <summary>
/// To be documented.
/// </summary>
public ref float U1 => ref Unsafe.AsRef<float>(&Handle->U1);
/// <summary>
/// To be documented.
/// </summary>
public ref float V1 => ref Unsafe.AsRef<float>(&Handle->V1);
}
}