mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
90 lines
3.2 KiB
C#
90 lines
3.2 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>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L1424">imgui_internal.h:1424</see>
|
|
/// <br/><c>struct ImGuiPtrOrIndex</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Explicit, Size = 16)]
|
|
public partial struct ImGuiPtrOrIndex
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Either field can be set, not both. e.g. Dock node tab bars are loose while BeginTabBar() ones are in a
|
|
/// pool.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L1426">imgui_internal.h:1426</see>
|
|
/// <br/><c>void* Ptr</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(0)]
|
|
public nint Ptr;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Usually index in a main pool.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L1427">imgui_internal.h:1427</see>
|
|
/// <br/><c>int Index</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(8)]
|
|
public int Index;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L1424">imgui_internal.h:1424</see>
|
|
/// <br/><c>struct ImGuiPtrOrIndex</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public unsafe partial struct ImGuiPtrOrIndexPtr(ImGuiPtrOrIndex* ptr) : INullable
|
|
{
|
|
private ImGuiPtrOrIndex* _ptr = ptr;
|
|
public ImGuiPtrOrIndex* Ptr => _ptr;
|
|
|
|
public bool IsNull() => _ptr is null;
|
|
|
|
public static implicit operator ImGuiPtrOrIndexPtr(ImGuiPtrOrIndex* ptr) => new(ptr);
|
|
|
|
public static implicit operator ImGuiPtrOrIndex*(ImGuiPtrOrIndexPtr wrapper) => wrapper.Ptr;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Either field can be set, not both. e.g. Dock node tab bars are loose while BeginTabBar() ones are in a
|
|
/// pool.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L1426">imgui_internal.h:1426</see>
|
|
/// <br/><c>void* Ptr</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public ref nint Pointer => ref Unsafe.AsRef<nint>(&_ptr->Ptr);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Usually index in a main pool.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L1427">imgui_internal.h:1427</see>
|
|
/// <br/><c>int Index</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public ref int Index => ref Unsafe.AsRef<int>(&_ptr->Index);
|
|
}
|
|
}
|