brutal/Brutal.ImGui/Generated-Internal/Structs/ImFontAtlasRectEntry.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

179 lines
8.8 KiB
C#

// <auto-generated/>
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
namespace Brutal.ImGuiApi.Internal
{
/// <summary>
/// <para>
/// Packed rectangle lookup entry
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L146">imgui_internal.h:146</see>
/// <br/><c>struct ImFontAtlasRectEntry</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// ImDrawList/ImFontAtlas
/// </para>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 4)]
public partial struct ImFontAtlasRectEntry
{
/// <summary>
/// <para>
/// When Used: ImFontAtlasRectId -&gt; into Rects[]. When unused: index to next unused RectsIndex[] slot to
/// consume free-list.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L4046">imgui_internal.h:4046</see>
/// <br/><c>int TargetIndex : 20</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles)
/// User are returned ImFontAtlasRectId values which are meant to be persistent.
/// We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId.
/// RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code.
/// Having this also makes it easier to e.g. sort rectangles during repack.
/// </code>
/// </remarks>
[FieldOffset(0)]
public int TargetIndex;
/// <summary>
/// <para>
/// Increased each time the entry is reused for a new rectangle.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L4047">imgui_internal.h:4047</see>
/// <br/><c>int Generation : 10</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles)
/// User are returned ImFontAtlasRectId values which are meant to be persistent.
/// We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId.
/// RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code.
/// Having this also makes it easier to e.g. sort rectangles during repack.
/// </code>
/// </remarks>
[FieldOffset(2)]
public int Generation;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L4048">imgui_internal.h:4048</see>
/// <br/><c>unsigned int IsUsed : 1</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles)
/// User are returned ImFontAtlasRectId values which are meant to be persistent.
/// We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId.
/// RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code.
/// Having this also makes it easier to e.g. sort rectangles during repack.
/// </code>
/// </remarks>
[FieldOffset(3)]
public uint IsUsed;
}
/// <summary>
/// <para>
/// Packed rectangle lookup entry
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L146">imgui_internal.h:146</see>
/// <br/><c>struct ImFontAtlasRectEntry</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// ImDrawList/ImFontAtlas
/// </para>
/// </remarks>
public unsafe partial struct ImFontAtlasRectEntryPtr(ImFontAtlasRectEntry* ptr) : INullable
{
private ImFontAtlasRectEntry* _ptr = ptr;
public ImFontAtlasRectEntry* Ptr => _ptr;
public bool IsNull() => _ptr is null;
public static implicit operator ImFontAtlasRectEntryPtr(ImFontAtlasRectEntry* ptr) => new(ptr);
public static implicit operator ImFontAtlasRectEntry*(ImFontAtlasRectEntryPtr wrapper) => wrapper.Ptr;
/// <summary>
/// <para>
/// When Used: ImFontAtlasRectId -&gt; into Rects[]. When unused: index to next unused RectsIndex[] slot to
/// consume free-list.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L4046">imgui_internal.h:4046</see>
/// <br/><c>int TargetIndex : 20</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles)
/// User are returned ImFontAtlasRectId values which are meant to be persistent.
/// We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId.
/// RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code.
/// Having this also makes it easier to e.g. sort rectangles during repack.
/// </code>
/// </remarks>
public ref int TargetIndex => ref Unsafe.AsRef<int>(&_ptr->TargetIndex);
/// <summary>
/// <para>
/// Increased each time the entry is reused for a new rectangle.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L4047">imgui_internal.h:4047</see>
/// <br/><c>int Generation : 10</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles)
/// User are returned ImFontAtlasRectId values which are meant to be persistent.
/// We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId.
/// RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code.
/// Having this also makes it easier to e.g. sort rectangles during repack.
/// </code>
/// </remarks>
public ref int Generation => ref Unsafe.AsRef<int>(&_ptr->Generation);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L4048">imgui_internal.h:4048</see>
/// <br/><c>unsigned int IsUsed : 1</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Packed rectangle lookup entry (we need an indirection to allow removing/reordering rectangles)
/// User are returned ImFontAtlasRectId values which are meant to be persistent.
/// We handle this with an indirection. While Rects[] may be in theory shuffled, compacted etc., RectsIndex[] cannot it is keyed by ImFontAtlasRectId.
/// RectsIndex[] is used both as an index into Rects[] and an index into itself. This is basically a free-list. See ImFontAtlasBuildAllocRectIndexEntry() code.
/// Having this also makes it easier to e.g. sort rectangles during repack.
/// </code>
/// </remarks>
public ref uint IsUsed => ref Unsafe.AsRef<uint>(&_ptr->IsUsed);
}
}