This commit is contained in:
Rian Drake 2026-10-15 14:09:11 +13:00
commit b578433e37
5 changed files with 784842 additions and 0 deletions

View file

@ -0,0 +1,6 @@
namespace Brutal.ImGuiApi;
public record struct ImFontAtlasRectId(int Value)
{
public static readonly ImFontAtlasRectId Invalid = new(-1);
}

View file

@ -0,0 +1,12 @@
namespace Brutal.ImGuiApi;
public record struct ImGuiID(uint Value)
{
public static implicit operator ImGuiID(uint value) => new(value);
public static implicit operator ImGuiID(int value) => new((uint)value);
public static implicit operator uint(ImGuiID value) => value.Value;
public static implicit operator int(ImGuiID value) => (int)value.Value;
}

View file

@ -0,0 +1,7 @@
namespace Brutal.ImGuiApi;
// Just a wrapper for ImGuiKey values, in the expectation that it will be a combination of Mod flags and a key value.
public record struct ImGuiKeyChord(ImGuiKey Flags)
{
public static implicit operator ImGuiKeyChord(ImGuiKey key) => new(key);
}

View file

@ -0,0 +1,11 @@
namespace Brutal.ImGuiApi;
public record struct ImTextureID(nint Value)
{
// Special 'invalid' default defined by ImGui
public static readonly ImTextureID Invalid = new(0);
public static implicit operator nint(ImTextureID value) => value.Value;
public static explicit operator ImTextureID(nint value) => new(value);
}

View file

@ -0,0 +1,31 @@
//typedef ImU32* ImBitArrayPtr
global using ImBitArrayPtr = Brutal.Pointers.Ptr<uint>;
namespace Brutal.ImGuiApi;
public struct ImSpan<T> { }
public struct ImStableVector<T> { }
public struct ImPool<T> { }
public struct ImStbTexteditState { }
public struct stbrp_node
{
#pragma warning disable CS0169 // Field is never used
int x,
y;
nint next;
#pragma warning restore CS0169 // Field is never used
}
#region used by ImGuiContext
public struct ImBitArrayForNamedKeys { }
public struct ImChunkStream<T> { }
public struct ImFileHandle { }
#endregion