Dalamud/imgui/Dalamud.Bindings.ImGui/Generated/Structs/ImFontGlyph.cs
2025-04-06 21:08:34 +02:00

210 lines
5.5 KiB
C#

// ------------------------------------------------------------------------------
// <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>
/// Hold rendering data for one glyph.<br/>
/// (Note: some language parsers may fail to convert the 31+1 bitfield members, in this case maybe drop store a single u32 or we can rework this)<br/>
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public partial struct ImFontGlyph
{
/// <summary>
/// To be documented.
/// </summary>
public uint Colored;
/// <summary>
/// To be documented.
/// </summary>
public uint Visible;
/// <summary>
/// To be documented.
/// </summary>
public uint TextureIndex;
/// <summary>
/// To be documented.
/// </summary>
public uint Codepoint;
/// <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;
}
}
/// <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 ref uint Colored => ref Unsafe.AsRef<uint>(&Handle->Colored);
/// <summary>
/// To be documented.
/// </summary>
public ref uint Visible => ref Unsafe.AsRef<uint>(&Handle->Visible);
/// <summary>
/// To be documented.
/// </summary>
public ref uint TextureIndex => ref Unsafe.AsRef<uint>(&Handle->TextureIndex);
/// <summary>
/// To be documented.
/// </summary>
public ref uint Codepoint => ref Unsafe.AsRef<uint>(&Handle->Codepoint);
/// <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);
}
}