//
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
namespace Brutal.ImGuiApi.Internal
{
///
///
/// C++:
/// imgui_internal.h:1424
///
struct ImGuiPtrOrIndex
///
///
[StructLayout(LayoutKind.Explicit, Size = 16)]
public partial struct ImGuiPtrOrIndex
{
///
///
/// Either field can be set, not both. e.g. Dock node tab bars are loose while BeginTabBar() ones are in a
/// pool.
///
///
/// C++:
/// imgui_internal.h:1426
///
void* Ptr
///
///
[FieldOffset(0)]
public nint Ptr;
///
///
/// Usually index in a main pool.
///
///
/// C++:
/// imgui_internal.h:1427
///
int Index
///
///
[FieldOffset(8)]
public int Index;
}
///
///
/// C++:
/// imgui_internal.h:1424
///
struct ImGuiPtrOrIndex
///
///
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;
///
///
/// Either field can be set, not both. e.g. Dock node tab bars are loose while BeginTabBar() ones are in a
/// pool.
///
///
/// C++:
/// imgui_internal.h:1426
///
void* Ptr
///
///
public ref nint Pointer => ref Unsafe.AsRef(&_ptr->Ptr);
///
///
/// Usually index in a main pool.
///
///
/// C++:
/// imgui_internal.h:1427
///
int Index
///
///
public ref int Index => ref Unsafe.AsRef(&_ptr->Index);
}
}