Decompiled source of UBImGui v1.0.0
System.Runtime.CompilerServices.Unsafe.dll
Decompiled 4 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Microsoft.CodeAnalysis; [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: CLSCompliant(false)] [assembly: AssemblyMetadata(".NETFrameworkAssembly", "")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyDescription("System.Runtime.CompilerServices.Unsafe")] [assembly: AssemblyFileVersion("6.0.21.52210")] [assembly: AssemblyInformationalVersion("6.0.0")] [assembly: AssemblyTitle("System.Runtime.CompilerServices.Unsafe")] [assembly: AssemblyMetadata("Serviceable", "True")] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyMetadata("IsTrimmable", "True")] [assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyVersion("6.0.0.0")] namespace System.Runtime.CompilerServices { public static class Unsafe { [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static T Read<T>(void* source) { return Unsafe.Read<T>(source); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static T ReadUnaligned<T>(void* source) { return Unsafe.ReadUnaligned<T>(source); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static T ReadUnaligned<T>(ref byte source) { return Unsafe.ReadUnaligned<T>(ref source); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static void Write<T>(void* destination, T value) { Unsafe.Write(destination, value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static void WriteUnaligned<T>(void* destination, T value) { Unsafe.WriteUnaligned(destination, value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static void WriteUnaligned<T>(ref byte destination, T value) { Unsafe.WriteUnaligned(ref destination, value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static void Copy<T>(void* destination, ref T source) { Unsafe.Write(destination, source); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static void Copy<T>(ref T destination, void* source) { destination = Unsafe.Read<T>(source); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static void* AsPointer<T>(ref T value) { return Unsafe.AsPointer(ref value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static void SkipInit<T>(out T value) { } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static int SizeOf<T>() { return Unsafe.SizeOf<T>(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static void CopyBlock(void* destination, void* source, uint byteCount) { // IL cpblk instruction Unsafe.CopyBlock(destination, source, byteCount); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static void CopyBlock(ref byte destination, ref byte source, uint byteCount) { // IL cpblk instruction Unsafe.CopyBlock(ref destination, ref source, byteCount); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static void CopyBlockUnaligned(void* destination, void* source, uint byteCount) { // IL cpblk instruction Unsafe.CopyBlockUnaligned(destination, source, byteCount); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static void CopyBlockUnaligned(ref byte destination, ref byte source, uint byteCount) { // IL cpblk instruction Unsafe.CopyBlockUnaligned(ref destination, ref source, byteCount); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static void InitBlock(void* startAddress, byte value, uint byteCount) { // IL initblk instruction Unsafe.InitBlock(startAddress, value, byteCount); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static void InitBlock(ref byte startAddress, byte value, uint byteCount) { // IL initblk instruction Unsafe.InitBlock(ref startAddress, value, byteCount); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static void InitBlockUnaligned(void* startAddress, byte value, uint byteCount) { // IL initblk instruction Unsafe.InitBlockUnaligned(startAddress, value, byteCount); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static void InitBlockUnaligned(ref byte startAddress, byte value, uint byteCount) { // IL initblk instruction Unsafe.InitBlockUnaligned(ref startAddress, value, byteCount); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static T As<T>(object o) where T : class { return (T)o; } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static ref T AsRef<T>(void* source) { return ref *(T*)source; } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static ref T AsRef<T>(in T source) { return ref source; } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static ref TTo As<TFrom, TTo>(ref TFrom source) { return ref Unsafe.As<TFrom, TTo>(ref source); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static ref T Unbox<T>(object box) where T : struct { return ref (T)box; } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static ref T Add<T>(ref T source, int elementOffset) { return ref Unsafe.Add(ref source, elementOffset); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static void* Add<T>(void* source, int elementOffset) { return (byte*)source + (nint)elementOffset * (nint)Unsafe.SizeOf<T>(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static ref T Add<T>(ref T source, IntPtr elementOffset) { return ref Unsafe.Add(ref source, elementOffset); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ref T Add<T>(ref T source, [System.Runtime.Versioning.NonVersionable] nuint elementOffset) { return ref Unsafe.Add(ref source, elementOffset); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static ref T AddByteOffset<T>(ref T source, IntPtr byteOffset) { return ref Unsafe.AddByteOffset(ref source, byteOffset); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ref T AddByteOffset<T>(ref T source, [System.Runtime.Versioning.NonVersionable] nuint byteOffset) { return ref Unsafe.AddByteOffset(ref source, byteOffset); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static ref T Subtract<T>(ref T source, int elementOffset) { return ref Unsafe.Subtract(ref source, elementOffset); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static void* Subtract<T>(void* source, int elementOffset) { return (byte*)source - (nint)elementOffset * (nint)Unsafe.SizeOf<T>(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static ref T Subtract<T>(ref T source, IntPtr elementOffset) { return ref Unsafe.Subtract(ref source, elementOffset); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ref T Subtract<T>(ref T source, [System.Runtime.Versioning.NonVersionable] nuint elementOffset) { return ref Unsafe.Subtract(ref source, elementOffset); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static ref T SubtractByteOffset<T>(ref T source, IntPtr byteOffset) { return ref Unsafe.SubtractByteOffset(ref source, byteOffset); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ref T SubtractByteOffset<T>(ref T source, [System.Runtime.Versioning.NonVersionable] nuint byteOffset) { return ref Unsafe.SubtractByteOffset(ref source, byteOffset); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static IntPtr ByteOffset<T>(ref T origin, ref T target) { return Unsafe.ByteOffset(target: ref target, origin: ref origin); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static bool AreSame<T>(ref T left, ref T right) { return Unsafe.AreSame(ref left, ref right); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static bool IsAddressGreaterThan<T>(ref T left, ref T right) { return Unsafe.IsAddressGreaterThan(ref left, ref right); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public static bool IsAddressLessThan<T>(ref T left, ref T right) { return Unsafe.IsAddressLessThan(ref left, ref right); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static bool IsNullRef<T>(ref T source) { return Unsafe.AsPointer(ref source) == null; } [MethodImpl(MethodImplOptions.AggressiveInlining)] [System.Runtime.Versioning.NonVersionable] public unsafe static ref T NullRef<T>() { return ref *(T*)null; } } } namespace System.Runtime.Versioning { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = false, Inherited = false)] internal sealed class NonVersionableAttribute : Attribute { } } namespace System.Runtime.CompilerServices { internal sealed class IsReadOnlyAttribute : Attribute { } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] [Microsoft.CodeAnalysis.Embedded] [CompilerGenerated] internal sealed class NativeIntegerAttribute : Attribute { public readonly bool[] TransformFlags; public NativeIntegerAttribute() { TransformFlags = new bool[1] { true }; } public NativeIntegerAttribute(bool[] A_0) { TransformFlags = A_0; } } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } }
UBImGui.dll
Decompiled 4 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.CodeDom.Compiler; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using AOT; using BepInEx; using ImGuiNET; using Microsoft.CodeAnalysis; using UBImGui; using Unity.Collections; using Unity.Collections.LowLevel.Unsafe; using UnityEngine; using UnityEngine.Device; using UnityEngine.EventSystems; using UnityEngine.Rendering; using UnityEngine.Rendering.RenderGraphModule; using UnityEngine.Rendering.Universal; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: InternalsVisibleTo("UBImGui.Editor")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("UBImGui")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+71580a59ae1c24af71e2798d53a50e92c8c74e4d")] [assembly: AssemblyProduct("UBImGui")] [assembly: AssemblyTitle("UBImGui")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace ImGuiNET { public delegate void Platform_CreateWindow(ImGuiViewportPtr vp); public delegate void Platform_DestroyWindow(ImGuiViewportPtr vp); public delegate void Platform_ShowWindow(ImGuiViewportPtr vp); public delegate void Platform_SetWindowPos(ImGuiViewportPtr vp, Vector2 pos); public unsafe delegate void Platform_GetWindowPos(ImGuiViewportPtr vp, Vector2* outPos); public delegate void Platform_SetWindowSize(ImGuiViewportPtr vp, Vector2 size); public unsafe delegate void Platform_GetWindowSize(ImGuiViewportPtr vp, Vector2* outSize); public delegate void Platform_SetWindowFocus(ImGuiViewportPtr vp); public delegate byte Platform_GetWindowFocus(ImGuiViewportPtr vp); public delegate byte Platform_GetWindowMinimized(ImGuiViewportPtr vp); public delegate void Platform_SetWindowTitle(ImGuiViewportPtr vp, IntPtr title); public struct ImColor { public Vector4 Value; } public struct ImColorPtr { public unsafe ImColor* NativePtr { get; } public unsafe ref Vector4 Value => ref Unsafe.AsRef<Vector4>((void*)(&NativePtr->Value)); public unsafe ImColorPtr(ImColor* nativePtr) { NativePtr = nativePtr; } public unsafe ImColorPtr(IntPtr nativePtr) { NativePtr = (ImColor*)(void*)nativePtr; } public unsafe static implicit operator ImColorPtr(ImColor* nativePtr) { return new ImColorPtr(nativePtr); } public unsafe static implicit operator ImColor*(ImColorPtr wrappedPtr) { return wrappedPtr.NativePtr; } public static implicit operator ImColorPtr(IntPtr nativePtr) { return new ImColorPtr(nativePtr); } public unsafe void Destroy() { ImGuiNative.ImColor_destroy(NativePtr); } public unsafe ImColor HSV(float h, float s, float v) { float a = 1f; ImColor result = default(ImColor); ImGuiNative.ImColor_HSV(&result, h, s, v, a); return result; } public unsafe ImColor HSV(float h, float s, float v, float a) { ImColor result = default(ImColor); ImGuiNative.ImColor_HSV(&result, h, s, v, a); return result; } public unsafe void SetHSV(float h, float s, float v) { float a = 1f; ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a); } public unsafe void SetHSV(float h, float s, float v, float a) { ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a); } } public struct ImDrawChannel { public ImVector _CmdBuffer; public ImVector _IdxBuffer; } public struct ImDrawChannelPtr { public unsafe ImDrawChannel* NativePtr { get; } public unsafe ImPtrVector<ImDrawCmdPtr> _CmdBuffer => new ImPtrVector<ImDrawCmdPtr>(NativePtr->_CmdBuffer, Unsafe.SizeOf<ImDrawCmd>()); public unsafe ImVector<ushort> _IdxBuffer => new ImVector<ushort>(NativePtr->_IdxBuffer); public unsafe ImDrawChannelPtr(ImDrawChannel* nativePtr) { NativePtr = nativePtr; } public unsafe ImDrawChannelPtr(IntPtr nativePtr) { NativePtr = (ImDrawChannel*)(void*)nativePtr; } public unsafe static implicit operator ImDrawChannelPtr(ImDrawChannel* nativePtr) { return new ImDrawChannelPtr(nativePtr); } public unsafe static implicit operator ImDrawChannel*(ImDrawChannelPtr wrappedPtr) { return wrappedPtr.NativePtr; } public static implicit operator ImDrawChannelPtr(IntPtr nativePtr) { return new ImDrawChannelPtr(nativePtr); } } public struct ImDrawCmd { public Vector4 ClipRect; public IntPtr TextureId; public uint VtxOffset; public uint IdxOffset; public uint ElemCount; public IntPtr UserCallback; public unsafe void* UserCallbackData; } public struct ImDrawCmdPtr { public unsafe ImDrawCmd* NativePtr { get; } public unsafe ref Vector4 ClipRect => ref Unsafe.AsRef<Vector4>((void*)(&NativePtr->ClipRect)); public unsafe ref IntPtr TextureId => ref Unsafe.AsRef<IntPtr>(&NativePtr->TextureId); public unsafe ref uint VtxOffset => ref Unsafe.AsRef<uint>(&NativePtr->VtxOffset); public unsafe ref uint IdxOffset => ref Unsafe.AsRef<uint>(&NativePtr->IdxOffset); public unsafe ref uint ElemCount => ref Unsafe.AsRef<uint>(&NativePtr->ElemCount); public unsafe ref IntPtr UserCallback => ref Unsafe.AsRef<IntPtr>(&NativePtr->UserCallback); public unsafe IntPtr UserCallbackData { get { return (IntPtr)NativePtr->UserCallbackData; } set { NativePtr->UserCallbackData = (void*)value; } } public unsafe ImDrawCmdPtr(ImDrawCmd* nativePtr) { NativePtr = nativePtr; } public unsafe ImDrawCmdPtr(IntPtr nativePtr) { NativePtr = (ImDrawCmd*)(void*)nativePtr; } public unsafe static implicit operator ImDrawCmdPtr(ImDrawCmd* nativePtr) { return new ImDrawCmdPtr(nativePtr); } public unsafe static implicit operator ImDrawCmd*(ImDrawCmdPtr wrappedPtr) { return wrappedPtr.NativePtr; } public static implicit operator ImDrawCmdPtr(IntPtr nativePtr) { return new ImDrawCmdPtr(nativePtr); } public unsafe void Destroy() { ImGuiNative.ImDrawCmd_destroy(NativePtr); } public unsafe IntPtr GetTexID() { return ImGuiNative.ImDrawCmd_GetTexID(NativePtr); } } public struct ImDrawCmdHeader { public Vector4 ClipRect; public IntPtr TextureId; public uint VtxOffset; } public struct ImDrawCmdHeaderPtr { public unsafe ImDrawCmdHeader* NativePtr { get; } public unsafe ref Vector4 ClipRect => ref Unsafe.AsRef<Vector4>((void*)(&NativePtr->ClipRect)); public unsafe ref IntPtr TextureId => ref Unsafe.AsRef<IntPtr>(&NativePtr->TextureId); public unsafe ref uint VtxOffset => ref Unsafe.AsRef<uint>(&NativePtr->VtxOffset); public unsafe ImDrawCmdHeaderPtr(ImDrawCmdHeader* nativePtr) { NativePtr = nativePtr; } public unsafe ImDrawCmdHeaderPtr(IntPtr nativePtr) { NativePtr = (ImDrawCmdHeader*)(void*)nativePtr; } public unsafe static implicit operator ImDrawCmdHeaderPtr(ImDrawCmdHeader* nativePtr) { return new ImDrawCmdHeaderPtr(nativePtr); } public unsafe static implicit operator ImDrawCmdHeader*(ImDrawCmdHeaderPtr wrappedPtr) { return wrappedPtr.NativePtr; } public static implicit operator ImDrawCmdHeaderPtr(IntPtr nativePtr) { return new ImDrawCmdHeaderPtr(nativePtr); } } public struct ImDrawData { public byte Valid; public int CmdListsCount; public int TotalIdxCount; public int TotalVtxCount; public ImVector CmdLists; public Vector2 DisplayPos; public Vector2 DisplaySize; public Vector2 FramebufferScale; public unsafe ImGuiViewport* OwnerViewport; } public struct ImDrawDataPtr { public unsafe ImDrawData* NativePtr { get; } public unsafe ref bool Valid => ref Unsafe.AsRef<bool>(&NativePtr->Valid); public unsafe ref int CmdListsCount => ref Unsafe.AsRef<int>(&NativePtr->CmdListsCount); public unsafe ref int TotalIdxCount => ref Unsafe.AsRef<int>(&NativePtr->TotalIdxCount); public unsafe ref int TotalVtxCount => ref Unsafe.AsRef<int>(&NativePtr->TotalVtxCount); public unsafe ImVector<ImDrawListPtr> CmdLists => new ImVector<ImDrawListPtr>(NativePtr->CmdLists); public unsafe ref Vector2 DisplayPos => ref Unsafe.AsRef<Vector2>((void*)(&NativePtr->DisplayPos)); public unsafe ref Vector2 DisplaySize => ref Unsafe.AsRef<Vector2>((void*)(&NativePtr->DisplaySize)); public unsafe ref Vector2 FramebufferScale => ref Unsafe.AsRef<Vector2>((void*)(&NativePtr->FramebufferScale)); public unsafe ImGuiViewportPtr OwnerViewport => new ImGuiViewportPtr(NativePtr->OwnerViewport); public unsafe ImDrawDataPtr(ImDrawData* nativePtr) { NativePtr = nativePtr; } public unsafe ImDrawDataPtr(IntPtr nativePtr) { NativePtr = (ImDrawData*)(void*)nativePtr; } public unsafe static implicit operator ImDrawDataPtr(ImDrawData* nativePtr) { return new ImDrawDataPtr(nativePtr); } public unsafe static implicit operator ImDrawData*(ImDrawDataPtr wrappedPtr) { return wrappedPtr.NativePtr; } public static implicit operator ImDrawDataPtr(IntPtr nativePtr) { return new ImDrawDataPtr(nativePtr); } public unsafe void AddDrawList(ImDrawListPtr draw_list) { ImDrawList* nativePtr = draw_list.NativePtr; ImGuiNative.ImDrawData_AddDrawList(NativePtr, nativePtr); } public unsafe void Clear() { ImGuiNative.ImDrawData_Clear(NativePtr); } public unsafe void DeIndexAllBuffers() { ImGuiNative.ImDrawData_DeIndexAllBuffers(NativePtr); } public unsafe void Destroy() { ImGuiNative.ImDrawData_destroy(NativePtr); } public unsafe void ScaleClipRects(Vector2 fb_scale) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, fb_scale); } } [Flags] public enum ImDrawFlags { None = 0, Closed = 1, RoundCornersTopLeft = 0x10, RoundCornersTopRight = 0x20, RoundCornersBottomLeft = 0x40, RoundCornersBottomRight = 0x80, RoundCornersNone = 0x100, RoundCornersTop = 0x30, RoundCornersBottom = 0xC0, RoundCornersLeft = 0x50, RoundCornersRight = 0xA0, RoundCornersAll = 0xF0, RoundCornersDefault = 0xF0, RoundCornersMask = 0x1F0 } public struct ImDrawList { public ImVector CmdBuffer; public ImVector IdxBuffer; public ImVector VtxBuffer; public ImDrawListFlags Flags; public uint _VtxCurrentIdx; public IntPtr _Data; public unsafe ImDrawVert* _VtxWritePtr; public unsafe ushort* _IdxWritePtr; public ImVector _Path; public ImDrawCmdHeader _CmdHeader; public ImDrawListSplitter _Splitter; public ImVector _ClipRectStack; public ImVector _TextureIdStack; public float _FringeScale; public unsafe byte* _OwnerName; } public struct ImDrawListPtr { public unsafe ImDrawList* NativePtr { get; } public unsafe ImPtrVector<ImDrawCmdPtr> CmdBuffer => new ImPtrVector<ImDrawCmdPtr>(NativePtr->CmdBuffer, Unsafe.SizeOf<ImDrawCmd>()); public unsafe ImVector<ushort> IdxBuffer => new ImVector<ushort>(NativePtr->IdxBuffer); public unsafe ImPtrVector<ImDrawVertPtr> VtxBuffer => new ImPtrVector<ImDrawVertPtr>(NativePtr->VtxBuffer, Unsafe.SizeOf<ImDrawVert>()); public unsafe ref ImDrawListFlags Flags => ref Unsafe.AsRef<ImDrawListFlags>(&NativePtr->Flags); public unsafe ref uint _VtxCurrentIdx => ref Unsafe.AsRef<uint>(&NativePtr->_VtxCurrentIdx); public unsafe ref IntPtr _Data => ref Unsafe.AsRef<IntPtr>(&NativePtr->_Data); public unsafe ImDrawVertPtr _VtxWritePtr => new ImDrawVertPtr(NativePtr->_VtxWritePtr); public unsafe IntPtr _IdxWritePtr { get { return (IntPtr)NativePtr->_IdxWritePtr; } set { NativePtr->_IdxWritePtr = (ushort*)(void*)value; } } public unsafe ImVector<Vector2> _Path => new ImVector<Vector2>(NativePtr->_Path); public unsafe ref ImDrawCmdHeader _CmdHeader => ref Unsafe.AsRef<ImDrawCmdHeader>(&NativePtr->_CmdHeader); public unsafe ref ImDrawListSplitter _Splitter => ref Unsafe.AsRef<ImDrawListSplitter>(&NativePtr->_Splitter); public unsafe ImVector<Vector4> _ClipRectStack => new ImVector<Vector4>(NativePtr->_ClipRectStack); public unsafe ImVector<IntPtr> _TextureIdStack => new ImVector<IntPtr>(NativePtr->_TextureIdStack); public unsafe ref float _FringeScale => ref Unsafe.AsRef<float>(&NativePtr->_FringeScale); public unsafe NullTerminatedString _OwnerName => new NullTerminatedString(NativePtr->_OwnerName); public unsafe ImDrawListPtr(ImDrawList* nativePtr) { NativePtr = nativePtr; } public unsafe ImDrawListPtr(IntPtr nativePtr) { NativePtr = (ImDrawList*)(void*)nativePtr; } public unsafe static implicit operator ImDrawListPtr(ImDrawList* nativePtr) { return new ImDrawListPtr(nativePtr); } public unsafe static implicit operator ImDrawList*(ImDrawListPtr wrappedPtr) { return wrappedPtr.NativePtr; } public static implicit operator ImDrawListPtr(IntPtr nativePtr) { return new ImDrawListPtr(nativePtr); } public unsafe int _CalcCircleAutoSegmentCount(float radius) { return ImGuiNative.ImDrawList__CalcCircleAutoSegmentCount(NativePtr, radius); } public unsafe void _ClearFreeMemory() { ImGuiNative.ImDrawList__ClearFreeMemory(NativePtr); } public unsafe void _OnChangedClipRect() { ImGuiNative.ImDrawList__OnChangedClipRect(NativePtr); } public unsafe void _OnChangedTextureID() { ImGuiNative.ImDrawList__OnChangedTextureID(NativePtr); } public unsafe void _OnChangedVtxOffset() { ImGuiNative.ImDrawList__OnChangedVtxOffset(NativePtr); } public unsafe void _PathArcToFastEx(Vector2 center, float radius, int a_min_sample, int a_max_sample, int a_step) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList__PathArcToFastEx(NativePtr, center, radius, a_min_sample, a_max_sample, a_step); } public unsafe void _PathArcToN(Vector2 center, float radius, float a_min, float a_max, int num_segments) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList__PathArcToN(NativePtr, center, radius, a_min, a_max, num_segments); } public unsafe void _PopUnusedDrawCmd() { ImGuiNative.ImDrawList__PopUnusedDrawCmd(NativePtr); } public unsafe void _ResetForNewFrame() { ImGuiNative.ImDrawList__ResetForNewFrame(NativePtr); } public unsafe void _TryMergeDrawCmds() { ImGuiNative.ImDrawList__TryMergeDrawCmds(NativePtr); } public unsafe void AddBezierCubic(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) int num_segments = 0; ImGuiNative.ImDrawList_AddBezierCubic(NativePtr, p1, p2, p3, p4, col, thickness, num_segments); } public unsafe void AddBezierCubic(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness, int num_segments) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddBezierCubic(NativePtr, p1, p2, p3, p4, col, thickness, num_segments); } public unsafe void AddBezierQuadratic(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) int num_segments = 0; ImGuiNative.ImDrawList_AddBezierQuadratic(NativePtr, p1, p2, p3, col, thickness, num_segments); } public unsafe void AddBezierQuadratic(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness, int num_segments) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddBezierQuadratic(NativePtr, p1, p2, p3, col, thickness, num_segments); } public unsafe void AddCallback(IntPtr callback, IntPtr callback_data) { void* callback_data2 = callback_data.ToPointer(); ImGuiNative.ImDrawList_AddCallback(NativePtr, callback, callback_data2); } public unsafe void AddCircle(Vector2 center, float radius, uint col) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) int num_segments = 0; float thickness = 1f; ImGuiNative.ImDrawList_AddCircle(NativePtr, center, radius, col, num_segments, thickness); } public unsafe void AddCircle(Vector2 center, float radius, uint col, int num_segments) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) float thickness = 1f; ImGuiNative.ImDrawList_AddCircle(NativePtr, center, radius, col, num_segments, thickness); } public unsafe void AddCircle(Vector2 center, float radius, uint col, int num_segments, float thickness) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddCircle(NativePtr, center, radius, col, num_segments, thickness); } public unsafe void AddCircleFilled(Vector2 center, float radius, uint col) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) int num_segments = 0; ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, center, radius, col, num_segments); } public unsafe void AddCircleFilled(Vector2 center, float radius, uint col, int num_segments) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, center, radius, col, num_segments); } public unsafe void AddConcavePolyFilled(ref Vector2 points, int num_points, uint col) { fixed (Vector2* points2 = &points) { ImGuiNative.ImDrawList_AddConcavePolyFilled(NativePtr, points2, num_points, col); } } public unsafe void AddConvexPolyFilled(ref Vector2 points, int num_points, uint col) { fixed (Vector2* points2 = &points) { ImGuiNative.ImDrawList_AddConvexPolyFilled(NativePtr, points2, num_points, col); } } public unsafe void AddDrawCmd() { ImGuiNative.ImDrawList_AddDrawCmd(NativePtr); } public unsafe void AddEllipse(Vector2 center, Vector2 radius, uint col) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) float rot = 0f; int num_segments = 0; float thickness = 1f; ImGuiNative.ImDrawList_AddEllipse(NativePtr, center, radius, col, rot, num_segments, thickness); } public unsafe void AddEllipse(Vector2 center, Vector2 radius, uint col, float rot) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) int num_segments = 0; float thickness = 1f; ImGuiNative.ImDrawList_AddEllipse(NativePtr, center, radius, col, rot, num_segments, thickness); } public unsafe void AddEllipse(Vector2 center, Vector2 radius, uint col, float rot, int num_segments) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) float thickness = 1f; ImGuiNative.ImDrawList_AddEllipse(NativePtr, center, radius, col, rot, num_segments, thickness); } public unsafe void AddEllipse(Vector2 center, Vector2 radius, uint col, float rot, int num_segments, float thickness) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddEllipse(NativePtr, center, radius, col, rot, num_segments, thickness); } public unsafe void AddEllipseFilled(Vector2 center, Vector2 radius, uint col) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) float rot = 0f; int num_segments = 0; ImGuiNative.ImDrawList_AddEllipseFilled(NativePtr, center, radius, col, rot, num_segments); } public unsafe void AddEllipseFilled(Vector2 center, Vector2 radius, uint col, float rot) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) int num_segments = 0; ImGuiNative.ImDrawList_AddEllipseFilled(NativePtr, center, radius, col, rot, num_segments); } public unsafe void AddEllipseFilled(Vector2 center, Vector2 radius, uint col, float rot, int num_segments) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddEllipseFilled(NativePtr, center, radius, col, rot, num_segments); } public unsafe void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) Vector2 uv_min = default(Vector2); Vector2 uv_max = default(Vector2); ((Vector2)(ref uv_max))..ctor(1f, 1f); uint col = uint.MaxValue; ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col); } public unsafe void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) Vector2 uv_max = default(Vector2); ((Vector2)(ref uv_max))..ctor(1f, 1f); uint col = uint.MaxValue; ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col); } public unsafe void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) uint col = uint.MaxValue; ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col); } public unsafe void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col); } public unsafe void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) Vector2 uv = default(Vector2); Vector2 uv2 = default(Vector2); ((Vector2)(ref uv2))..ctor(1f, 0f); Vector2 uv3 = default(Vector2); ((Vector2)(ref uv3))..ctor(1f, 1f); Vector2 uv4 = default(Vector2); ((Vector2)(ref uv4))..ctor(0f, 1f); uint col = uint.MaxValue; ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv, uv2, uv3, uv4, col); } public unsafe void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) Vector2 uv2 = default(Vector2); ((Vector2)(ref uv2))..ctor(1f, 0f); Vector2 uv3 = default(Vector2); ((Vector2)(ref uv3))..ctor(1f, 1f); Vector2 uv4 = default(Vector2); ((Vector2)(ref uv4))..ctor(0f, 1f); uint col = uint.MaxValue; ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } public unsafe void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) Vector2 uv3 = default(Vector2); ((Vector2)(ref uv3))..ctor(1f, 1f); Vector2 uv4 = default(Vector2); ((Vector2)(ref uv4))..ctor(0f, 1f); uint col = uint.MaxValue; ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } public unsafe void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) Vector2 uv4 = default(Vector2); ((Vector2)(ref uv4))..ctor(0f, 1f); uint col = uint.MaxValue; ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } public unsafe void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) uint col = uint.MaxValue; ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } public unsafe void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4, uint col) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } public unsafe void AddImageRounded(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col, float rounding) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) ImDrawFlags flags = ImDrawFlags.None; ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, flags); } public unsafe void AddImageRounded(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col, float rounding, ImDrawFlags flags) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, flags); } public unsafe void AddLine(Vector2 p1, Vector2 p2, uint col) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) float thickness = 1f; ImGuiNative.ImDrawList_AddLine(NativePtr, p1, p2, col, thickness); } public unsafe void AddLine(Vector2 p1, Vector2 p2, uint col, float thickness) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddLine(NativePtr, p1, p2, col, thickness); } public unsafe void AddNgon(Vector2 center, float radius, uint col, int num_segments) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) float thickness = 1f; ImGuiNative.ImDrawList_AddNgon(NativePtr, center, radius, col, num_segments, thickness); } public unsafe void AddNgon(Vector2 center, float radius, uint col, int num_segments, float thickness) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddNgon(NativePtr, center, radius, col, num_segments, thickness); } public unsafe void AddNgonFilled(Vector2 center, float radius, uint col, int num_segments) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddNgonFilled(NativePtr, center, radius, col, num_segments); } public unsafe void AddPolyline(ref Vector2 points, int num_points, uint col, ImDrawFlags flags, float thickness) { fixed (Vector2* points2 = &points) { ImGuiNative.ImDrawList_AddPolyline(NativePtr, points2, num_points, col, flags, thickness); } } public unsafe void AddQuad(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) float thickness = 1f; ImGuiNative.ImDrawList_AddQuad(NativePtr, p1, p2, p3, p4, col, thickness); } public unsafe void AddQuad(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddQuad(NativePtr, p1, p2, p3, p4, col, thickness); } public unsafe void AddQuadFilled(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddQuadFilled(NativePtr, p1, p2, p3, p4, col); } public unsafe void AddRect(Vector2 p_min, Vector2 p_max, uint col) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) float rounding = 0f; ImDrawFlags flags = ImDrawFlags.None; float thickness = 1f; ImGuiNative.ImDrawList_AddRect(NativePtr, p_min, p_max, col, rounding, flags, thickness); } public unsafe void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) ImDrawFlags flags = ImDrawFlags.None; float thickness = 1f; ImGuiNative.ImDrawList_AddRect(NativePtr, p_min, p_max, col, rounding, flags, thickness); } public unsafe void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) float thickness = 1f; ImGuiNative.ImDrawList_AddRect(NativePtr, p_min, p_max, col, rounding, flags, thickness); } public unsafe void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags, float thickness) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddRect(NativePtr, p_min, p_max, col, rounding, flags, thickness); } public unsafe void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) float rounding = 0f; ImDrawFlags flags = ImDrawFlags.None; ImGuiNative.ImDrawList_AddRectFilled(NativePtr, p_min, p_max, col, rounding, flags); } public unsafe void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col, float rounding) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) ImDrawFlags flags = ImDrawFlags.None; ImGuiNative.ImDrawList_AddRectFilled(NativePtr, p_min, p_max, col, rounding, flags); } public unsafe void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddRectFilled(NativePtr, p_min, p_max, col, rounding, flags); } public unsafe void AddRectFilledMultiColor(Vector2 p_min, Vector2 p_max, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddRectFilledMultiColor(NativePtr, p_min, p_max, col_upr_left, col_upr_right, col_bot_right, col_bot_left); } public unsafe void AddText(Vector2 pos, uint col, ReadOnlySpan<char> text_begin) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; ImGuiNative.ImDrawList_AddText_Vec2(NativePtr, pos, col, ptr, ptr + num); if (num > 2048) { Util.Free(ptr); } } public unsafe void AddText(Vector2 pos, uint col, string text_begin) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; ImGuiNative.ImDrawList_AddText_Vec2(NativePtr, pos, col, ptr, ptr + num); if (num > 2048) { Util.Free(ptr); } } public unsafe void AddText(ImFontPtr font, float font_size, Vector2 pos, uint col, ReadOnlySpan<char> text_begin) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) ImFont* nativePtr = font.NativePtr; int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; float wrap_width = 0f; Vector4* cpu_fine_clip_rect = null; ImGuiNative.ImDrawList_AddText_FontPtr(NativePtr, nativePtr, font_size, pos, col, ptr, ptr + num, wrap_width, cpu_fine_clip_rect); if (num > 2048) { Util.Free(ptr); } } public unsafe void AddText(ImFontPtr font, float font_size, Vector2 pos, uint col, string text_begin) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) ImFont* nativePtr = font.NativePtr; int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; float wrap_width = 0f; Vector4* cpu_fine_clip_rect = null; ImGuiNative.ImDrawList_AddText_FontPtr(NativePtr, nativePtr, font_size, pos, col, ptr, ptr + num, wrap_width, cpu_fine_clip_rect); if (num > 2048) { Util.Free(ptr); } } public unsafe void AddText(ImFontPtr font, float font_size, Vector2 pos, uint col, ReadOnlySpan<char> text_begin, float wrap_width) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) ImFont* nativePtr = font.NativePtr; int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; Vector4* cpu_fine_clip_rect = null; ImGuiNative.ImDrawList_AddText_FontPtr(NativePtr, nativePtr, font_size, pos, col, ptr, ptr + num, wrap_width, cpu_fine_clip_rect); if (num > 2048) { Util.Free(ptr); } } public unsafe void AddText(ImFontPtr font, float font_size, Vector2 pos, uint col, string text_begin, float wrap_width) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) ImFont* nativePtr = font.NativePtr; int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; Vector4* cpu_fine_clip_rect = null; ImGuiNative.ImDrawList_AddText_FontPtr(NativePtr, nativePtr, font_size, pos, col, ptr, ptr + num, wrap_width, cpu_fine_clip_rect); if (num > 2048) { Util.Free(ptr); } } public unsafe void AddText(ImFontPtr font, float font_size, Vector2 pos, uint col, ReadOnlySpan<char> text_begin, float wrap_width, ref Vector4 cpu_fine_clip_rect) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) ImFont* nativePtr = font.NativePtr; int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; fixed (Vector4* cpu_fine_clip_rect2 = &cpu_fine_clip_rect) { ImGuiNative.ImDrawList_AddText_FontPtr(NativePtr, nativePtr, font_size, pos, col, ptr, ptr + num, wrap_width, cpu_fine_clip_rect2); if (num > 2048) { Util.Free(ptr); } } } public unsafe void AddText(ImFontPtr font, float font_size, Vector2 pos, uint col, string text_begin, float wrap_width, ref Vector4 cpu_fine_clip_rect) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) ImFont* nativePtr = font.NativePtr; int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; fixed (Vector4* cpu_fine_clip_rect2 = &cpu_fine_clip_rect) { ImGuiNative.ImDrawList_AddText_FontPtr(NativePtr, nativePtr, font_size, pos, col, ptr, ptr + num, wrap_width, cpu_fine_clip_rect2); if (num > 2048) { Util.Free(ptr); } } } public unsafe void AddTriangle(Vector2 p1, Vector2 p2, Vector2 p3, uint col) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) float thickness = 1f; ImGuiNative.ImDrawList_AddTriangle(NativePtr, p1, p2, p3, col, thickness); } public unsafe void AddTriangle(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddTriangle(NativePtr, p1, p2, p3, col, thickness); } public unsafe void AddTriangleFilled(Vector2 p1, Vector2 p2, Vector2 p3, uint col) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_AddTriangleFilled(NativePtr, p1, p2, p3, col); } public unsafe void ChannelsMerge() { ImGuiNative.ImDrawList_ChannelsMerge(NativePtr); } public unsafe void ChannelsSetCurrent(int n) { ImGuiNative.ImDrawList_ChannelsSetCurrent(NativePtr, n); } public unsafe void ChannelsSplit(int count) { ImGuiNative.ImDrawList_ChannelsSplit(NativePtr, count); } public unsafe ImDrawListPtr CloneOutput() { ImDrawList* nativePtr = ImGuiNative.ImDrawList_CloneOutput(NativePtr); return new ImDrawListPtr(nativePtr); } public unsafe void Destroy() { ImGuiNative.ImDrawList_destroy(NativePtr); } public unsafe Vector2 GetClipRectMax() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) Vector2 result = default(Vector2); ImGuiNative.ImDrawList_GetClipRectMax(&result, NativePtr); return result; } public unsafe Vector2 GetClipRectMin() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) Vector2 result = default(Vector2); ImGuiNative.ImDrawList_GetClipRectMin(&result, NativePtr); return result; } public unsafe void PathArcTo(Vector2 center, float radius, float a_min, float a_max) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) int num_segments = 0; ImGuiNative.ImDrawList_PathArcTo(NativePtr, center, radius, a_min, a_max, num_segments); } public unsafe void PathArcTo(Vector2 center, float radius, float a_min, float a_max, int num_segments) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PathArcTo(NativePtr, center, radius, a_min, a_max, num_segments); } public unsafe void PathArcToFast(Vector2 center, float radius, int a_min_of_12, int a_max_of_12) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PathArcToFast(NativePtr, center, radius, a_min_of_12, a_max_of_12); } public unsafe void PathBezierCubicCurveTo(Vector2 p2, Vector2 p3, Vector2 p4) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) int num_segments = 0; ImGuiNative.ImDrawList_PathBezierCubicCurveTo(NativePtr, p2, p3, p4, num_segments); } public unsafe void PathBezierCubicCurveTo(Vector2 p2, Vector2 p3, Vector2 p4, int num_segments) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PathBezierCubicCurveTo(NativePtr, p2, p3, p4, num_segments); } public unsafe void PathBezierQuadraticCurveTo(Vector2 p2, Vector2 p3) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) int num_segments = 0; ImGuiNative.ImDrawList_PathBezierQuadraticCurveTo(NativePtr, p2, p3, num_segments); } public unsafe void PathBezierQuadraticCurveTo(Vector2 p2, Vector2 p3, int num_segments) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PathBezierQuadraticCurveTo(NativePtr, p2, p3, num_segments); } public unsafe void PathClear() { ImGuiNative.ImDrawList_PathClear(NativePtr); } public unsafe void PathEllipticalArcTo(Vector2 center, Vector2 radius, float rot, float a_min, float a_max) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) int num_segments = 0; ImGuiNative.ImDrawList_PathEllipticalArcTo(NativePtr, center, radius, rot, a_min, a_max, num_segments); } public unsafe void PathEllipticalArcTo(Vector2 center, Vector2 radius, float rot, float a_min, float a_max, int num_segments) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PathEllipticalArcTo(NativePtr, center, radius, rot, a_min, a_max, num_segments); } public unsafe void PathFillConcave(uint col) { ImGuiNative.ImDrawList_PathFillConcave(NativePtr, col); } public unsafe void PathFillConvex(uint col) { ImGuiNative.ImDrawList_PathFillConvex(NativePtr, col); } public unsafe void PathLineTo(Vector2 pos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PathLineTo(NativePtr, pos); } public unsafe void PathLineToMergeDuplicate(Vector2 pos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PathLineToMergeDuplicate(NativePtr, pos); } public unsafe void PathRect(Vector2 rect_min, Vector2 rect_max) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) float rounding = 0f; ImDrawFlags flags = ImDrawFlags.None; ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, flags); } public unsafe void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) ImDrawFlags flags = ImDrawFlags.None; ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, flags); } public unsafe void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding, ImDrawFlags flags) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, flags); } public unsafe void PathStroke(uint col) { ImDrawFlags flags = ImDrawFlags.None; float thickness = 1f; ImGuiNative.ImDrawList_PathStroke(NativePtr, col, flags, thickness); } public unsafe void PathStroke(uint col, ImDrawFlags flags) { float thickness = 1f; ImGuiNative.ImDrawList_PathStroke(NativePtr, col, flags, thickness); } public unsafe void PathStroke(uint col, ImDrawFlags flags, float thickness) { ImGuiNative.ImDrawList_PathStroke(NativePtr, col, flags, thickness); } public unsafe void PopClipRect() { ImGuiNative.ImDrawList_PopClipRect(NativePtr); } public unsafe void PopTextureID() { ImGuiNative.ImDrawList_PopTextureID(NativePtr); } public unsafe void PrimQuadUV(Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PrimQuadUV(NativePtr, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); } public unsafe void PrimRect(Vector2 a, Vector2 b, uint col) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PrimRect(NativePtr, a, b, col); } public unsafe void PrimRectUV(Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PrimRectUV(NativePtr, a, b, uv_a, uv_b, col); } public unsafe void PrimReserve(int idx_count, int vtx_count) { ImGuiNative.ImDrawList_PrimReserve(NativePtr, idx_count, vtx_count); } public unsafe void PrimUnreserve(int idx_count, int vtx_count) { ImGuiNative.ImDrawList_PrimUnreserve(NativePtr, idx_count, vtx_count); } public unsafe void PrimVtx(Vector2 pos, Vector2 uv, uint col) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PrimVtx(NativePtr, pos, uv, col); } public unsafe void PrimWriteIdx(ushort idx) { ImGuiNative.ImDrawList_PrimWriteIdx(NativePtr, idx); } public unsafe void PrimWriteVtx(Vector2 pos, Vector2 uv, uint col) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) ImGuiNative.ImDrawList_PrimWriteVtx(NativePtr, pos, uv, col); } public unsafe void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) byte intersect_with_current_clip_rect = 0; ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); } public unsafe void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, bool intersect_with_current_clip_rect) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) byte intersect_with_current_clip_rect2 = (byte)(intersect_with_current_clip_rect ? 1 : 0); ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect2); } public unsafe void PushClipRectFullScreen() { ImGuiNative.ImDrawList_PushClipRectFullScreen(NativePtr); } public unsafe void PushTextureID(IntPtr texture_id) { ImGuiNative.ImDrawList_PushTextureID(NativePtr, texture_id); } } [Flags] public enum ImDrawListFlags { None = 0, AntiAliasedLines = 1, AntiAliasedLinesUseTex = 2, AntiAliasedFill = 4, AllowVtxOffset = 8 } public struct ImDrawListSplitter { public int _Current; public int _Count; public ImVector _Channels; } public struct ImDrawListSplitterPtr { public unsafe ImDrawListSplitter* NativePtr { get; } public unsafe ref int _Current => ref Unsafe.AsRef<int>(&NativePtr->_Current); public unsafe ref int _Count => ref Unsafe.AsRef<int>(&NativePtr->_Count); public unsafe ImPtrVector<ImDrawChannelPtr> _Channels => new ImPtrVector<ImDrawChannelPtr>(NativePtr->_Channels, Unsafe.SizeOf<ImDrawChannel>()); public unsafe ImDrawListSplitterPtr(ImDrawListSplitter* nativePtr) { NativePtr = nativePtr; } public unsafe ImDrawListSplitterPtr(IntPtr nativePtr) { NativePtr = (ImDrawListSplitter*)(void*)nativePtr; } public unsafe static implicit operator ImDrawListSplitterPtr(ImDrawListSplitter* nativePtr) { return new ImDrawListSplitterPtr(nativePtr); } public unsafe static implicit operator ImDrawListSplitter*(ImDrawListSplitterPtr wrappedPtr) { return wrappedPtr.NativePtr; } public static implicit operator ImDrawListSplitterPtr(IntPtr nativePtr) { return new ImDrawListSplitterPtr(nativePtr); } public unsafe void Clear() { ImGuiNative.ImDrawListSplitter_Clear(NativePtr); } public unsafe void ClearFreeMemory() { ImGuiNative.ImDrawListSplitter_ClearFreeMemory(NativePtr); } public unsafe void Destroy() { ImGuiNative.ImDrawListSplitter_destroy(NativePtr); } public unsafe void Merge(ImDrawListPtr draw_list) { ImDrawList* nativePtr = draw_list.NativePtr; ImGuiNative.ImDrawListSplitter_Merge(NativePtr, nativePtr); } public unsafe void SetCurrentChannel(ImDrawListPtr draw_list, int channel_idx) { ImDrawList* nativePtr = draw_list.NativePtr; ImGuiNative.ImDrawListSplitter_SetCurrentChannel(NativePtr, nativePtr, channel_idx); } public unsafe void Split(ImDrawListPtr draw_list, int count) { ImDrawList* nativePtr = draw_list.NativePtr; ImGuiNative.ImDrawListSplitter_Split(NativePtr, nativePtr, count); } } public struct ImDrawVert { public Vector2 pos; public Vector2 uv; public uint col; } public struct ImDrawVertPtr { public unsafe ImDrawVert* NativePtr { get; } public unsafe ref Vector2 pos => ref Unsafe.AsRef<Vector2>((void*)(&NativePtr->pos)); public unsafe ref Vector2 uv => ref Unsafe.AsRef<Vector2>((void*)(&NativePtr->uv)); public unsafe ref uint col => ref Unsafe.AsRef<uint>(&NativePtr->col); public unsafe ImDrawVertPtr(ImDrawVert* nativePtr) { NativePtr = nativePtr; } public unsafe ImDrawVertPtr(IntPtr nativePtr) { NativePtr = (ImDrawVert*)(void*)nativePtr; } public unsafe static implicit operator ImDrawVertPtr(ImDrawVert* nativePtr) { return new ImDrawVertPtr(nativePtr); } public unsafe static implicit operator ImDrawVert*(ImDrawVertPtr wrappedPtr) { return wrappedPtr.NativePtr; } public static implicit operator ImDrawVertPtr(IntPtr nativePtr) { return new ImDrawVertPtr(nativePtr); } } public struct ImFont { public ImVector IndexAdvanceX; public float FallbackAdvanceX; public float FontSize; public ImVector IndexLookup; public ImVector Glyphs; public unsafe ImFontGlyph* FallbackGlyph; public unsafe ImFontAtlas* ContainerAtlas; public unsafe ImFontConfig* ConfigData; public short ConfigDataCount; public ushort FallbackChar; public ushort EllipsisChar; public short EllipsisCharCount; public float EllipsisWidth; public float EllipsisCharStep; public byte DirtyLookupTables; public float Scale; public float Ascent; public float Descent; public int MetricsTotalSurface; public unsafe fixed byte Used4kPagesMap[2]; } public struct ImFontPtr { public unsafe ImFont* NativePtr { get; } public unsafe ImVector<float> IndexAdvanceX => new ImVector<float>(NativePtr->IndexAdvanceX); public unsafe ref float FallbackAdvanceX => ref Unsafe.AsRef<float>(&NativePtr->FallbackAdvanceX); public unsafe ref float FontSize => ref Unsafe.AsRef<float>(&NativePtr->FontSize); public unsafe ImVector<ushort> IndexLookup => new ImVector<ushort>(NativePtr->IndexLookup); public unsafe ImPtrVector<ImFontGlyphPtr> Glyphs => new ImPtrVector<ImFontGlyphPtr>(NativePtr->Glyphs, Unsafe.SizeOf<ImFontGlyph>()); public unsafe ImFontGlyphPtr FallbackGlyph => new ImFontGlyphPtr(NativePtr->FallbackGlyph); public unsafe ImFontAtlasPtr ContainerAtlas => new ImFontAtlasPtr(NativePtr->ContainerAtlas); public unsafe ImFontConfigPtr ConfigData => new ImFontConfigPtr(NativePtr->ConfigData); public unsafe ref short ConfigDataCount => ref Unsafe.AsRef<short>(&NativePtr->ConfigDataCount); public unsafe ref ushort FallbackChar => ref Unsafe.AsRef<ushort>(&NativePtr->FallbackChar); public unsafe ref ushort EllipsisChar => ref Unsafe.AsRef<ushort>(&NativePtr->EllipsisChar); public unsafe ref short EllipsisCharCount => ref Unsafe.AsRef<short>(&NativePtr->EllipsisCharCount); public unsafe ref float EllipsisWidth => ref Unsafe.AsRef<float>(&NativePtr->EllipsisWidth); public unsafe ref float EllipsisCharStep => ref Unsafe.AsRef<float>(&NativePtr->EllipsisCharStep); public unsafe ref bool DirtyLookupTables => ref Unsafe.AsRef<bool>(&NativePtr->DirtyLookupTables); public unsafe ref float Scale => ref Unsafe.AsRef<float>(&NativePtr->Scale); public unsafe ref float Ascent => ref Unsafe.AsRef<float>(&NativePtr->Ascent); public unsafe ref float Descent => ref Unsafe.AsRef<float>(&NativePtr->Descent); public unsafe ref int MetricsTotalSurface => ref Unsafe.AsRef<int>(&NativePtr->MetricsTotalSurface); public unsafe RangeAccessor<byte> Used4kPagesMap => new RangeAccessor<byte>(NativePtr->Used4kPagesMap, 2); public unsafe ImFontPtr(ImFont* nativePtr) { NativePtr = nativePtr; } public unsafe ImFontPtr(IntPtr nativePtr) { NativePtr = (ImFont*)(void*)nativePtr; } public unsafe static implicit operator ImFontPtr(ImFont* nativePtr) { return new ImFontPtr(nativePtr); } public unsafe static implicit operator ImFont*(ImFontPtr wrappedPtr) { return wrappedPtr.NativePtr; } public static implicit operator ImFontPtr(IntPtr nativePtr) { return new ImFontPtr(nativePtr); } public unsafe void AddGlyph(ImFontConfigPtr src_cfg, ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x) { ImFontConfig* nativePtr = src_cfg.NativePtr; ImGuiNative.ImFont_AddGlyph(NativePtr, nativePtr, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x); } public unsafe void AddRemapChar(ushort dst, ushort src) { byte overwrite_dst = 1; ImGuiNative.ImFont_AddRemapChar(NativePtr, dst, src, overwrite_dst); } public unsafe void AddRemapChar(ushort dst, ushort src, bool overwrite_dst) { byte overwrite_dst2 = (byte)(overwrite_dst ? 1 : 0); ImGuiNative.ImFont_AddRemapChar(NativePtr, dst, src, overwrite_dst2); } public unsafe void BuildLookupTable() { ImGuiNative.ImFont_BuildLookupTable(NativePtr); } public unsafe Vector2 CalcTextSizeA(float size, float max_width, float wrap_width, ReadOnlySpan<char> text_begin) { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; byte** remaining = null; Vector2 result = default(Vector2); ImGuiNative.ImFont_CalcTextSizeA(&result, NativePtr, size, max_width, wrap_width, ptr, ptr + num, remaining); if (num > 2048) { Util.Free(ptr); } return result; } public unsafe Vector2 CalcTextSizeA(float size, float max_width, float wrap_width, string text_begin) { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; byte** remaining = null; Vector2 result = default(Vector2); ImGuiNative.ImFont_CalcTextSizeA(&result, NativePtr, size, max_width, wrap_width, ptr, ptr + num, remaining); if (num > 2048) { Util.Free(ptr); } return result; } public unsafe Vector2 CalcTextSizeA(float size, float max_width, float wrap_width, ReadOnlySpan<char> text_begin, ref byte* remaining) { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; fixed (byte** remaining2 = &remaining) { Vector2 result = default(Vector2); ImGuiNative.ImFont_CalcTextSizeA(&result, NativePtr, size, max_width, wrap_width, ptr, ptr + num, remaining2); if (num > 2048) { Util.Free(ptr); } return result; } } public unsafe Vector2 CalcTextSizeA(float size, float max_width, float wrap_width, string text_begin, ref byte* remaining) { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; fixed (byte** remaining2 = &remaining) { Vector2 result = default(Vector2); ImGuiNative.ImFont_CalcTextSizeA(&result, NativePtr, size, max_width, wrap_width, ptr, ptr + num, remaining2); if (num > 2048) { Util.Free(ptr); } return result; } } public unsafe string CalcWordWrapPositionA(float scale, ReadOnlySpan<char> text, float wrap_width) { int num = 0; byte* ptr; if (text != null) { num = Encoding.UTF8.GetByteCount(text); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text, ptr, num); ptr[utf] = 0; } else { ptr = null; } byte* ptr3 = ImGuiNative.ImFont_CalcWordWrapPositionA(NativePtr, scale, ptr, ptr + num, wrap_width); if (num > 2048) { Util.Free(ptr); } return Util.StringFromPtr(ptr3); } public unsafe string CalcWordWrapPositionA(float scale, string text, float wrap_width) { int num = 0; byte* ptr; if (text != null) { num = Encoding.UTF8.GetByteCount(text); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text, ptr, num); ptr[utf] = 0; } else { ptr = null; } byte* ptr3 = ImGuiNative.ImFont_CalcWordWrapPositionA(NativePtr, scale, ptr, ptr + num, wrap_width); if (num > 2048) { Util.Free(ptr); } return Util.StringFromPtr(ptr3); } public unsafe void ClearOutputData() { ImGuiNative.ImFont_ClearOutputData(NativePtr); } public unsafe void Destroy() { ImGuiNative.ImFont_destroy(NativePtr); } public unsafe ImFontGlyphPtr FindGlyph(ushort c) { ImFontGlyph* nativePtr = ImGuiNative.ImFont_FindGlyph(NativePtr, c); return new ImFontGlyphPtr(nativePtr); } public unsafe ImFontGlyphPtr FindGlyphNoFallback(ushort c) { ImFontGlyph* nativePtr = ImGuiNative.ImFont_FindGlyphNoFallback(NativePtr, c); return new ImFontGlyphPtr(nativePtr); } public unsafe float GetCharAdvance(ushort c) { return ImGuiNative.ImFont_GetCharAdvance(NativePtr, c); } public unsafe string GetDebugName() { byte* ptr = ImGuiNative.ImFont_GetDebugName(NativePtr); return Util.StringFromPtr(ptr); } public unsafe void GrowIndex(int new_size) { ImGuiNative.ImFont_GrowIndex(NativePtr, new_size); } public unsafe bool IsLoaded() { byte b = ImGuiNative.ImFont_IsLoaded(NativePtr); return b != 0; } public unsafe void RenderChar(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, ushort c) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) ImDrawList* nativePtr = draw_list.NativePtr; ImGuiNative.ImFont_RenderChar(NativePtr, nativePtr, size, pos, col, c); } public unsafe void RenderText(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, Vector4 clip_rect, ReadOnlySpan<char> text_begin) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) ImDrawList* nativePtr = draw_list.NativePtr; int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; float wrap_width = 0f; byte cpu_fine_clip = 0; ImGuiNative.ImFont_RenderText(NativePtr, nativePtr, size, pos, col, clip_rect, ptr, ptr + num, wrap_width, cpu_fine_clip); if (num > 2048) { Util.Free(ptr); } } public unsafe void RenderText(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, Vector4 clip_rect, string text_begin) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) ImDrawList* nativePtr = draw_list.NativePtr; int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; float wrap_width = 0f; byte cpu_fine_clip = 0; ImGuiNative.ImFont_RenderText(NativePtr, nativePtr, size, pos, col, clip_rect, ptr, ptr + num, wrap_width, cpu_fine_clip); if (num > 2048) { Util.Free(ptr); } } public unsafe void RenderText(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, Vector4 clip_rect, ReadOnlySpan<char> text_begin, float wrap_width) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) ImDrawList* nativePtr = draw_list.NativePtr; int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; byte cpu_fine_clip = 0; ImGuiNative.ImFont_RenderText(NativePtr, nativePtr, size, pos, col, clip_rect, ptr, ptr + num, wrap_width, cpu_fine_clip); if (num > 2048) { Util.Free(ptr); } } public unsafe void RenderText(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, Vector4 clip_rect, string text_begin, float wrap_width) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) ImDrawList* nativePtr = draw_list.NativePtr; int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; byte cpu_fine_clip = 0; ImGuiNative.ImFont_RenderText(NativePtr, nativePtr, size, pos, col, clip_rect, ptr, ptr + num, wrap_width, cpu_fine_clip); if (num > 2048) { Util.Free(ptr); } } public unsafe void RenderText(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, Vector4 clip_rect, ReadOnlySpan<char> text_begin, float wrap_width, bool cpu_fine_clip) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) ImDrawList* nativePtr = draw_list.NativePtr; int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; byte cpu_fine_clip2 = (byte)(cpu_fine_clip ? 1 : 0); ImGuiNative.ImFont_RenderText(NativePtr, nativePtr, size, pos, col, clip_rect, ptr, ptr + num, wrap_width, cpu_fine_clip2); if (num > 2048) { Util.Free(ptr); } } public unsafe void RenderText(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, Vector4 clip_rect, string text_begin, float wrap_width, bool cpu_fine_clip) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) ImDrawList* nativePtr = draw_list.NativePtr; int num = 0; num = Encoding.UTF8.GetByteCount(text_begin); byte* ptr; if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(text_begin, ptr, num); ptr[utf] = 0; byte cpu_fine_clip2 = (byte)(cpu_fine_clip ? 1 : 0); ImGuiNative.ImFont_RenderText(NativePtr, nativePtr, size, pos, col, clip_rect, ptr, ptr + num, wrap_width, cpu_fine_clip2); if (num > 2048) { Util.Free(ptr); } } public unsafe void SetGlyphVisible(ushort c, bool visible) { byte visible2 = (byte)(visible ? 1 : 0); ImGuiNative.ImFont_SetGlyphVisible(NativePtr, c, visible2); } } public struct ImFontAtlas { public ImFontAtlasFlags Flags; public IntPtr TexID; public int TexDesiredWidth; public int TexGlyphPadding; public byte Locked; public unsafe void* UserData; public byte TexReady; public byte TexPixelsUseColors; public unsafe byte* TexPixelsAlpha8; public unsafe uint* TexPixelsRGBA32; public int TexWidth; public int TexHeight; public Vector2 TexUvScale; public Vector2 TexUvWhitePixel; public ImVector Fonts; public ImVector CustomRects; public ImVector ConfigData; public Vector4 TexUvLines_0; public Vector4 TexUvLines_1; public Vector4 TexUvLines_2; public Vector4 TexUvLines_3; public Vector4 TexUvLines_4; public Vector4 TexUvLines_5; public Vector4 TexUvLines_6; public Vector4 TexUvLines_7; public Vector4 TexUvLines_8; public Vector4 TexUvLines_9; public Vector4 TexUvLines_10; public Vector4 TexUvLines_11; public Vector4 TexUvLines_12; public Vector4 TexUvLines_13; public Vector4 TexUvLines_14; public Vector4 TexUvLines_15; public Vector4 TexUvLines_16; public Vector4 TexUvLines_17; public Vector4 TexUvLines_18; public Vector4 TexUvLines_19; public Vector4 TexUvLines_20; public Vector4 TexUvLines_21; public Vector4 TexUvLines_22; public Vector4 TexUvLines_23; public Vector4 TexUvLines_24; public Vector4 TexUvLines_25; public Vector4 TexUvLines_26; public Vector4 TexUvLines_27; public Vector4 TexUvLines_28; public Vector4 TexUvLines_29; public Vector4 TexUvLines_30; public Vector4 TexUvLines_31; public Vector4 TexUvLines_32; public Vector4 TexUvLines_33; public Vector4 TexUvLines_34; public Vector4 TexUvLines_35; public Vector4 TexUvLines_36; public Vector4 TexUvLines_37; public Vector4 TexUvLines_38; public Vector4 TexUvLines_39; public Vector4 TexUvLines_40; public Vector4 TexUvLines_41; public Vector4 TexUvLines_42; public Vector4 TexUvLines_43; public Vector4 TexUvLines_44; public Vector4 TexUvLines_45; public Vector4 TexUvLines_46; public Vector4 TexUvLines_47; public Vector4 TexUvLines_48; public Vector4 TexUvLines_49; public Vector4 TexUvLines_50; public Vector4 TexUvLines_51; public Vector4 TexUvLines_52; public Vector4 TexUvLines_53; public Vector4 TexUvLines_54; public Vector4 TexUvLines_55; public Vector4 TexUvLines_56; public Vector4 TexUvLines_57; public Vector4 TexUvLines_58; public Vector4 TexUvLines_59; public Vector4 TexUvLines_60; public Vector4 TexUvLines_61; public Vector4 TexUvLines_62; public Vector4 TexUvLines_63; public unsafe IntPtr* FontBuilderIO; public uint FontBuilderFlags; public int PackIdMouseCursors; public int PackIdLines; } public struct ImFontAtlasPtr { public unsafe ImFontAtlas* NativePtr { get; } public unsafe ref ImFontAtlasFlags Flags => ref Unsafe.AsRef<ImFontAtlasFlags>(&NativePtr->Flags); public unsafe ref IntPtr TexID => ref Unsafe.AsRef<IntPtr>(&NativePtr->TexID); public unsafe ref int TexDesiredWidth => ref Unsafe.AsRef<int>(&NativePtr->TexDesiredWidth); public unsafe ref int TexGlyphPadding => ref Unsafe.AsRef<int>(&NativePtr->TexGlyphPadding); public unsafe ref bool Locked => ref Unsafe.AsRef<bool>(&NativePtr->Locked); public unsafe IntPtr UserData { get { return (IntPtr)NativePtr->UserData; } set { NativePtr->UserData = (void*)value; } } public unsafe ref bool TexReady => ref Unsafe.AsRef<bool>(&NativePtr->TexReady); public unsafe ref bool TexPixelsUseColors => ref Unsafe.AsRef<bool>(&NativePtr->TexPixelsUseColors); public unsafe IntPtr TexPixelsAlpha8 { get { return (IntPtr)NativePtr->TexPixelsAlpha8; } set { NativePtr->TexPixelsAlpha8 = (byte*)(void*)value; } } public unsafe IntPtr TexPixelsRGBA32 { get { return (IntPtr)NativePtr->TexPixelsRGBA32; } set { NativePtr->TexPixelsRGBA32 = (uint*)(void*)value; } } public unsafe ref int TexWidth => ref Unsafe.AsRef<int>(&NativePtr->TexWidth); public unsafe ref int TexHeight => ref Unsafe.AsRef<int>(&NativePtr->TexHeight); public unsafe ref Vector2 TexUvScale => ref Unsafe.AsRef<Vector2>((void*)(&NativePtr->TexUvScale)); public unsafe ref Vector2 TexUvWhitePixel => ref Unsafe.AsRef<Vector2>((void*)(&NativePtr->TexUvWhitePixel)); public unsafe ImVector<ImFontPtr> Fonts => new ImVector<ImFontPtr>(NativePtr->Fonts); public unsafe ImPtrVector<ImFontAtlasCustomRectPtr> CustomRects => new ImPtrVector<ImFontAtlasCustomRectPtr>(NativePtr->CustomRects, Unsafe.SizeOf<ImFontAtlasCustomRect>()); public unsafe ImPtrVector<ImFontConfigPtr> ConfigData => new ImPtrVector<ImFontConfigPtr>(NativePtr->ConfigData, Unsafe.SizeOf<ImFontConfig>()); public unsafe RangeAccessor<Vector4> TexUvLines => new RangeAccessor<Vector4>(&NativePtr->TexUvLines_0, 64); public unsafe IntPtr FontBuilderIO { get { return (IntPtr)NativePtr->FontBuilderIO; } set { NativePtr->FontBuilderIO = (IntPtr*)(void*)value; } } public unsafe ref uint FontBuilderFlags => ref Unsafe.AsRef<uint>(&NativePtr->FontBuilderFlags); public unsafe ref int PackIdMouseCursors => ref Unsafe.AsRef<int>(&NativePtr->PackIdMouseCursors); public unsafe ref int PackIdLines => ref Unsafe.AsRef<int>(&NativePtr->PackIdLines); public unsafe ImFontAtlasPtr(ImFontAtlas* nativePtr) { NativePtr = nativePtr; } public unsafe ImFontAtlasPtr(IntPtr nativePtr) { NativePtr = (ImFontAtlas*)(void*)nativePtr; } public unsafe static implicit operator ImFontAtlasPtr(ImFontAtlas* nativePtr) { return new ImFontAtlasPtr(nativePtr); } public unsafe static implicit operator ImFontAtlas*(ImFontAtlasPtr wrappedPtr) { return wrappedPtr.NativePtr; } public static implicit operator ImFontAtlasPtr(IntPtr nativePtr) { return new ImFontAtlasPtr(nativePtr); } public unsafe int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) ImFont* nativePtr = font.NativePtr; return ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph(NativePtr, nativePtr, id, width, height, advance_x, default(Vector2)); } public unsafe int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x, Vector2 offset) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) ImFont* nativePtr = font.NativePtr; return ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph(NativePtr, nativePtr, id, width, height, advance_x, offset); } public unsafe int AddCustomRectRegular(int width, int height) { return ImGuiNative.ImFontAtlas_AddCustomRectRegular(NativePtr, width, height); } public unsafe ImFontPtr AddFont(ImFontConfigPtr font_cfg) { ImFontConfig* nativePtr = font_cfg.NativePtr; ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFont(NativePtr, nativePtr); return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontDefault() { ImFontConfig* font_cfg = null; ImFont* nativePtr = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, font_cfg); return new ImFontPtr(nativePtr); } public unsafe ImFontPtr AddFontDefault(ImFontConfigPtr font_cfg) { ImFontConfig* nativePtr = font_cfg.NativePtr; ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, nativePtr); return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontFromFileTTF(ReadOnlySpan<char> filename, float size_pixels) { int num = 0; byte* ptr; if (filename != null) { num = Encoding.UTF8.GetByteCount(filename); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(filename, ptr, num); ptr[utf] = 0; } else { ptr = null; } ImFontConfig* font_cfg = null; ushort* glyph_ranges = null; ImFont* nativePtr = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, ptr, size_pixels, font_cfg, glyph_ranges); if (num > 2048) { Util.Free(ptr); } return new ImFontPtr(nativePtr); } public unsafe ImFontPtr AddFontFromFileTTF(string filename, float size_pixels) { int num = 0; byte* ptr; if (filename != null) { num = Encoding.UTF8.GetByteCount(filename); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(filename, ptr, num); ptr[utf] = 0; } else { ptr = null; } ImFontConfig* font_cfg = null; ushort* glyph_ranges = null; ImFont* nativePtr = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, ptr, size_pixels, font_cfg, glyph_ranges); if (num > 2048) { Util.Free(ptr); } return new ImFontPtr(nativePtr); } public unsafe ImFontPtr AddFontFromFileTTF(ReadOnlySpan<char> filename, float size_pixels, ImFontConfigPtr font_cfg) { int num = 0; byte* ptr; if (filename != null) { num = Encoding.UTF8.GetByteCount(filename); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(filename, ptr, num); ptr[utf] = 0; } else { ptr = null; } ImFontConfig* nativePtr = font_cfg.NativePtr; ushort* glyph_ranges = null; ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, ptr, size_pixels, nativePtr, glyph_ranges); if (num > 2048) { Util.Free(ptr); } return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontConfigPtr font_cfg) { int num = 0; byte* ptr; if (filename != null) { num = Encoding.UTF8.GetByteCount(filename); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(filename, ptr, num); ptr[utf] = 0; } else { ptr = null; } ImFontConfig* nativePtr = font_cfg.NativePtr; ushort* glyph_ranges = null; ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, ptr, size_pixels, nativePtr, glyph_ranges); if (num > 2048) { Util.Free(ptr); } return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontFromFileTTF(ReadOnlySpan<char> filename, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges) { int num = 0; byte* ptr; if (filename != null) { num = Encoding.UTF8.GetByteCount(filename); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(filename, ptr, num); ptr[utf] = 0; } else { ptr = null; } ImFontConfig* nativePtr = font_cfg.NativePtr; ushort* glyph_ranges2 = (ushort*)glyph_ranges.ToPointer(); ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, ptr, size_pixels, nativePtr, glyph_ranges2); if (num > 2048) { Util.Free(ptr); } return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges) { int num = 0; byte* ptr; if (filename != null) { num = Encoding.UTF8.GetByteCount(filename); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(filename, ptr, num); ptr[utf] = 0; } else { ptr = null; } ImFontConfig* nativePtr = font_cfg.NativePtr; ushort* glyph_ranges2 = (ushort*)glyph_ranges.ToPointer(); ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, ptr, size_pixels, nativePtr, glyph_ranges2); if (num > 2048) { Util.Free(ptr); } return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontFromMemoryCompressedBase85TTF(ReadOnlySpan<char> compressed_font_data_base85, float size_pixels) { int num = 0; byte* ptr; if (compressed_font_data_base85 != null) { num = Encoding.UTF8.GetByteCount(compressed_font_data_base85); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(compressed_font_data_base85, ptr, num); ptr[utf] = 0; } else { ptr = null; } ImFontConfig* font_cfg = null; ushort* glyph_ranges = null; ImFont* nativePtr = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, ptr, size_pixels, font_cfg, glyph_ranges); if (num > 2048) { Util.Free(ptr); } return new ImFontPtr(nativePtr); } public unsafe ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_data_base85, float size_pixels) { int num = 0; byte* ptr; if (compressed_font_data_base85 != null) { num = Encoding.UTF8.GetByteCount(compressed_font_data_base85); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(compressed_font_data_base85, ptr, num); ptr[utf] = 0; } else { ptr = null; } ImFontConfig* font_cfg = null; ushort* glyph_ranges = null; ImFont* nativePtr = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, ptr, size_pixels, font_cfg, glyph_ranges); if (num > 2048) { Util.Free(ptr); } return new ImFontPtr(nativePtr); } public unsafe ImFontPtr AddFontFromMemoryCompressedBase85TTF(ReadOnlySpan<char> compressed_font_data_base85, float size_pixels, ImFontConfigPtr font_cfg) { int num = 0; byte* ptr; if (compressed_font_data_base85 != null) { num = Encoding.UTF8.GetByteCount(compressed_font_data_base85); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(compressed_font_data_base85, ptr, num); ptr[utf] = 0; } else { ptr = null; } ImFontConfig* nativePtr = font_cfg.NativePtr; ushort* glyph_ranges = null; ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, ptr, size_pixels, nativePtr, glyph_ranges); if (num > 2048) { Util.Free(ptr); } return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_data_base85, float size_pixels, ImFontConfigPtr font_cfg) { int num = 0; byte* ptr; if (compressed_font_data_base85 != null) { num = Encoding.UTF8.GetByteCount(compressed_font_data_base85); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(compressed_font_data_base85, ptr, num); ptr[utf] = 0; } else { ptr = null; } ImFontConfig* nativePtr = font_cfg.NativePtr; ushort* glyph_ranges = null; ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, ptr, size_pixels, nativePtr, glyph_ranges); if (num > 2048) { Util.Free(ptr); } return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontFromMemoryCompressedBase85TTF(ReadOnlySpan<char> compressed_font_data_base85, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges) { int num = 0; byte* ptr; if (compressed_font_data_base85 != null) { num = Encoding.UTF8.GetByteCount(compressed_font_data_base85); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(compressed_font_data_base85, ptr, num); ptr[utf] = 0; } else { ptr = null; } ImFontConfig* nativePtr = font_cfg.NativePtr; ushort* glyph_ranges2 = (ushort*)glyph_ranges.ToPointer(); ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, ptr, size_pixels, nativePtr, glyph_ranges2); if (num > 2048) { Util.Free(ptr); } return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_data_base85, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges) { int num = 0; byte* ptr; if (compressed_font_data_base85 != null) { num = Encoding.UTF8.GetByteCount(compressed_font_data_base85); if (num > 2048) { ptr = Util.Allocate(num + 1); } else { byte* ptr2 = stackalloc byte[(int)(uint)(num + 1)]; ptr = ptr2; } int utf = Util.GetUtf8(compressed_font_data_base85, ptr, num); ptr[utf] = 0; } else { ptr = null; } ImFontConfig* nativePtr = font_cfg.NativePtr; ushort* glyph_ranges2 = (ushort*)glyph_ranges.ToPointer(); ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, ptr, size_pixels, nativePtr, glyph_ranges2); if (num > 2048) { Util.Free(ptr); } return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_data_size, float size_pixels) { void* compressed_font_data2 = compressed_font_data.ToPointer(); ImFontConfig* font_cfg = null; ushort* glyph_ranges = null; ImFont* nativePtr = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, compressed_font_data2, compressed_font_data_size, size_pixels, font_cfg, glyph_ranges); return new ImFontPtr(nativePtr); } public unsafe ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_data_size, float size_pixels, ImFontConfigPtr font_cfg) { void* compressed_font_data2 = compressed_font_data.ToPointer(); ImFontConfig* nativePtr = font_cfg.NativePtr; ushort* glyph_ranges = null; ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, compressed_font_data2, compressed_font_data_size, size_pixels, nativePtr, glyph_ranges); return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_data_size, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges) { void* compressed_font_data2 = compressed_font_data.ToPointer(); ImFontConfig* nativePtr = font_cfg.NativePtr; ushort* glyph_ranges2 = (ushort*)glyph_ranges.ToPointer(); ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, compressed_font_data2, compressed_font_data_size, size_pixels, nativePtr, glyph_ranges2); return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_data_size, float size_pixels) { void* font_data2 = font_data.ToPointer(); ImFontConfig* font_cfg = null; ushort* glyph_ranges = null; ImFont* nativePtr = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, font_data2, font_data_size, size_pixels, font_cfg, glyph_ranges); return new ImFontPtr(nativePtr); } public unsafe ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_data_size, float size_pixels, ImFontConfigPtr font_cfg) { void* font_data2 = font_data.ToPointer(); ImFontConfig* nativePtr = font_cfg.NativePtr; ushort* glyph_ranges = null; ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, font_data2, font_data_size, size_pixels, nativePtr, glyph_ranges); return new ImFontPtr(nativePtr2); } public unsafe ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_data_size, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges) { void* font_data2 = font_data.ToPointer(); ImFontConfig* nativePtr = font_cfg.NativePtr; ushort* glyph_ranges2 = (ushort*)glyph_ranges.ToPointer(); ImFont* nativePtr2 = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, font_data2, font_data_size, size_pixels, nativePtr, glyph_ranges2); return new ImFontPtr(nativePtr2); } public unsafe bool Build() { byte b = ImGuiNative.ImFontAtlas_Build(NativePtr); return b != 0; } public unsafe void CalcCustomRectUV(ImFontAtlasCustomRectPtr rect, out Vector2 out_uv_min, out Vector2 out_uv_max) { ImFontAtlasCustomRect* nativePtr = rect.NativePtr; fixed (Vector2* out_uv_min2 = &out_uv_min) { fixed (Vector2* out_uv_max2 = &out_uv_max) { ImGuiNative.ImFontAtlas_CalcCustomRectUV(NativePtr, nativePtr, out_uv_min2, out_uv_max2); } } } public unsafe void Clear() { ImGuiNative.ImFontAtlas_Clear(NativePtr); } public unsafe void ClearFonts() { ImGuiNative.ImFontAtlas_ClearFonts(NativePtr); } public unsafe void ClearInputData() { ImGuiNative.ImFontAtlas_ClearInputData(NativePtr); } public unsafe void ClearTexData() { ImGuiNative.ImFontAtlas_ClearTexData(NativePtr); } public unsafe void Destroy() { ImGuiNative.ImFontAtlas_destroy(NativePtr); } public unsafe ImFontAtlasCustomRectPtr GetCustomRectByIndex(int index) { ImFontAtlasCustomRect* nativePtr = ImGuiNative.ImFontAtlas_GetCustomRectByIndex(NativePtr, index); return new ImFontAtlasCustomRectPtr(nativePtr); } public unsafe IntPtr GetGlyphRangesChineseFull() { ushort* ptr = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseFull(NativePtr); return (IntPtr)ptr; } public unsafe IntPtr GetGlyphRangesChineseSimplifiedCommon() { ushort* ptr = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(NativePtr); return (IntPtr)ptr; } public unsafe IntPtr GetGlyphRangesCyrillic() { ushort* ptr = ImGuiNative.ImFontAtlas_GetGlyphRangesCyrillic(NativePtr); return (IntPtr)ptr; } public unsafe IntPtr GetGlyphRangesDefault() { ushort* ptr = ImGuiNative.ImFontAtlas_GetGlyphRangesDefault(NativePtr); return (IntPtr)ptr; } public unsafe IntPtr GetGlyphRangesGreek() { ushort* ptr = ImGuiNative.ImFontAtlas_GetGlyphRangesGreek(NativePtr); return (IntPtr)ptr; } public unsafe IntPtr GetGlyphRangesJapanese() { ushort* ptr = ImGuiNative.ImFontAtlas_GetGlyphRangesJapanese(NativePtr); return (IntPtr)ptr; } public unsafe IntPtr GetGlyphRangesKorean() { ushort* ptr = ImGuiNative.ImFontAtlas_GetGlyphRangesKorean(NativePtr); return (IntPtr)ptr; } public unsafe IntPtr GetGlyphRangesThai() { ushort* ptr = ImGuiNative.ImFontAtlas_GetGlyphRangesThai(NativePtr); return (IntPtr)ptr; } public unsafe IntPtr GetGlyphRangesVietnamese() { ushort* ptr = ImGuiNative.ImFontAtlas_GetGlyphRangesVietnamese(NativePtr); return (IntPtr)ptr; } public unsafe bool GetMouseCursorTexData(ImGuiMouseCursor cursor, out Vector2 out_offset, out Vector2 out_size, out Vector2 out_uv_border, out Vector2 out_uv_fill) { fixed (Vector2* out_offset2 = &out_offset) { fixed (Vector2* out_size2 = &out_size) { fixed (Vector2* out_uv_border2 = &out_uv_border) { fixed (Vector2* out_uv_fill2 = &out_uv_fill) { byte b = ImGuiNative.ImFontAtlas_GetMouseCursorTexData(NativePtr, cursor, out_offset2, out_size2, out_uv_border2, out_uv_fill2); return b != 0; } } } } }