Update to v1.78.

internals
Eric Mellino 4 years ago
parent 181ceb5451
commit 9b74ee4f79
  1. BIN
      deps/cimgui/linux-x64/cimgui.so
  2. BIN
      deps/cimgui/osx-x64/cimgui.dylib
  3. BIN
      deps/cimgui/win-x64/cimgui.dll
  4. BIN
      deps/cimgui/win-x86/cimgui.dll
  5. 27270
      src/CodeGenerator/definitions.json
  6. 5018
      src/CodeGenerator/structs_and_enums.json
  7. 2
      src/ImGui.NET.SampleProgram.XNA/SampleGame.cs
  8. 2
      src/ImGui.NET.SampleProgram/MemoryEditor.cs
  9. 2
      src/ImGui.NET.SampleProgram/Program.cs
  10. 16
      src/ImGui.NET/Generated/ImColor.gen.cs
  11. 6
      src/ImGui.NET/Generated/ImDrawCmd.gen.cs
  12. 10
      src/ImGui.NET/Generated/ImDrawData.gen.cs
  13. 208
      src/ImGui.NET/Generated/ImDrawList.gen.cs
  14. 5
      src/ImGui.NET/Generated/ImDrawListFlags.gen.cs
  15. 12
      src/ImGui.NET/Generated/ImDrawListSplitter.gen.cs
  16. 38
      src/ImGui.NET/Generated/ImFont.gen.cs
  17. 163
      src/ImGui.NET/Generated/ImFontAtlas.gen.cs
  18. 8
      src/ImGui.NET/Generated/ImFontAtlasCustomRect.gen.cs
  19. 1
      src/ImGui.NET/Generated/ImFontAtlasFlags.gen.cs
  20. 2
      src/ImGui.NET/Generated/ImFontConfig.gen.cs
  21. 6
      src/ImGui.NET/Generated/ImFontGlyph.gen.cs
  22. 20
      src/ImGui.NET/Generated/ImFontGlyphRangesBuilder.gen.cs
  23. 1519
      src/ImGui.NET/Generated/ImGui.gen.cs
  24. 3
      src/ImGui.NET/Generated/ImGuiBackendFlags.gen.cs
  25. 13
      src/ImGui.NET/Generated/ImGuiButtonFlags.gen.cs
  26. 24
      src/ImGui.NET/Generated/ImGuiCol.gen.cs
  27. 11
      src/ImGui.NET/Generated/ImGuiColorEditFlags.gen.cs
  28. 1
      src/ImGui.NET/Generated/ImGuiCond.gen.cs
  29. 4
      src/ImGui.NET/Generated/ImGuiConfigFlags.gen.cs
  30. 14
      src/ImGui.NET/Generated/ImGuiDockNodeFlags.gen.cs
  31. 40
      src/ImGui.NET/Generated/ImGuiIO.gen.cs
  32. 8
      src/ImGui.NET/Generated/ImGuiInputTextCallbackData.gen.cs
  33. 12
      src/ImGui.NET/Generated/ImGuiKeyModFlags.gen.cs
  34. 10
      src/ImGui.NET/Generated/ImGuiListClipper.gen.cs
  35. 290
      src/ImGui.NET/Generated/ImGuiNative.gen.cs
  36. 2
      src/ImGui.NET/Generated/ImGuiOnceUponAFrame.gen.cs
  37. 10
      src/ImGui.NET/Generated/ImGuiPayload.gen.cs
  38. 78
      src/ImGui.NET/Generated/ImGuiPlatformIO.gen.cs
  39. 34
      src/ImGui.NET/Generated/ImGuiPlatformMonitor.gen.cs
  40. 18
      src/ImGui.NET/Generated/ImGuiPopupFlags.gen.cs
  41. 13
      src/ImGui.NET/Generated/ImGuiSliderFlags.gen.cs
  42. 44
      src/ImGui.NET/Generated/ImGuiStorage.gen.cs
  43. 14
      src/ImGui.NET/Generated/ImGuiStyle.gen.cs
  44. 1
      src/ImGui.NET/Generated/ImGuiTabItemFlags.gen.cs
  45. 20
      src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs
  46. 16
      src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs
  47. 6
      src/ImGui.NET/Generated/ImGuiTextRange.gen.cs
  48. 74
      src/ImGui.NET/Generated/ImGuiViewport.gen.cs
  49. 18
      src/ImGui.NET/Generated/ImGuiViewportFlags.gen.cs
  50. 40
      src/ImGui.NET/Generated/ImGuiWindowClass.gen.cs
  51. 2
      src/ImGui.NET/Generated/ImGuiWindowFlags.gen.cs
  52. 2
      src/ImGui.NET/ImDrawList.Manual.cs
  53. 2
      src/ImGui.NET/ImGui.NET.csproj

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -82,7 +82,7 @@ namespace ImGuiNET.SampleProgram.XNA
// Tip: if we don't call ImGui.Begin()/ImGui.End() the widgets appears in a window automatically called "Debug"
{
ImGui.Text("Hello, world!");
ImGui.SliderFloat("float", ref f, 0.0f, 1.0f, string.Empty, 1f);
ImGui.SliderFloat("float", ref f, 0.0f, 1.0f, string.Empty);
ImGui.ColorEdit3("clear color", ref clear_color);
if (ImGui.Button("Test Window")) show_test_window = !show_test_window;
if (ImGui.Button("Another Window")) show_another_window = !show_another_window;

@ -104,7 +104,7 @@ namespace ImGuiNET
float scroll_offset = ((DataEditingAddr / Rows) - (data_editing_addr_backup / Rows)) * line_height;
bool scroll_desired = (scroll_offset < 0.0f && DataEditingAddr < visible_start_addr + Rows * 2) || (scroll_offset > 0.0f && DataEditingAddr > visible_end_addr - Rows * 2);
if (scroll_desired)
ImGuiNative.igSetScrollY(ImGuiNative.igGetScrollY() + scroll_offset);
ImGuiNative.igSetScrollYFloat(ImGuiNative.igGetScrollY() + scroll_offset);
}
for (int line_i = clipper.DisplayStart; line_i < clipper.DisplayEnd; line_i++) // display only visible items

@ -84,7 +84,7 @@ namespace ImGuiNET
// Tip: if we don't call ImGui.BeginWindow()/ImGui.EndWindow() the widgets automatically appears in a window called "Debug".
{
ImGui.Text("Hello, world!"); // Display some text (you can use a format string too)
ImGui.SliderFloat("float", ref _f, 0, 1, _f.ToString("0.000"), 1); // Edit 1 float using a slider from 0.0f to 1.0f
ImGui.SliderFloat("float", ref _f, 0, 1, _f.ToString("0.000")); // Edit 1 float using a slider from 0.0f to 1.0f
//ImGui.ColorEdit3("clear color", ref _clearColor); // Edit 3 floats representing a color
ImGui.Text($"Mouse position: {ImGui.GetMousePos()}");

@ -20,27 +20,29 @@ namespace ImGuiNET
public ref Vector4 Value => ref Unsafe.AsRef<Vector4>(&NativePtr->Value);
public void Destroy()
{
ImGuiNative.ImColor_destroy(NativePtr);
ImGuiNative.ImColor_destroy((ImColor*)(NativePtr));
}
public ImColor HSV(float h, float s, float v)
{
ImColor __retval;
float a = 1.0f;
ImColor ret = ImGuiNative.ImColor_HSV(NativePtr, h, s, v, a);
return ret;
ImGuiNative.ImColor_HSV(&__retval, (ImColor*)(NativePtr), h, s, v, a);
return __retval;
}
public ImColor HSV(float h, float s, float v, float a)
{
ImColor ret = ImGuiNative.ImColor_HSV(NativePtr, h, s, v, a);
return ret;
ImColor __retval;
ImGuiNative.ImColor_HSV(&__retval, (ImColor*)(NativePtr), h, s, v, a);
return __retval;
}
public void SetHSV(float h, float s, float v)
{
float a = 1.0f;
ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a);
ImGuiNative.ImColor_SetHSV((ImColor*)(NativePtr), h, s, v, a);
}
public void SetHSV(float h, float s, float v, float a)
{
ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a);
ImGuiNative.ImColor_SetHSV((ImColor*)(NativePtr), h, s, v, a);
}
}
}

@ -7,11 +7,11 @@ namespace ImGuiNET
{
public unsafe partial struct ImDrawCmd
{
public uint ElemCount;
public Vector4 ClipRect;
public IntPtr TextureId;
public uint VtxOffset;
public uint IdxOffset;
public uint ElemCount;
public IntPtr UserCallback;
public void* UserCallbackData;
}
@ -23,16 +23,16 @@ namespace ImGuiNET
public static implicit operator ImDrawCmdPtr(ImDrawCmd* nativePtr) => new ImDrawCmdPtr(nativePtr);
public static implicit operator ImDrawCmd* (ImDrawCmdPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImDrawCmdPtr(IntPtr nativePtr) => new ImDrawCmdPtr(nativePtr);
public ref uint ElemCount => ref Unsafe.AsRef<uint>(&NativePtr->ElemCount);
public ref Vector4 ClipRect => ref Unsafe.AsRef<Vector4>(&NativePtr->ClipRect);
public ref IntPtr TextureId => ref Unsafe.AsRef<IntPtr>(&NativePtr->TextureId);
public ref uint VtxOffset => ref Unsafe.AsRef<uint>(&NativePtr->VtxOffset);
public ref uint IdxOffset => ref Unsafe.AsRef<uint>(&NativePtr->IdxOffset);
public ref uint ElemCount => ref Unsafe.AsRef<uint>(&NativePtr->ElemCount);
public ref IntPtr UserCallback => ref Unsafe.AsRef<IntPtr>(&NativePtr->UserCallback);
public IntPtr UserCallbackData { get => (IntPtr)NativePtr->UserCallbackData; set => NativePtr->UserCallbackData = (void*)value; }
public void Destroy()
{
ImGuiNative.ImDrawCmd_destroy(NativePtr);
ImGuiNative.ImDrawCmd_destroy((ImDrawCmd*)(NativePtr));
}
}
}

@ -15,6 +15,7 @@ namespace ImGuiNET
public Vector2 DisplayPos;
public Vector2 DisplaySize;
public Vector2 FramebufferScale;
public ImGuiViewport* OwnerViewport;
}
public unsafe partial struct ImDrawDataPtr
{
@ -32,21 +33,22 @@ namespace ImGuiNET
public ref Vector2 DisplayPos => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayPos);
public ref Vector2 DisplaySize => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplaySize);
public ref Vector2 FramebufferScale => ref Unsafe.AsRef<Vector2>(&NativePtr->FramebufferScale);
public ImGuiViewportPtr OwnerViewport => new ImGuiViewportPtr(NativePtr->OwnerViewport);
public void Clear()
{
ImGuiNative.ImDrawData_Clear(NativePtr);
ImGuiNative.ImDrawData_Clear((ImDrawData*)(NativePtr));
}
public void DeIndexAllBuffers()
{
ImGuiNative.ImDrawData_DeIndexAllBuffers(NativePtr);
ImGuiNative.ImDrawData_DeIndexAllBuffers((ImDrawData*)(NativePtr));
}
public void Destroy()
{
ImGuiNative.ImDrawData_destroy(NativePtr);
ImGuiNative.ImDrawData_destroy((ImDrawData*)(NativePtr));
}
public void ScaleClipRects(Vector2 fb_scale)
{
ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, fb_scale);
ImGuiNative.ImDrawData_ScaleClipRects((ImDrawData*)(NativePtr), fb_scale);
}
}
}

@ -13,13 +13,13 @@ namespace ImGuiNET
public ImDrawListFlags Flags;
public IntPtr _Data;
public byte* _OwnerName;
public uint _VtxCurrentOffset;
public uint _VtxCurrentIdx;
public ImDrawVert* _VtxWritePtr;
public ushort* _IdxWritePtr;
public ImVector _ClipRectStack;
public ImVector _TextureIdStack;
public ImVector _Path;
public ImDrawCmd _CmdHeader;
public ImDrawListSplitter _Splitter;
}
public unsafe partial struct ImDrawListPtr
@ -36,84 +36,108 @@ namespace ImGuiNET
public ref ImDrawListFlags Flags => ref Unsafe.AsRef<ImDrawListFlags>(&NativePtr->Flags);
public ref IntPtr _Data => ref Unsafe.AsRef<IntPtr>(&NativePtr->_Data);
public NullTerminatedString _OwnerName => new NullTerminatedString(NativePtr->_OwnerName);
public ref uint _VtxCurrentOffset => ref Unsafe.AsRef<uint>(&NativePtr->_VtxCurrentOffset);
public ref uint _VtxCurrentIdx => ref Unsafe.AsRef<uint>(&NativePtr->_VtxCurrentIdx);
public ImDrawVertPtr _VtxWritePtr => new ImDrawVertPtr(NativePtr->_VtxWritePtr);
public IntPtr _IdxWritePtr { get => (IntPtr)NativePtr->_IdxWritePtr; set => NativePtr->_IdxWritePtr = (ushort*)value; }
public ImVector<Vector4> _ClipRectStack => new ImVector<Vector4>(NativePtr->_ClipRectStack);
public ImVector<IntPtr> _TextureIdStack => new ImVector<IntPtr>(NativePtr->_TextureIdStack);
public ImVector<Vector2> _Path => new ImVector<Vector2>(NativePtr->_Path);
public ref ImDrawCmd _CmdHeader => ref Unsafe.AsRef<ImDrawCmd>(&NativePtr->_CmdHeader);
public ref ImDrawListSplitter _Splitter => ref Unsafe.AsRef<ImDrawListSplitter>(&NativePtr->_Splitter);
public void _ClearFreeMemory()
{
ImGuiNative.ImDrawList__ClearFreeMemory((ImDrawList*)(NativePtr));
}
public void _OnChangedClipRect()
{
ImGuiNative.ImDrawList__OnChangedClipRect((ImDrawList*)(NativePtr));
}
public void _OnChangedTextureID()
{
ImGuiNative.ImDrawList__OnChangedTextureID((ImDrawList*)(NativePtr));
}
public void _OnChangedVtxOffset()
{
ImGuiNative.ImDrawList__OnChangedVtxOffset((ImDrawList*)(NativePtr));
}
public void _PopUnusedDrawCmd()
{
ImGuiNative.ImDrawList__PopUnusedDrawCmd((ImDrawList*)(NativePtr));
}
public void _ResetForNewFrame()
{
ImGuiNative.ImDrawList__ResetForNewFrame((ImDrawList*)(NativePtr));
}
public void AddBezierCurve(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness)
{
int num_segments = 0;
ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, p1, p2, p3, p4, col, thickness, num_segments);
ImGuiNative.ImDrawList_AddBezierCurve((ImDrawList*)(NativePtr), p1, p2, p3, p4, col, thickness, num_segments);
}
public void AddBezierCurve(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness, int num_segments)
{
ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, p1, p2, p3, p4, col, thickness, num_segments);
ImGuiNative.ImDrawList_AddBezierCurve((ImDrawList*)(NativePtr), p1, p2, p3, p4, col, thickness, num_segments);
}
public void AddCallback(IntPtr callback, IntPtr callback_data)
{
void* native_callback_data = (void*)callback_data.ToPointer();
ImGuiNative.ImDrawList_AddCallback(NativePtr, callback, native_callback_data);
ImGuiNative.ImDrawList_AddCallback((ImDrawList*)(NativePtr), callback, native_callback_data);
}
public void AddCircle(Vector2 center, float radius, uint col)
{
int num_segments = 12;
int num_segments = 0;
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddCircle(NativePtr, center, radius, col, num_segments, thickness);
ImGuiNative.ImDrawList_AddCircle((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness);
}
public void AddCircle(Vector2 center, float radius, uint col, int num_segments)
{
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddCircle(NativePtr, center, radius, col, num_segments, thickness);
ImGuiNative.ImDrawList_AddCircle((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness);
}
public void AddCircle(Vector2 center, float radius, uint col, int num_segments, float thickness)
{
ImGuiNative.ImDrawList_AddCircle(NativePtr, center, radius, col, num_segments, thickness);
ImGuiNative.ImDrawList_AddCircle((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness);
}
public void AddCircleFilled(Vector2 center, float radius, uint col)
{
int num_segments = 12;
ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, center, radius, col, num_segments);
int num_segments = 0;
ImGuiNative.ImDrawList_AddCircleFilled((ImDrawList*)(NativePtr), center, radius, col, num_segments);
}
public void AddCircleFilled(Vector2 center, float radius, uint col, int num_segments)
{
ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, center, radius, col, num_segments);
ImGuiNative.ImDrawList_AddCircleFilled((ImDrawList*)(NativePtr), center, radius, col, num_segments);
}
public void AddConvexPolyFilled(ref Vector2 points, int num_points, uint col)
{
fixed (Vector2* native_points = &points)
{
ImGuiNative.ImDrawList_AddConvexPolyFilled(NativePtr, native_points, num_points, col);
ImGuiNative.ImDrawList_AddConvexPolyFilled((ImDrawList*)(NativePtr), native_points, num_points, col);
}
}
public void AddDrawCmd()
{
ImGuiNative.ImDrawList_AddDrawCmd(NativePtr);
ImGuiNative.ImDrawList_AddDrawCmd((ImDrawList*)(NativePtr));
}
public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max)
{
Vector2 uv_min = new Vector2();
Vector2 uv_max = new Vector2(1, 1);
uint col = 0xFFFFFFFF;
ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col);
ImGuiNative.ImDrawList_AddImage((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col);
}
public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min)
{
Vector2 uv_max = new Vector2(1, 1);
uint col = 0xFFFFFFFF;
ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col);
ImGuiNative.ImDrawList_AddImage((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col);
}
public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max)
{
uint col = 0xFFFFFFFF;
ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col);
ImGuiNative.ImDrawList_AddImage((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col);
}
public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col)
{
ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col);
ImGuiNative.ImDrawList_AddImage((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col);
}
public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4)
{
@ -122,7 +146,7 @@ namespace ImGuiNET
Vector2 uv3 = new Vector2(1, 1);
Vector2 uv4 = new Vector2(0, 1);
uint col = 0xFFFFFFFF;
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
}
public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1)
{
@ -130,304 +154,290 @@ namespace ImGuiNET
Vector2 uv3 = new Vector2(1, 1);
Vector2 uv4 = new Vector2(0, 1);
uint col = 0xFFFFFFFF;
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
}
public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2)
{
Vector2 uv3 = new Vector2(1, 1);
Vector2 uv4 = new Vector2(0, 1);
uint col = 0xFFFFFFFF;
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
}
public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3)
{
Vector2 uv4 = new Vector2(0, 1);
uint col = 0xFFFFFFFF;
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
}
public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4)
{
uint col = 0xFFFFFFFF;
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
}
public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4, uint col)
{
ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col);
}
public void AddImageRounded(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col, float rounding)
{
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, rounding_corners);
ImGuiNative.ImDrawList_AddImageRounded((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, rounding_corners);
}
public void AddImageRounded(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col, float rounding, ImDrawCornerFlags rounding_corners)
{
ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, rounding_corners);
ImGuiNative.ImDrawList_AddImageRounded((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, rounding_corners);
}
public void AddLine(Vector2 p1, Vector2 p2, uint col)
{
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddLine(NativePtr, p1, p2, col, thickness);
ImGuiNative.ImDrawList_AddLine((ImDrawList*)(NativePtr), p1, p2, col, thickness);
}
public void AddLine(Vector2 p1, Vector2 p2, uint col, float thickness)
{
ImGuiNative.ImDrawList_AddLine(NativePtr, p1, p2, col, thickness);
ImGuiNative.ImDrawList_AddLine((ImDrawList*)(NativePtr), p1, p2, col, thickness);
}
public void AddNgon(Vector2 center, float radius, uint col, int num_segments)
{
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddNgon(NativePtr, center, radius, col, num_segments, thickness);
ImGuiNative.ImDrawList_AddNgon((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness);
}
public void AddNgon(Vector2 center, float radius, uint col, int num_segments, float thickness)
{
ImGuiNative.ImDrawList_AddNgon(NativePtr, center, radius, col, num_segments, thickness);
ImGuiNative.ImDrawList_AddNgon((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness);
}
public void AddNgonFilled(Vector2 center, float radius, uint col, int num_segments)
{
ImGuiNative.ImDrawList_AddNgonFilled(NativePtr, center, radius, col, num_segments);
ImGuiNative.ImDrawList_AddNgonFilled((ImDrawList*)(NativePtr), center, radius, col, num_segments);
}
public void AddPolyline(ref Vector2 points, int num_points, uint col, bool closed, float thickness)
{
byte native_closed = closed ? (byte)1 : (byte)0;
fixed (Vector2* native_points = &points)
{
ImGuiNative.ImDrawList_AddPolyline(NativePtr, native_points, num_points, col, native_closed, thickness);
ImGuiNative.ImDrawList_AddPolyline((ImDrawList*)(NativePtr), native_points, num_points, col, native_closed, thickness);
}
}
public void AddQuad(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col)
{
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddQuad(NativePtr, p1, p2, p3, p4, col, thickness);
ImGuiNative.ImDrawList_AddQuad((ImDrawList*)(NativePtr), p1, p2, p3, p4, col, thickness);
}
public void AddQuad(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness)
{
ImGuiNative.ImDrawList_AddQuad(NativePtr, p1, p2, p3, p4, col, thickness);
ImGuiNative.ImDrawList_AddQuad((ImDrawList*)(NativePtr), p1, p2, p3, p4, col, thickness);
}
public void AddQuadFilled(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col)
{
ImGuiNative.ImDrawList_AddQuadFilled(NativePtr, p1, p2, p3, p4, col);
ImGuiNative.ImDrawList_AddQuadFilled((ImDrawList*)(NativePtr), p1, p2, p3, p4, col);
}
public void AddRect(Vector2 p_min, Vector2 p_max, uint col)
{
float rounding = 0.0f;
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddRect(NativePtr, p_min, p_max, col, rounding, rounding_corners, thickness);
ImGuiNative.ImDrawList_AddRect((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, rounding_corners, thickness);
}
public void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding)
{
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddRect(NativePtr, p_min, p_max, col, rounding, rounding_corners, thickness);
ImGuiNative.ImDrawList_AddRect((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, rounding_corners, thickness);
}
public void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawCornerFlags rounding_corners)
{
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddRect(NativePtr, p_min, p_max, col, rounding, rounding_corners, thickness);
ImGuiNative.ImDrawList_AddRect((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, rounding_corners, thickness);
}
public void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawCornerFlags rounding_corners, float thickness)
{
ImGuiNative.ImDrawList_AddRect(NativePtr, p_min, p_max, col, rounding, rounding_corners, thickness);
ImGuiNative.ImDrawList_AddRect((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, rounding_corners, thickness);
}
public void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col)
{
float rounding = 0.0f;
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, p_min, p_max, col, rounding, rounding_corners);
ImGuiNative.ImDrawList_AddRectFilled((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, rounding_corners);
}
public void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col, float rounding)
{
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, p_min, p_max, col, rounding, rounding_corners);
ImGuiNative.ImDrawList_AddRectFilled((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, rounding_corners);
}
public void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawCornerFlags rounding_corners)
{
ImGuiNative.ImDrawList_AddRectFilled(NativePtr, p_min, p_max, col, rounding, rounding_corners);
ImGuiNative.ImDrawList_AddRectFilled((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, rounding_corners);
}
public void AddRectFilledMultiColor(Vector2 p_min, Vector2 p_max, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left)
{
ImGuiNative.ImDrawList_AddRectFilledMultiColor(NativePtr, p_min, p_max, col_upr_left, col_upr_right, col_bot_right, col_bot_left);
ImGuiNative.ImDrawList_AddRectFilledMultiColor((ImDrawList*)(NativePtr), p_min, p_max, col_upr_left, col_upr_right, col_bot_right, col_bot_left);
}
public void AddTriangle(Vector2 p1, Vector2 p2, Vector2 p3, uint col)
{
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddTriangle(NativePtr, p1, p2, p3, col, thickness);
ImGuiNative.ImDrawList_AddTriangle((ImDrawList*)(NativePtr), p1, p2, p3, col, thickness);
}
public void AddTriangle(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness)
{
ImGuiNative.ImDrawList_AddTriangle(NativePtr, p1, p2, p3, col, thickness);
ImGuiNative.ImDrawList_AddTriangle((ImDrawList*)(NativePtr), p1, p2, p3, col, thickness);
}
public void AddTriangleFilled(Vector2 p1, Vector2 p2, Vector2 p3, uint col)
{
ImGuiNative.ImDrawList_AddTriangleFilled(NativePtr, p1, p2, p3, col);
ImGuiNative.ImDrawList_AddTriangleFilled((ImDrawList*)(NativePtr), p1, p2, p3, col);
}
public void ChannelsMerge()
{
ImGuiNative.ImDrawList_ChannelsMerge(NativePtr);
ImGuiNative.ImDrawList_ChannelsMerge((ImDrawList*)(NativePtr));
}
public void ChannelsSetCurrent(int n)
{
ImGuiNative.ImDrawList_ChannelsSetCurrent(NativePtr, n);
ImGuiNative.ImDrawList_ChannelsSetCurrent((ImDrawList*)(NativePtr), n);
}
public void ChannelsSplit(int count)
{
ImGuiNative.ImDrawList_ChannelsSplit(NativePtr, count);
}
public void Clear()
{
ImGuiNative.ImDrawList_Clear(NativePtr);
}
public void ClearFreeMemory()
{
ImGuiNative.ImDrawList_ClearFreeMemory(NativePtr);
ImGuiNative.ImDrawList_ChannelsSplit((ImDrawList*)(NativePtr), count);
}
public ImDrawListPtr CloneOutput()
{
ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput(NativePtr);
ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput((ImDrawList*)(NativePtr));
return new ImDrawListPtr(ret);
}
public void Destroy()
{
ImGuiNative.ImDrawList_destroy(NativePtr);
ImGuiNative.ImDrawList_destroy((ImDrawList*)(NativePtr));
}
public Vector2 GetClipRectMax()
{
Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMax(NativePtr);
return ret;
Vector2 __retval;
ImGuiNative.ImDrawList_GetClipRectMax(&__retval, (ImDrawList*)(NativePtr));
return __retval;
}
public Vector2 GetClipRectMin()
{
Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMin(NativePtr);
return ret;
Vector2 __retval;
ImGuiNative.ImDrawList_GetClipRectMin(&__retval, (ImDrawList*)(NativePtr));
return __retval;
}
public void PathArcTo(Vector2 center, float radius, float a_min, float a_max)
{
int num_segments = 10;
ImGuiNative.ImDrawList_PathArcTo(NativePtr, center, radius, a_min, a_max, num_segments);
ImGuiNative.ImDrawList_PathArcTo((ImDrawList*)(NativePtr), center, radius, a_min, a_max, num_segments);
}
public void PathArcTo(Vector2 center, float radius, float a_min, float a_max, int num_segments)
{
ImGuiNative.ImDrawList_PathArcTo(NativePtr, center, radius, a_min, a_max, num_segments);
ImGuiNative.ImDrawList_PathArcTo((ImDrawList*)(NativePtr), center, radius, a_min, a_max, num_segments);
}
public void PathArcToFast(Vector2 center, float radius, int a_min_of_12, int a_max_of_12)
{
ImGuiNative.ImDrawList_PathArcToFast(NativePtr, center, radius, a_min_of_12, a_max_of_12);
ImGuiNative.ImDrawList_PathArcToFast((ImDrawList*)(NativePtr), center, radius, a_min_of_12, a_max_of_12);
}
public void PathBezierCurveTo(Vector2 p2, Vector2 p3, Vector2 p4)
{
int num_segments = 0;
ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p2, p3, p4, num_segments);
ImGuiNative.ImDrawList_PathBezierCurveTo((ImDrawList*)(NativePtr), p2, p3, p4, num_segments);
}
public void PathBezierCurveTo(Vector2 p2, Vector2 p3, Vector2 p4, int num_segments)
{
ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p2, p3, p4, num_segments);
ImGuiNative.ImDrawList_PathBezierCurveTo((ImDrawList*)(NativePtr), p2, p3, p4, num_segments);
}
public void PathClear()
{
ImGuiNative.ImDrawList_PathClear(NativePtr);
ImGuiNative.ImDrawList_PathClear((ImDrawList*)(NativePtr));
}
public void PathFillConvex(uint col)
{
ImGuiNative.ImDrawList_PathFillConvex(NativePtr, col);
ImGuiNative.ImDrawList_PathFillConvex((ImDrawList*)(NativePtr), col);
}
public void PathLineTo(Vector2 pos)
{
ImGuiNative.ImDrawList_PathLineTo(NativePtr, pos);
ImGuiNative.ImDrawList_PathLineTo((ImDrawList*)(NativePtr), pos);
}
public void PathLineToMergeDuplicate(Vector2 pos)
{
ImGuiNative.ImDrawList_PathLineToMergeDuplicate(NativePtr, pos);
ImGuiNative.ImDrawList_PathLineToMergeDuplicate((ImDrawList*)(NativePtr), pos);
}
public void PathRect(Vector2 rect_min, Vector2 rect_max)
{
float rounding = 0.0f;
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners);
ImGuiNative.ImDrawList_PathRect((ImDrawList*)(NativePtr), rect_min, rect_max, rounding, rounding_corners);
}
public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding)
{
ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All;
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners);
ImGuiNative.ImDrawList_PathRect((ImDrawList*)(NativePtr), rect_min, rect_max, rounding, rounding_corners);
}
public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding, ImDrawCornerFlags rounding_corners)
{
ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners);
ImGuiNative.ImDrawList_PathRect((ImDrawList*)(NativePtr), rect_min, rect_max, rounding, rounding_corners);
}
public void PathStroke(uint col, bool closed)
{
byte native_closed = closed ? (byte)1 : (byte)0;
float thickness = 1.0f;
ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness);
ImGuiNative.ImDrawList_PathStroke((ImDrawList*)(NativePtr), col, native_closed, thickness);
}
public void PathStroke(uint col, bool closed, float thickness)
{
byte native_closed = closed ? (byte)1 : (byte)0;
ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness);
ImGuiNative.ImDrawList_PathStroke((ImDrawList*)(NativePtr), col, native_closed, thickness);
}
public void PopClipRect()
{
ImGuiNative.ImDrawList_PopClipRect(NativePtr);
ImGuiNative.ImDrawList_PopClipRect((ImDrawList*)(NativePtr));
}
public void PopTextureID()
{
ImGuiNative.ImDrawList_PopTextureID(NativePtr);
ImGuiNative.ImDrawList_PopTextureID((ImDrawList*)(NativePtr));
}
public void PrimQuadUV(Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col)
{
ImGuiNative.ImDrawList_PrimQuadUV(NativePtr, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col);
ImGuiNative.ImDrawList_PrimQuadUV((ImDrawList*)(NativePtr), a, b, c, d, uv_a, uv_b, uv_c, uv_d, col);
}
public void PrimRect(Vector2 a, Vector2 b, uint col)
{
ImGuiNative.ImDrawList_PrimRect(NativePtr, a, b, col);
ImGuiNative.ImDrawList_PrimRect((ImDrawList*)(NativePtr), a, b, col);
}
public void PrimRectUV(Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col)
{
ImGuiNative.ImDrawList_PrimRectUV(NativePtr, a, b, uv_a, uv_b, col);
ImGuiNative.ImDrawList_PrimRectUV((ImDrawList*)(NativePtr), a, b, uv_a, uv_b, col);
}
public void PrimReserve(int idx_count, int vtx_count)
{
ImGuiNative.ImDrawList_PrimReserve(NativePtr, idx_count, vtx_count);
ImGuiNative.ImDrawList_PrimReserve((ImDrawList*)(NativePtr), idx_count, vtx_count);
}
public void PrimUnreserve(int idx_count, int vtx_count)
{
ImGuiNative.ImDrawList_PrimUnreserve(NativePtr, idx_count, vtx_count);
ImGuiNative.ImDrawList_PrimUnreserve((ImDrawList*)(NativePtr), idx_count, vtx_count);
}
public void PrimVtx(Vector2 pos, Vector2 uv, uint col)
{
ImGuiNative.ImDrawList_PrimVtx(NativePtr, pos, uv, col);
ImGuiNative.ImDrawList_PrimVtx((ImDrawList*)(NativePtr), pos, uv, col);
}
public void PrimWriteIdx(ushort idx)
{
ImGuiNative.ImDrawList_PrimWriteIdx(NativePtr, idx);
ImGuiNative.ImDrawList_PrimWriteIdx((ImDrawList*)(NativePtr), idx);
}
public void PrimWriteVtx(Vector2 pos, Vector2 uv, uint col)
{
ImGuiNative.ImDrawList_PrimWriteVtx(NativePtr, pos, uv, col);
ImGuiNative.ImDrawList_PrimWriteVtx((ImDrawList*)(NativePtr), pos, uv, col);
}
public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max)
{
byte intersect_with_current_clip_rect = 0;
ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect);
ImGuiNative.ImDrawList_PushClipRect((ImDrawList*)(NativePtr), clip_rect_min, clip_rect_max, intersect_with_current_clip_rect);
}
public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, bool intersect_with_current_clip_rect)
{
byte native_intersect_with_current_clip_rect = intersect_with_current_clip_rect ? (byte)1 : (byte)0;
ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect);
ImGuiNative.ImDrawList_PushClipRect((ImDrawList*)(NativePtr), clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect);
}
public void PushClipRectFullScreen()
{
ImGuiNative.ImDrawList_PushClipRectFullScreen(NativePtr);
ImGuiNative.ImDrawList_PushClipRectFullScreen((ImDrawList*)(NativePtr));
}
public void PushTextureID(IntPtr texture_id)
{
ImGuiNative.ImDrawList_PushTextureID(NativePtr, texture_id);
}
public void UpdateClipRect()
{
ImGuiNative.ImDrawList_UpdateClipRect(NativePtr);
}
public void UpdateTextureID()
{
ImGuiNative.ImDrawList_UpdateTextureID(NativePtr);
ImGuiNative.ImDrawList_PushTextureID((ImDrawList*)(NativePtr), texture_id);
}
}
}

@ -5,7 +5,8 @@ namespace ImGuiNET
{
None = 0,
AntiAliasedLines = 1 << 0,
AntiAliasedFill = 1 << 1,
AllowVtxOffset = 1 << 2,
AntiAliasedLinesUseTex = 1 << 1,
AntiAliasedFill = 1 << 2,
AllowVtxOffset = 1 << 3,
}
}

@ -24,30 +24,30 @@ namespace ImGuiNET
public ImPtrVector<ImDrawChannelPtr> _Channels => new ImPtrVector<ImDrawChannelPtr>(NativePtr->_Channels, Unsafe.SizeOf<ImDrawChannel>());
public void Clear()
{
ImGuiNative.ImDrawListSplitter_Clear(NativePtr);
ImGuiNative.ImDrawListSplitter_Clear((ImDrawListSplitter*)(NativePtr));
}
public void ClearFreeMemory()
{
ImGuiNative.ImDrawListSplitter_ClearFreeMemory(NativePtr);
ImGuiNative.ImDrawListSplitter_ClearFreeMemory((ImDrawListSplitter*)(NativePtr));
}
public void Destroy()
{
ImGuiNative.ImDrawListSplitter_destroy(NativePtr);
ImGuiNative.ImDrawListSplitter_destroy((ImDrawListSplitter*)(NativePtr));
}
public void Merge(ImDrawListPtr draw_list)
{
ImDrawList* native_draw_list = draw_list.NativePtr;
ImGuiNative.ImDrawListSplitter_Merge(NativePtr, native_draw_list);
ImGuiNative.ImDrawListSplitter_Merge((ImDrawListSplitter*)(NativePtr), native_draw_list);
}
public void SetCurrentChannel(ImDrawListPtr draw_list, int channel_idx)
{
ImDrawList* native_draw_list = draw_list.NativePtr;
ImGuiNative.ImDrawListSplitter_SetCurrentChannel(NativePtr, native_draw_list, channel_idx);
ImGuiNative.ImDrawListSplitter_SetCurrentChannel((ImDrawListSplitter*)(NativePtr), native_draw_list, channel_idx);
}
public void Split(ImDrawListPtr draw_list, int count)
{
ImDrawList* native_draw_list = draw_list.NativePtr;
ImGuiNative.ImDrawListSplitter_Split(NativePtr, native_draw_list, count);
ImGuiNative.ImDrawListSplitter_Split((ImDrawListSplitter*)(NativePtr), native_draw_list, count);
}
}
}

@ -24,6 +24,7 @@ namespace ImGuiNET
public float Ascent;
public float Descent;
public int MetricsTotalSurface;
public fixed byte Used4kPagesMap[2];
}
public unsafe partial struct ImFontPtr
{
@ -50,69 +51,76 @@ namespace ImGuiNET
public ref float Ascent => ref Unsafe.AsRef<float>(&NativePtr->Ascent);
public ref float Descent => ref Unsafe.AsRef<float>(&NativePtr->Descent);
public ref int MetricsTotalSurface => ref Unsafe.AsRef<int>(&NativePtr->MetricsTotalSurface);
public void AddGlyph(ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x)
public RangeAccessor<byte> Used4kPagesMap => new RangeAccessor<byte>(NativePtr->Used4kPagesMap, 2);
public 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)
{
ImGuiNative.ImFont_AddGlyph(NativePtr, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x);
ImFontConfig* native_src_cfg = src_cfg.NativePtr;
ImGuiNative.ImFont_AddGlyph((ImFont*)(NativePtr), native_src_cfg, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x);
}
public void AddRemapChar(ushort dst, ushort src)
{
byte overwrite_dst = 1;
ImGuiNative.ImFont_AddRemapChar(NativePtr, dst, src, overwrite_dst);
ImGuiNative.ImFont_AddRemapChar((ImFont*)(NativePtr), dst, src, overwrite_dst);
}
public void AddRemapChar(ushort dst, ushort src, bool overwrite_dst)
{
byte native_overwrite_dst = overwrite_dst ? (byte)1 : (byte)0;
ImGuiNative.ImFont_AddRemapChar(NativePtr, dst, src, native_overwrite_dst);
ImGuiNative.ImFont_AddRemapChar((ImFont*)(NativePtr), dst, src, native_overwrite_dst);
}
public void BuildLookupTable()
{
ImGuiNative.ImFont_BuildLookupTable(NativePtr);
ImGuiNative.ImFont_BuildLookupTable((ImFont*)(NativePtr));
}
public void ClearOutputData()
{
ImGuiNative.ImFont_ClearOutputData(NativePtr);
ImGuiNative.ImFont_ClearOutputData((ImFont*)(NativePtr));
}
public void Destroy()
{
ImGuiNative.ImFont_destroy(NativePtr);
ImGuiNative.ImFont_destroy((ImFont*)(NativePtr));
}
public ImFontGlyphPtr FindGlyph(ushort c)
{
ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph(NativePtr, c);
ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph((ImFont*)(NativePtr), c);
return new ImFontGlyphPtr(ret);
}
public ImFontGlyphPtr FindGlyphNoFallback(ushort c)
{
ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyphNoFallback(NativePtr, c);
ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyphNoFallback((ImFont*)(NativePtr), c);
return new ImFontGlyphPtr(ret);
}
public float GetCharAdvance(ushort c)
{
float ret = ImGuiNative.ImFont_GetCharAdvance(NativePtr, c);
float ret = ImGuiNative.ImFont_GetCharAdvance((ImFont*)(NativePtr), c);
return ret;
}
public string GetDebugName()
{
byte* ret = ImGuiNative.ImFont_GetDebugName(NativePtr);
byte* ret = ImGuiNative.ImFont_GetDebugName((ImFont*)(NativePtr));
return Util.StringFromPtr(ret);
}
public void GrowIndex(int new_size)
{
ImGuiNative.ImFont_GrowIndex(NativePtr, new_size);
ImGuiNative.ImFont_GrowIndex((ImFont*)(NativePtr), new_size);
}
public bool IsLoaded()
{
byte ret = ImGuiNative.ImFont_IsLoaded(NativePtr);
byte ret = ImGuiNative.ImFont_IsLoaded((ImFont*)(NativePtr));
return ret != 0;
}
public void RenderChar(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, ushort c)
{
ImDrawList* native_draw_list = draw_list.NativePtr;
ImGuiNative.ImFont_RenderChar(NativePtr, native_draw_list, size, pos, col, c);
ImGuiNative.ImFont_RenderChar((ImFont*)(NativePtr), native_draw_list, size, pos, col, c);
}
public void SetFallbackChar(ushort c)
{
ImGuiNative.ImFont_SetFallbackChar(NativePtr, c);
ImGuiNative.ImFont_SetFallbackChar((ImFont*)(NativePtr), c);
}
public void SetGlyphVisible(ushort c, bool visible)
{
byte native_visible = visible ? (byte)1 : (byte)0;
ImGuiNative.ImFont_SetGlyphVisible((ImFont*)(NativePtr), c, native_visible);
}
}
}

@ -21,7 +21,72 @@ namespace ImGuiNET
public ImVector Fonts;
public ImVector CustomRects;
public ImVector ConfigData;
public fixed int CustomRectIds[1];
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 int PackIdMouseCursors;
public int PackIdLines;
}
public unsafe partial struct ImFontAtlasPtr
{
@ -45,41 +110,43 @@ namespace ImGuiNET
public ImVector<ImFontPtr> Fonts => new ImVector<ImFontPtr>(NativePtr->Fonts);
public ImPtrVector<ImFontAtlasCustomRectPtr> CustomRects => new ImPtrVector<ImFontAtlasCustomRectPtr>(NativePtr->CustomRects, Unsafe.SizeOf<ImFontAtlasCustomRect>());
public ImPtrVector<ImFontConfigPtr> ConfigData => new ImPtrVector<ImFontConfigPtr>(NativePtr->ConfigData, Unsafe.SizeOf<ImFontConfig>());
public RangeAccessor<int> CustomRectIds => new RangeAccessor<int>(NativePtr->CustomRectIds, 1);
public RangeAccessor<Vector4> TexUvLines => new RangeAccessor<Vector4>(&NativePtr->TexUvLines_0, 64);
public ref int PackIdMouseCursors => ref Unsafe.AsRef<int>(&NativePtr->PackIdMouseCursors);
public ref int PackIdLines => ref Unsafe.AsRef<int>(&NativePtr->PackIdLines);
public int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x)
{
ImFont* native_font = font.NativePtr;
Vector2 offset = new Vector2();
int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph(NativePtr, native_font, id, width, height, advance_x, offset);
int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph((ImFontAtlas*)(NativePtr), native_font, id, width, height, advance_x, offset);
return ret;
}
public int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x, Vector2 offset)
{
ImFont* native_font = font.NativePtr;
int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph(NativePtr, native_font, id, width, height, advance_x, offset);
int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph((ImFontAtlas*)(NativePtr), native_font, id, width, height, advance_x, offset);
return ret;
}
public int AddCustomRectRegular(uint id, int width, int height)
public int AddCustomRectRegular(int width, int height)
{
int ret = ImGuiNative.ImFontAtlas_AddCustomRectRegular(NativePtr, id, width, height);
int ret = ImGuiNative.ImFontAtlas_AddCustomRectRegular((ImFontAtlas*)(NativePtr), width, height);
return ret;
}
public ImFontPtr AddFont(ImFontConfigPtr font_cfg)
{
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFont(NativePtr, native_font_cfg);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFont((ImFontAtlas*)(NativePtr), native_font_cfg);
return new ImFontPtr(ret);
}
public ImFontPtr AddFontDefault()
{
ImFontConfig* font_cfg = null;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, font_cfg);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault((ImFontAtlas*)(NativePtr), font_cfg);
return new ImFontPtr(ret);
}
public ImFontPtr AddFontDefault(ImFontConfigPtr font_cfg)
{
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, native_font_cfg);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault((ImFontAtlas*)(NativePtr), native_font_cfg);
return new ImFontPtr(ret);
}
public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels)
@ -104,7 +171,7 @@ namespace ImGuiNET
else { native_filename = null; }
ImFontConfig* font_cfg = null;
ushort* glyph_ranges = null;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, font_cfg, glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF((ImFontAtlas*)(NativePtr), native_filename, size_pixels, font_cfg, glyph_ranges);
if (filename_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_filename);
@ -133,7 +200,7 @@ namespace ImGuiNET
else { native_filename = null; }
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
ushort* glyph_ranges = null;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, native_font_cfg, glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF((ImFontAtlas*)(NativePtr), native_filename, size_pixels, native_font_cfg, glyph_ranges);
if (filename_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_filename);
@ -162,7 +229,7 @@ namespace ImGuiNET
else { native_filename = null; }
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer();
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, native_font_cfg, native_glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF((ImFontAtlas*)(NativePtr), native_filename, size_pixels, native_font_cfg, native_glyph_ranges);
if (filename_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_filename);
@ -191,7 +258,7 @@ namespace ImGuiNET
else { native_compressed_font_data_base85 = null; }
ImFontConfig* font_cfg = null;
ushort* glyph_ranges = null;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, native_compressed_font_data_base85, size_pixels, font_cfg, glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF((ImFontAtlas*)(NativePtr), native_compressed_font_data_base85, size_pixels, font_cfg, glyph_ranges);
if (compressed_font_data_base85_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_compressed_font_data_base85);
@ -220,7 +287,7 @@ namespace ImGuiNET
else { native_compressed_font_data_base85 = null; }
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
ushort* glyph_ranges = null;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, native_compressed_font_data_base85, size_pixels, native_font_cfg, glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF((ImFontAtlas*)(NativePtr), native_compressed_font_data_base85, size_pixels, native_font_cfg, glyph_ranges);
if (compressed_font_data_base85_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_compressed_font_data_base85);
@ -249,7 +316,7 @@ namespace ImGuiNET
else { native_compressed_font_data_base85 = null; }
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer();
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, native_compressed_font_data_base85, size_pixels, native_font_cfg, native_glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF((ImFontAtlas*)(NativePtr), native_compressed_font_data_base85, size_pixels, native_font_cfg, native_glyph_ranges);
if (compressed_font_data_base85_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_compressed_font_data_base85);
@ -261,7 +328,7 @@ namespace ImGuiNET
void* native_compressed_font_data = (void*)compressed_font_data.ToPointer();
ImFontConfig* font_cfg = null;
ushort* glyph_ranges = null;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, native_compressed_font_data, compressed_font_size, size_pixels, font_cfg, glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(NativePtr), native_compressed_font_data, compressed_font_size, size_pixels, font_cfg, glyph_ranges);
return new ImFontPtr(ret);
}
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels, ImFontConfigPtr font_cfg)
@ -269,7 +336,7 @@ namespace ImGuiNET
void* native_compressed_font_data = (void*)compressed_font_data.ToPointer();
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
ushort* glyph_ranges = null;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(NativePtr), native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, glyph_ranges);
return new ImFontPtr(ret);
}
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges)
@ -277,7 +344,7 @@ namespace ImGuiNET
void* native_compressed_font_data = (void*)compressed_font_data.ToPointer();
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer();
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, native_glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(NativePtr), native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, native_glyph_ranges);
return new ImFontPtr(ret);
}
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels)
@ -285,7 +352,7 @@ namespace ImGuiNET
void* native_font_data = (void*)font_data.ToPointer();
ImFontConfig* font_cfg = null;
ushort* glyph_ranges = null;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, native_font_data, font_size, size_pixels, font_cfg, glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_size, size_pixels, font_cfg, glyph_ranges);
return new ImFontPtr(ret);
}
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels, ImFontConfigPtr font_cfg)
@ -293,7 +360,7 @@ namespace ImGuiNET
void* native_font_data = (void*)font_data.ToPointer();
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
ushort* glyph_ranges = null;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, native_font_data, font_size, size_pixels, native_font_cfg, glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_size, size_pixels, native_font_cfg, glyph_ranges);
return new ImFontPtr(ret);
}
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges)
@ -301,12 +368,12 @@ namespace ImGuiNET
void* native_font_data = (void*)font_data.ToPointer();
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer();
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, native_font_data, font_size, size_pixels, native_font_cfg, native_glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_size, size_pixels, native_font_cfg, native_glyph_ranges);
return new ImFontPtr(ret);
}
public bool Build()
{
byte ret = ImGuiNative.ImFontAtlas_Build(NativePtr);
byte ret = ImGuiNative.ImFontAtlas_Build((ImFontAtlas*)(NativePtr));
return ret != 0;
}
public void CalcCustomRectUV(ImFontAtlasCustomRectPtr rect, out Vector2 out_uv_min, out Vector2 out_uv_max)
@ -316,73 +383,73 @@ namespace ImGuiNET
{
fixed (Vector2* native_out_uv_max = &out_uv_max)
{
ImGuiNative.ImFontAtlas_CalcCustomRectUV(NativePtr, native_rect, native_out_uv_min, native_out_uv_max);
ImGuiNative.ImFontAtlas_CalcCustomRectUV((ImFontAtlas*)(NativePtr), native_rect, native_out_uv_min, native_out_uv_max);
}
}
}
public void Clear()
{
ImGuiNative.ImFontAtlas_Clear(NativePtr);
ImGuiNative.ImFontAtlas_Clear((ImFontAtlas*)(NativePtr));
}
public void ClearFonts()
{
ImGuiNative.ImFontAtlas_ClearFonts(NativePtr);
ImGuiNative.ImFontAtlas_ClearFonts((ImFontAtlas*)(NativePtr));
}
public void ClearInputData()
{
ImGuiNative.ImFontAtlas_ClearInputData(NativePtr);
ImGuiNative.ImFontAtlas_ClearInputData((ImFontAtlas*)(NativePtr));
}
public void ClearTexData()
{
ImGuiNative.ImFontAtlas_ClearTexData(NativePtr);
ImGuiNative.ImFontAtlas_ClearTexData((ImFontAtlas*)(NativePtr));
}
public void Destroy()
{
ImGuiNative.ImFontAtlas_destroy(NativePtr);
ImGuiNative.ImFontAtlas_destroy((ImFontAtlas*)(NativePtr));
}
public ImFontAtlasCustomRectPtr GetCustomRectByIndex(int index)
{
ImFontAtlasCustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex(NativePtr, index);
ImFontAtlasCustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex((ImFontAtlas*)(NativePtr), index);
return new ImFontAtlasCustomRectPtr(ret);
}
public IntPtr GetGlyphRangesChineseFull()
{
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseFull(NativePtr);
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseFull((ImFontAtlas*)(NativePtr));
return (IntPtr)ret;
}
public IntPtr GetGlyphRangesChineseSimplifiedCommon()
{
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(NativePtr);
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon((ImFontAtlas*)(NativePtr));
return (IntPtr)ret;
}
public IntPtr GetGlyphRangesCyrillic()
{
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesCyrillic(NativePtr);
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesCyrillic((ImFontAtlas*)(NativePtr));
return (IntPtr)ret;
}
public IntPtr GetGlyphRangesDefault()
{
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesDefault(NativePtr);
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesDefault((ImFontAtlas*)(NativePtr));
return (IntPtr)ret;
}
public IntPtr GetGlyphRangesJapanese()
{
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesJapanese(NativePtr);
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesJapanese((ImFontAtlas*)(NativePtr));
return (IntPtr)ret;
}
public IntPtr GetGlyphRangesKorean()
{
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesKorean(NativePtr);
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesKorean((ImFontAtlas*)(NativePtr));
return (IntPtr)ret;
}
public IntPtr GetGlyphRangesThai()
{
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesThai(NativePtr);
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesThai((ImFontAtlas*)(NativePtr));
return (IntPtr)ret;
}
public IntPtr GetGlyphRangesVietnamese()
{
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesVietnamese(NativePtr);
ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesVietnamese((ImFontAtlas*)(NativePtr));
return (IntPtr)ret;
}
public bool GetMouseCursorTexData(ImGuiMouseCursor cursor, out Vector2 out_offset, out Vector2 out_size, out Vector2 out_uv_border, out Vector2 out_uv_fill)
@ -395,7 +462,7 @@ namespace ImGuiNET
{
fixed (Vector2* native_out_uv_fill = &out_uv_fill)
{
byte ret = ImGuiNative.ImFontAtlas_GetMouseCursorTexData(NativePtr, cursor, native_out_offset, native_out_size, native_out_uv_border, native_out_uv_fill);
byte ret = ImGuiNative.ImFontAtlas_GetMouseCursorTexData((ImFontAtlas*)(NativePtr), cursor, native_out_offset, native_out_size, native_out_uv_border, native_out_uv_fill);
return ret != 0;
}
}
@ -411,7 +478,7 @@ namespace ImGuiNET
{
fixed (int* native_out_height = &out_height)
{
ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8(NativePtr, native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel);
ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel);
}
}
}
@ -426,7 +493,7 @@ namespace ImGuiNET
{
fixed (int* native_out_bytes_per_pixel = &out_bytes_per_pixel)
{
ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8(NativePtr, native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel);
ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel);
}
}
}
@ -441,7 +508,7 @@ namespace ImGuiNET
{
fixed (int* native_out_height = &out_height)
{
ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8(NativePtr, native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel);
ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel);
}
}
}
@ -456,7 +523,7 @@ namespace ImGuiNET
{
fixed (int* native_out_bytes_per_pixel = &out_bytes_per_pixel)
{
ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8(NativePtr, native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel);
ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel);
}
}
}
@ -471,7 +538,7 @@ namespace ImGuiNET
{
fixed (int* native_out_height = &out_height)
{
ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32(NativePtr, native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel);
ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel);
}
}
}
@ -486,7 +553,7 @@ namespace ImGuiNET
{
fixed (int* native_out_bytes_per_pixel = &out_bytes_per_pixel)
{
ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32(NativePtr, native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel);
ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel);
}
}
}
@ -501,7 +568,7 @@ namespace ImGuiNET
{
fixed (int* native_out_height = &out_height)
{
ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32(NativePtr, native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel);
ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel);
}
}
}
@ -516,7 +583,7 @@ namespace ImGuiNET
{
fixed (int* native_out_bytes_per_pixel = &out_bytes_per_pixel)
{
ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32(NativePtr, native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel);
ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel);
}
}
}
@ -524,12 +591,12 @@ namespace ImGuiNET
}
public bool IsBuilt()
{
byte ret = ImGuiNative.ImFontAtlas_IsBuilt(NativePtr);
byte ret = ImGuiNative.ImFontAtlas_IsBuilt((ImFontAtlas*)(NativePtr));
return ret != 0;
}
public void SetTexID(IntPtr id)
{
ImGuiNative.ImFontAtlas_SetTexID(NativePtr, id);
ImGuiNative.ImFontAtlas_SetTexID((ImFontAtlas*)(NativePtr), id);
}
}
}

@ -7,11 +7,11 @@ namespace ImGuiNET
{
public unsafe partial struct ImFontAtlasCustomRect
{
public uint ID;
public ushort Width;
public ushort Height;
public ushort X;
public ushort Y;
public uint GlyphID;
public float GlyphAdvanceX;
public Vector2 GlyphOffset;
public ImFont* Font;
@ -24,21 +24,21 @@ namespace ImGuiNET
public static implicit operator ImFontAtlasCustomRectPtr(ImFontAtlasCustomRect* nativePtr) => new ImFontAtlasCustomRectPtr(nativePtr);
public static implicit operator ImFontAtlasCustomRect* (ImFontAtlasCustomRectPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImFontAtlasCustomRectPtr(IntPtr nativePtr) => new ImFontAtlasCustomRectPtr(nativePtr);
public ref uint ID => ref Unsafe.AsRef<uint>(&NativePtr->ID);
public ref ushort Width => ref Unsafe.AsRef<ushort>(&NativePtr->Width);
public ref ushort Height => ref Unsafe.AsRef<ushort>(&NativePtr->Height);
public ref ushort X => ref Unsafe.AsRef<ushort>(&NativePtr->X);
public ref ushort Y => ref Unsafe.AsRef<ushort>(&NativePtr->Y);
public ref uint GlyphID => ref Unsafe.AsRef<uint>(&NativePtr->GlyphID);
public ref float GlyphAdvanceX => ref Unsafe.AsRef<float>(&NativePtr->GlyphAdvanceX);
public ref Vector2 GlyphOffset => ref Unsafe.AsRef<Vector2>(&NativePtr->GlyphOffset);
public ImFontPtr Font => new ImFontPtr(NativePtr->Font);
public void Destroy()
{
ImGuiNative.ImFontAtlasCustomRect_destroy(NativePtr);
ImGuiNative.ImFontAtlasCustomRect_destroy((ImFontAtlasCustomRect*)(NativePtr));
}
public bool IsPacked()
{
byte ret = ImGuiNative.ImFontAtlasCustomRect_IsPacked(NativePtr);
byte ret = ImGuiNative.ImFontAtlasCustomRect_IsPacked((ImFontAtlasCustomRect*)(NativePtr));
return ret != 0;
}
}

@ -6,5 +6,6 @@ namespace ImGuiNET
None = 0,
NoPowerOfTwoHeight = 1 << 0,
NoMouseCursors = 1 << 1,
NoBakedLines = 1 << 2,
}
}

@ -56,7 +56,7 @@ namespace ImGuiNET
public ImFontPtr DstFont => new ImFontPtr(NativePtr->DstFont);
public void Destroy()
{
ImGuiNative.ImFontConfig_destroy(NativePtr);
ImGuiNative.ImFontConfig_destroy((ImFontConfig*)(NativePtr));
}
}
}

@ -7,7 +7,8 @@ namespace ImGuiNET
{
public unsafe partial struct ImFontGlyph
{
public ushort Codepoint;
public uint Codepoint;
public uint Visible;
public float AdvanceX;
public float X0;
public float Y0;
@ -26,7 +27,8 @@ namespace ImGuiNET
public static implicit operator ImFontGlyphPtr(ImFontGlyph* nativePtr) => new ImFontGlyphPtr(nativePtr);
public static implicit operator ImFontGlyph* (ImFontGlyphPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImFontGlyphPtr(IntPtr nativePtr) => new ImFontGlyphPtr(nativePtr);
public ref ushort Codepoint => ref Unsafe.AsRef<ushort>(&NativePtr->Codepoint);
public ref uint Codepoint => ref Unsafe.AsRef<uint>(&NativePtr->Codepoint);
public ref uint Visible => ref Unsafe.AsRef<uint>(&NativePtr->Visible);
public ref float AdvanceX => ref Unsafe.AsRef<float>(&NativePtr->AdvanceX);
public ref float X0 => ref Unsafe.AsRef<float>(&NativePtr->X0);
public ref float Y0 => ref Unsafe.AsRef<float>(&NativePtr->Y0);

@ -20,12 +20,12 @@ namespace ImGuiNET
public ImVector<uint> UsedChars => new ImVector<uint>(NativePtr->UsedChars);
public void AddChar(ushort c)
{
ImGuiNative.ImFontGlyphRangesBuilder_AddChar(NativePtr, c);
ImGuiNative.ImFontGlyphRangesBuilder_AddChar((ImFontGlyphRangesBuilder*)(NativePtr), c);
}
public void AddRanges(IntPtr ranges)
{
ushort* native_ranges = (ushort*)ranges.ToPointer();
ImGuiNative.ImFontGlyphRangesBuilder_AddRanges(NativePtr, native_ranges);
ImGuiNative.ImFontGlyphRangesBuilder_AddRanges((ImFontGlyphRangesBuilder*)(NativePtr), native_ranges);
}
public void AddText(string text)
{
@ -48,7 +48,7 @@ namespace ImGuiNET
}
else { native_text = null; }
byte* native_text_end = null;
ImGuiNative.ImFontGlyphRangesBuilder_AddText(NativePtr, native_text, native_text_end);
ImGuiNative.ImFontGlyphRangesBuilder_AddText((ImFontGlyphRangesBuilder*)(NativePtr), native_text, native_text_end);
if (text_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_text);
@ -58,25 +58,25 @@ namespace ImGuiNET
{
fixed (ImVector* native_out_ranges = &out_ranges)
{
ImGuiNative.ImFontGlyphRangesBuilder_BuildRanges(NativePtr, native_out_ranges);
ImGuiNative.ImFontGlyphRangesBuilder_BuildRanges((ImFontGlyphRangesBuilder*)(NativePtr), native_out_ranges);
}
}
public void Clear()
{
ImGuiNative.ImFontGlyphRangesBuilder_Clear(NativePtr);
ImGuiNative.ImFontGlyphRangesBuilder_Clear((ImFontGlyphRangesBuilder*)(NativePtr));
}
public void Destroy()
{
ImGuiNative.ImFontGlyphRangesBuilder_destroy(NativePtr);
ImGuiNative.ImFontGlyphRangesBuilder_destroy((ImFontGlyphRangesBuilder*)(NativePtr));
}
public bool GetBit(int n)
public bool GetBit(uint n)
{
byte ret = ImGuiNative.ImFontGlyphRangesBuilder_GetBit(NativePtr, n);
byte ret = ImGuiNative.ImFontGlyphRangesBuilder_GetBit((ImFontGlyphRangesBuilder*)(NativePtr), n);
return ret != 0;
}
public void SetBit(int n)
public void SetBit(uint n)
{
ImGuiNative.ImFontGlyphRangesBuilder_SetBit(NativePtr, n);
ImGuiNative.ImFontGlyphRangesBuilder_SetBit((ImFontGlyphRangesBuilder*)(NativePtr), n);
}
}
}

File diff suppressed because it is too large Load Diff

@ -8,5 +8,8 @@ namespace ImGuiNET
HasMouseCursors = 1 << 1,
HasSetMousePos = 1 << 2,
RendererHasVtxOffset = 1 << 3,
PlatformHasViewports = 1 << 10,
HasMouseHoveredViewport = 1 << 11,
RendererHasViewports = 1 << 12,
}
}

@ -0,0 +1,13 @@
namespace ImGuiNET
{
[System.Flags]
public enum ImGuiButtonFlags
{
None = 0,
MouseButtonLeft = 1 << 0,
MouseButtonRight = 1 << 1,
MouseButtonMiddle = 1 << 2,
MouseButtonMask = MouseButtonLeft | MouseButtonRight | MouseButtonMiddle,
MouseButtonDefault = MouseButtonLeft,
}
}

@ -40,16 +40,18 @@ namespace ImGuiNET
TabActive = 35,
TabUnfocused = 36,
TabUnfocusedActive = 37,
PlotLines = 38,
PlotLinesHovered = 39,
PlotHistogram = 40,
PlotHistogramHovered = 41,
TextSelectedBg = 42,
DragDropTarget = 43,
NavHighlight = 44,
NavWindowingHighlight = 45,
NavWindowingDimBg = 46,
ModalWindowDimBg = 47,
COUNT = 48,
DockingPreview = 38,
DockingEmptyBg = 39,
PlotLines = 40,
PlotLinesHovered = 41,
PlotHistogram = 42,
PlotHistogramHovered = 43,
TextSelectedBg = 44,
DragDropTarget = 45,
NavHighlight = 46,
NavWindowingHighlight = 47,
NavWindowingDimBg = 48,
ModalWindowDimBg = 49,
COUNT = 50,
}
}

@ -13,6 +13,7 @@ namespace ImGuiNET
NoLabel = 1 << 7,
NoSidePreview = 1 << 8,
NoDragDrop = 1 << 9,
NoBorder = 1 << 10,
AlphaBar = 1 << 16,
AlphaPreview = 1 << 17,
AlphaPreviewHalf = 1 << 18,
@ -26,10 +27,10 @@ namespace ImGuiNET
PickerHueWheel = 1 << 26,
InputRGB = 1 << 27,
InputHSV = 1 << 28,
_OptionsDefault = Uint8|DisplayRGB|InputRGB|PickerHueBar,
_DisplayMask = DisplayRGB|DisplayHSV|DisplayHex,
_DataTypeMask = Uint8|Float,
_PickerMask = PickerHueWheel|PickerHueBar,
_InputMask = InputRGB|InputHSV,
_OptionsDefault = Uint8 | DisplayRGB | InputRGB | PickerHueBar,
_DisplayMask = DisplayRGB | DisplayHSV | DisplayHex,
_DataTypeMask = Uint8 | Float,
_PickerMask = PickerHueWheel | PickerHueBar,
_InputMask = InputRGB | InputHSV,
}
}

@ -2,6 +2,7 @@ namespace ImGuiNET
{
public enum ImGuiCond
{
None = 0,
Always = 1 << 0,
Once = 1 << 1,
FirstUseEver = 1 << 2,

@ -10,6 +10,10 @@ namespace ImGuiNET
NavNoCaptureKeyboard = 1 << 3,
NoMouse = 1 << 4,
NoMouseCursorChange = 1 << 5,
DockingEnable = 1 << 6,
ViewportsEnable = 1 << 10,
DpiEnableScaleViewports = 1 << 14,
DpiEnableScaleFonts = 1 << 15,
IsSRGB = 1 << 20,
IsTouchScreen = 1 << 21,
}

@ -0,0 +1,14 @@
namespace ImGuiNET
{
[System.Flags]
public enum ImGuiDockNodeFlags
{
None = 0,
KeepAliveOnly = 1 << 0,
NoDockingInCentralNode = 1 << 2,
PassthruCentralNode = 1 << 3,
NoSplit = 1 << 4,
NoResize = 1 << 5,
AutoHideTabBar = 1 << 6,
}
}

@ -26,6 +26,14 @@ namespace ImGuiNET
public byte FontAllowUserScaling;
public ImFont* FontDefault;
public Vector2 DisplayFramebufferScale;
public byte ConfigDockingNoSplit;
public byte ConfigDockingWithShift;
public byte ConfigDockingAlwaysTabBar;
public byte ConfigDockingTransparentPayload;
public byte ConfigViewportsNoAutoMerge;
public byte ConfigViewportsNoTaskBarIcon;
public byte ConfigViewportsNoDecoration;
public byte ConfigViewportsNoDefaultParent;
public byte MouseDrawCursor;
public byte ConfigMacOSXBehaviors;
public byte ConfigInputTextCursorBlink;
@ -40,13 +48,12 @@ namespace ImGuiNET
public IntPtr GetClipboardTextFn;
public IntPtr SetClipboardTextFn;
public void* ClipboardUserData;
public IntPtr ImeSetInputScreenPosFn;
public void* ImeWindowHandle;
public void* RenderDrawListsFnUnused;
public Vector2 MousePos;
public fixed byte MouseDown[5];
public float MouseWheel;
public float MouseWheelH;
public uint MouseHoveredViewport;
public byte KeyCtrl;
public byte KeyShift;
public byte KeyAlt;
@ -67,6 +74,7 @@ namespace ImGuiNET
public int MetricsActiveWindows;
public int MetricsActiveAllocations;
public Vector2 MouseDelta;
public ImGuiKeyModFlags KeyMods;
public Vector2 MousePosPrev;
public Vector2 MouseClickedPos_0;
public Vector2 MouseClickedPos_1;
@ -91,6 +99,8 @@ namespace ImGuiNET
public fixed float KeysDownDurationPrev[512];
public fixed float NavInputsDownDuration[21];
public fixed float NavInputsDownDurationPrev[21];
public float PenPressure;
public ushort InputQueueSurrogate;
public ImVector InputQueueCharacters;
}
public unsafe partial struct ImGuiIOPtr
@ -120,6 +130,14 @@ namespace ImGuiNET
public ref bool FontAllowUserScaling => ref Unsafe.AsRef<bool>(&NativePtr->FontAllowUserScaling);
public ImFontPtr FontDefault => new ImFontPtr(NativePtr->FontDefault);
public ref Vector2 DisplayFramebufferScale => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayFramebufferScale);
public ref bool ConfigDockingNoSplit => ref Unsafe.AsRef<bool>(&NativePtr->ConfigDockingNoSplit);
public ref bool ConfigDockingWithShift => ref Unsafe.AsRef<bool>(&NativePtr->ConfigDockingWithShift);
public ref bool ConfigDockingAlwaysTabBar => ref Unsafe.AsRef<bool>(&NativePtr->ConfigDockingAlwaysTabBar);
public ref bool ConfigDockingTransparentPayload => ref Unsafe.AsRef<bool>(&NativePtr->ConfigDockingTransparentPayload);
public ref bool ConfigViewportsNoAutoMerge => ref Unsafe.AsRef<bool>(&NativePtr->ConfigViewportsNoAutoMerge);
public ref bool ConfigViewportsNoTaskBarIcon => ref Unsafe.AsRef<bool>(&NativePtr->ConfigViewportsNoTaskBarIcon);
public ref bool ConfigViewportsNoDecoration => ref Unsafe.AsRef<bool>(&NativePtr->ConfigViewportsNoDecoration);
public ref bool ConfigViewportsNoDefaultParent => ref Unsafe.AsRef<bool>(&NativePtr->ConfigViewportsNoDefaultParent);
public ref bool MouseDrawCursor => ref Unsafe.AsRef<bool>(&NativePtr->MouseDrawCursor);
public ref bool ConfigMacOSXBehaviors => ref Unsafe.AsRef<bool>(&NativePtr->ConfigMacOSXBehaviors);
public ref bool ConfigInputTextCursorBlink => ref Unsafe.AsRef<bool>(&NativePtr->ConfigInputTextCursorBlink);
@ -134,13 +152,12 @@ namespace ImGuiNET
public ref IntPtr GetClipboardTextFn => ref Unsafe.AsRef<IntPtr>(&NativePtr->GetClipboardTextFn);
public ref IntPtr SetClipboardTextFn => ref Unsafe.AsRef<IntPtr>(&NativePtr->SetClipboardTextFn);
public IntPtr ClipboardUserData { get => (IntPtr)NativePtr->ClipboardUserData; set => NativePtr->ClipboardUserData = (void*)value; }
public ref IntPtr ImeSetInputScreenPosFn => ref Unsafe.AsRef<IntPtr>(&NativePtr->ImeSetInputScreenPosFn);
public IntPtr ImeWindowHandle { get => (IntPtr)NativePtr->ImeWindowHandle; set => NativePtr->ImeWindowHandle = (void*)value; }
public IntPtr RenderDrawListsFnUnused { get => (IntPtr)NativePtr->RenderDrawListsFnUnused; set => NativePtr->RenderDrawListsFnUnused = (void*)value; }
public ref Vector2 MousePos => ref Unsafe.AsRef<Vector2>(&NativePtr->MousePos);
public RangeAccessor<bool> MouseDown => new RangeAccessor<bool>(NativePtr->MouseDown, 5);
public ref float MouseWheel => ref Unsafe.AsRef<float>(&NativePtr->MouseWheel);
public ref float MouseWheelH => ref Unsafe.AsRef<float>(&NativePtr->MouseWheelH);
public ref uint MouseHoveredViewport => ref Unsafe.AsRef<uint>(&NativePtr->MouseHoveredViewport);
public ref bool KeyCtrl => ref Unsafe.AsRef<bool>(&NativePtr->KeyCtrl);
public ref bool KeyShift => ref Unsafe.AsRef<bool>(&NativePtr->KeyShift);
public ref bool KeyAlt => ref Unsafe.AsRef<bool>(&NativePtr->KeyAlt);
@ -161,6 +178,7 @@ namespace ImGuiNET
public ref int MetricsActiveWindows => ref Unsafe.AsRef<int>(&NativePtr->MetricsActiveWindows);
public ref int MetricsActiveAllocations => ref Unsafe.AsRef<int>(&NativePtr->MetricsActiveAllocations);
public ref Vector2 MouseDelta => ref Unsafe.AsRef<Vector2>(&NativePtr->MouseDelta);
public ref ImGuiKeyModFlags KeyMods => ref Unsafe.AsRef<ImGuiKeyModFlags>(&NativePtr->KeyMods);
public ref Vector2 MousePosPrev => ref Unsafe.AsRef<Vector2>(&NativePtr->MousePosPrev);
public RangeAccessor<Vector2> MouseClickedPos => new RangeAccessor<Vector2>(&NativePtr->MouseClickedPos_0, 5);
public RangeAccessor<double> MouseClickedTime => new RangeAccessor<double>(NativePtr->MouseClickedTime, 5);
@ -177,10 +195,12 @@ namespace ImGuiNET
public RangeAccessor<float> KeysDownDurationPrev => new RangeAccessor<float>(NativePtr->KeysDownDurationPrev, 512);
public RangeAccessor<float> NavInputsDownDuration => new RangeAccessor<float>(NativePtr->NavInputsDownDuration, 21);
public RangeAccessor<float> NavInputsDownDurationPrev => new RangeAccessor<float>(NativePtr->NavInputsDownDurationPrev, 21);
public ref float PenPressure => ref Unsafe.AsRef<float>(&NativePtr->PenPressure);
public ref ushort InputQueueSurrogate => ref Unsafe.AsRef<ushort>(&NativePtr->InputQueueSurrogate);
public ImVector<ushort> InputQueueCharacters => new ImVector<ushort>(NativePtr->InputQueueCharacters);
public void AddInputCharacter(uint c)
{
ImGuiNative.ImGuiIO_AddInputCharacter(NativePtr, c);
ImGuiNative.ImGuiIO_AddInputCharacter((ImGuiIO*)(NativePtr), c);
}
public void AddInputCharactersUTF8(string str)
{
@ -202,19 +222,23 @@ namespace ImGuiNET
native_str[native_str_offset] = 0;
}
else { native_str = null; }
ImGuiNative.ImGuiIO_AddInputCharactersUTF8(NativePtr, native_str);
ImGuiNative.ImGuiIO_AddInputCharactersUTF8((ImGuiIO*)(NativePtr), native_str);
if (str_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_str);
}
}
public void AddInputCharacterUTF16(ushort c)
{
ImGuiNative.ImGuiIO_AddInputCharacterUTF16((ImGuiIO*)(NativePtr), c);
}
public void ClearInputCharacters()
{
ImGuiNative.ImGuiIO_ClearInputCharacters(NativePtr);
ImGuiNative.ImGuiIO_ClearInputCharacters((ImGuiIO*)(NativePtr));
}
public void Destroy()
{
ImGuiNative.ImGuiIO_destroy(NativePtr);
ImGuiNative.ImGuiIO_destroy((ImGuiIO*)(NativePtr));
}
}
}

@ -42,15 +42,15 @@ namespace ImGuiNET
public ref int SelectionEnd => ref Unsafe.AsRef<int>(&NativePtr->SelectionEnd);
public void DeleteChars(int pos, int bytes_count)
{
ImGuiNative.ImGuiInputTextCallbackData_DeleteChars(NativePtr, pos, bytes_count);
ImGuiNative.ImGuiInputTextCallbackData_DeleteChars((ImGuiInputTextCallbackData*)(NativePtr), pos, bytes_count);
}
public void Destroy()
{
ImGuiNative.ImGuiInputTextCallbackData_destroy(NativePtr);
ImGuiNative.ImGuiInputTextCallbackData_destroy((ImGuiInputTextCallbackData*)(NativePtr));
}
public bool HasSelection()
{
byte ret = ImGuiNative.ImGuiInputTextCallbackData_HasSelection(NativePtr);
byte ret = ImGuiNative.ImGuiInputTextCallbackData_HasSelection((ImGuiInputTextCallbackData*)(NativePtr));
return ret != 0;
}
public void InsertChars(int pos, string text)
@ -74,7 +74,7 @@ namespace ImGuiNET
}
else { native_text = null; }
byte* native_text_end = null;
ImGuiNative.ImGuiInputTextCallbackData_InsertChars(NativePtr, pos, native_text, native_text_end);
ImGuiNative.ImGuiInputTextCallbackData_InsertChars((ImGuiInputTextCallbackData*)(NativePtr), pos, native_text, native_text_end);
if (text_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_text);

@ -0,0 +1,12 @@
namespace ImGuiNET
{
[System.Flags]
public enum ImGuiKeyModFlags
{
None = 0,
Ctrl = 1 << 0,
Shift = 1 << 1,
Alt = 1 << 2,
Super = 1 << 3,
}
}

@ -31,23 +31,23 @@ namespace ImGuiNET
public void Begin(int items_count)
{
float items_height = -1.0f;
ImGuiNative.ImGuiListClipper_Begin(NativePtr, items_count, items_height);
ImGuiNative.ImGuiListClipper_Begin((ImGuiListClipper*)(NativePtr), items_count, items_height);
}
public void Begin(int items_count, float items_height)
{
ImGuiNative.ImGuiListClipper_Begin(NativePtr, items_count, items_height);
ImGuiNative.ImGuiListClipper_Begin((ImGuiListClipper*)(NativePtr), items_count, items_height);
}
public void Destroy()
{
ImGuiNative.ImGuiListClipper_destroy(NativePtr);
ImGuiNative.ImGuiListClipper_destroy((ImGuiListClipper*)(NativePtr));
}
public void End()
{
ImGuiNative.ImGuiListClipper_End(NativePtr);
ImGuiNative.ImGuiListClipper_End((ImGuiListClipper*)(NativePtr));
}
public bool Step()
{
byte ret = ImGuiNative.ImGuiListClipper_Step(NativePtr);
byte ret = ImGuiNative.ImGuiListClipper_Step((ImGuiListClipper*)(NativePtr));
return ret != 0;
}
}

@ -15,7 +15,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igBegin(byte* name, byte* p_open, ImGuiWindowFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igBeginChild(byte* str_id, Vector2 size, byte border, ImGuiWindowFlags flags);
public static extern byte igBeginChildStr(byte* str_id, Vector2 size, byte border, ImGuiWindowFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igBeginChildID(uint id, Vector2 size, byte border, ImGuiWindowFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -37,11 +37,11 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igBeginPopup(byte* str_id, ImGuiWindowFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igBeginPopupContextItem(byte* str_id, ImGuiMouseButton mouse_button);
public static extern byte igBeginPopupContextItem(byte* str_id, ImGuiPopupFlags popup_flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igBeginPopupContextVoid(byte* str_id, ImGuiMouseButton mouse_button);
public static extern byte igBeginPopupContextVoid(byte* str_id, ImGuiPopupFlags popup_flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igBeginPopupContextWindow(byte* str_id, ImGuiMouseButton mouse_button, byte also_over_items);
public static extern byte igBeginPopupContextWindow(byte* str_id, ImGuiPopupFlags popup_flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igBeginPopupModal(byte* name, byte* p_open, ImGuiWindowFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -60,8 +60,8 @@ namespace ImGuiNET
public static extern float igCalcItemWidth();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igCalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igCalcTextSize_nonUDT2")]
public static extern Vector2 igCalcTextSize(byte* text, byte* text_end, byte hide_text_after_double_hash, float wrap_width);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igCalcTextSize(Vector2* pOut, byte* text, byte* text_end, byte hide_text_after_double_hash, float wrap_width);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igCaptureKeyboardFromApp(byte want_capture_keyboard_value);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -73,7 +73,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igCloseCurrentPopup();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igCollapsingHeader(byte* label, ImGuiTreeNodeFlags flags);
public static extern byte igCollapsingHeaderTreeNodeFlags(byte* label, ImGuiTreeNodeFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igCollapsingHeaderBoolPtr(byte* label, byte* p_open, ImGuiTreeNodeFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -84,8 +84,8 @@ namespace ImGuiNET
public static extern void igColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igColorConvertRGBtoHSV(float r, float g, float b, float* out_h, float* out_s, float* out_v);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igColorConvertU32ToFloat4_nonUDT2")]
public static extern Vector4 igColorConvertU32ToFloat4(uint @in);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igColorConvertU32ToFloat4(Vector4* pOut, uint @in);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igColorEdit3(byte* label, Vector3* col, ImGuiColorEditFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -97,7 +97,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igColumns(int count, byte* id, byte border);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igCombo(byte* label, int* current_item, byte** items, int items_count, int popup_max_height_in_items);
public static extern byte igComboStr_arr(byte* label, int* current_item, byte** items, int items_count, int popup_max_height_in_items);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igComboStr(byte* label, int* current_item, byte* items_separated_by_zeros, int popup_max_height_in_items);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -107,29 +107,35 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igDestroyContext(IntPtr ctx);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragFloat(byte* label, float* v, float v_speed, float v_min, float v_max, byte* format, float power);
public static extern void igDestroyPlatformWindows();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igDockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags, ImGuiWindowClass* window_class);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern uint igDockSpaceOverViewport(ImGuiViewport* viewport, ImGuiDockNodeFlags flags, ImGuiWindowClass* window_class);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragFloat2(byte* label, Vector2* v, float v_speed, float v_min, float v_max, byte* format, float power);
public static extern byte igDragFloat(byte* label, float* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragFloat3(byte* label, Vector3* v, float v_speed, float v_min, float v_max, byte* format, float power);
public static extern byte igDragFloat2(byte* label, Vector2* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragFloat4(byte* label, Vector4* v, float v_speed, float v_min, float v_max, byte* format, float power);
public static extern byte igDragFloat3(byte* label, Vector3* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragFloatRange2(byte* label, float* v_current_min, float* v_current_max, float v_speed, float v_min, float v_max, byte* format, byte* format_max, float power);
public static extern byte igDragFloat4(byte* label, Vector4* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragInt(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format);
public static extern byte igDragFloatRange2(byte* label, float* v_current_min, float* v_current_max, float v_speed, float v_min, float v_max, byte* format, byte* format_max, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragInt2(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format);
public static extern byte igDragInt(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragInt3(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format);
public static extern byte igDragInt2(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragInt4(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format);
public static extern byte igDragInt3(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragIntRange2(byte* label, int* v_current_min, int* v_current_max, float v_speed, int v_min, int v_max, byte* format, byte* format_max);
public static extern byte igDragInt4(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragScalar(byte* label, ImGuiDataType data_type, void* p_data, float v_speed, void* p_min, void* p_max, byte* format, float power);
public static extern byte igDragIntRange2(byte* label, int* v_current_min, int* v_current_max, float v_speed, int v_min, int v_max, byte* format, byte* format_max, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragScalarN(byte* label, ImGuiDataType data_type, void* p_data, int components, float v_speed, void* p_min, void* p_max, byte* format, float power);
public static extern byte igDragScalar(byte* label, ImGuiDataType data_type, void* p_data, float v_speed, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igDragScalarN(byte* label, ImGuiDataType data_type, void* p_data, int components, float v_speed, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igDummy(Vector2 size);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -163,11 +169,17 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igEndTooltip();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetBackgroundDrawList();
public static extern ImGuiViewport* igFindViewportByID(uint id);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiViewport* igFindViewportByPlatformHandle(void* platform_handle);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetBackgroundDrawListNil();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetBackgroundDrawListViewportPtr(ImGuiViewport* viewport);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte* igGetClipboardText();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern uint igGetColorU32(ImGuiCol idx, float alpha_mul);
public static extern uint igGetColorU32Col(ImGuiCol idx, float alpha_mul);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern uint igGetColorU32Vec4(Vector4 col);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -180,22 +192,22 @@ namespace ImGuiNET
public static extern int igGetColumnsCount();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetColumnWidth(int column_index);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionAvail_nonUDT2")]
public static extern Vector2 igGetContentRegionAvail();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionMax_nonUDT2")]
public static extern Vector2 igGetContentRegionMax();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetContentRegionAvail(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetContentRegionMax(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr igGetCurrentContext();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetCursorPos_nonUDT2")]
public static extern Vector2 igGetCursorPos();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetCursorPos(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetCursorPosX();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetCursorPosY();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetCursorScreenPos_nonUDT2")]
public static extern Vector2 igGetCursorScreenPos();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetCursorStartPos_nonUDT2")]
public static extern Vector2 igGetCursorStartPos();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetCursorScreenPos(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetCursorStartPos(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiPayload* igGetDragDropPayload();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -206,10 +218,12 @@ namespace ImGuiNET
public static extern ImFont* igGetFont();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetFontSize();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetFontTexUvWhitePixel_nonUDT2")]
public static extern Vector2 igGetFontTexUvWhitePixel();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetForegroundDrawList();
public static extern void igGetFontTexUvWhitePixel(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetForegroundDrawListNil();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetForegroundDrawListViewportPtr(ImGuiViewport* viewport);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern int igGetFrameCount();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -219,29 +233,33 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern uint igGetIDStr(byte* str_id);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern uint igGetIDRange(byte* str_id_begin, byte* str_id_end);
public static extern uint igGetIDStrStr(byte* str_id_begin, byte* str_id_end);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern uint igGetIDPtr(void* ptr_id);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiIO* igGetIO();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetItemRectMax_nonUDT2")]
public static extern Vector2 igGetItemRectMax();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetItemRectMin_nonUDT2")]
public static extern Vector2 igGetItemRectMin();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetItemRectSize_nonUDT2")]
public static extern Vector2 igGetItemRectSize();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetItemRectMax(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetItemRectMin(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetItemRectSize(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern int igGetKeyIndex(ImGuiKey imgui_key);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern int igGetKeyPressedAmount(int key_index, float repeat_delay, float rate);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiViewport* igGetMainViewport();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiMouseCursor igGetMouseCursor();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetMouseDragDelta_nonUDT2")]
public static extern Vector2 igGetMouseDragDelta(ImGuiMouseButton button, float lock_threshold);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetMousePos_nonUDT2")]
public static extern Vector2 igGetMousePos();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetMousePosOnOpeningCurrentPopup_nonUDT2")]
public static extern Vector2 igGetMousePosOnOpeningCurrentPopup();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetMouseDragDelta(Vector2* pOut, ImGuiMouseButton button, float lock_threshold);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetMousePos(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetMousePosOnOpeningCurrentPopup(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiPlatformIO* igGetPlatformIO();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetScrollMaxX();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -268,20 +286,26 @@ namespace ImGuiNET
public static extern float igGetTreeNodeToLabelSpacing();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte* igGetVersion();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetWindowContentRegionMax_nonUDT2")]
public static extern Vector2 igGetWindowContentRegionMax();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetWindowContentRegionMin_nonUDT2")]
public static extern Vector2 igGetWindowContentRegionMin();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetWindowContentRegionMax(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetWindowContentRegionMin(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetWindowContentRegionWidth();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern uint igGetWindowDockID();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetWindowDpiScale();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetWindowDrawList();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetWindowHeight();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetWindowPos_nonUDT2")]
public static extern Vector2 igGetWindowPos();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetWindowSize_nonUDT2")]
public static extern Vector2 igGetWindowSize();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetWindowPos(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetWindowSize(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiViewport* igGetWindowViewport();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetWindowWidth();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -319,7 +343,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igInputTextWithHint(byte* label, byte* hint, byte* buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igInvisibleButton(byte* str_id, Vector2 size);
public static extern byte igInvisibleButton(byte* str_id, Vector2 size, ImGuiButtonFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsAnyItemActive();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -369,9 +393,9 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsMouseReleased(ImGuiMouseButton button);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsPopupOpen(byte* str_id);
public static extern byte igIsPopupOpenStr(byte* str_id, ImGuiPopupFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsRectVisible(Vector2 size);
public static extern byte igIsRectVisibleNil(Vector2 size);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsRectVisibleVec2(Vector2 rect_min, Vector2 rect_max);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -379,6 +403,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsWindowCollapsed();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsWindowDocked();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsWindowFocused(ImGuiFocusedFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsWindowHovered(ImGuiHoveredFlags flags);
@ -423,13 +449,13 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igNextColumn();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igOpenPopup(byte* str_id);
public static extern void igOpenPopup(byte* str_id, ImGuiPopupFlags popup_flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igOpenPopupOnItemClick(byte* str_id, ImGuiMouseButton mouse_button);
public static extern byte igOpenPopupContextItem(byte* str_id, ImGuiPopupFlags popup_flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igPlotHistogramFloatPtr(byte* label, float* values, int values_count, int values_offset, byte* overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igPlotLines(byte* label, float* values, int values_count, int values_offset, byte* overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride);
public static extern void igPlotLinesFloatPtr(byte* label, float* values, int values_count, int values_offset, byte* overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igPopAllowKeyboardFocus();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -461,7 +487,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igPushIDStr(byte* str_id);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igPushIDRange(byte* str_id_begin, byte* str_id_end);
public static extern void igPushIDStrStr(byte* str_id_begin, byte* str_id_end);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igPushIDPtr(void* ptr_id);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -471,7 +497,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igPushStyleColorU32(ImGuiCol idx, uint col);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igPushStyleColor(ImGuiCol idx, Vector4 col);
public static extern void igPushStyleColorVec4(ImGuiCol idx, Vector4 col);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igPushStyleVarFloat(ImGuiStyleVar idx, float val);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -485,6 +511,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igRender();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igRenderPlatformWindowsDefault(void* platform_render_arg, void* renderer_render_arg);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igResetMouseDragDelta(ImGuiMouseButton button);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSameLine(float offset_from_start_x, float spacing);
@ -493,7 +521,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte* igSaveIniSettingsToMemory(uint* out_ini_size);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSelectable(byte* label, byte selected, ImGuiSelectableFlags flags, Vector2 size);
public static extern byte igSelectableBool(byte* label, byte selected, ImGuiSelectableFlags flags, Vector2 size);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSelectableBoolPtr(byte* label, byte* p_selected, ImGuiSelectableFlags flags, Vector2 size);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -533,10 +561,14 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowBgAlpha(float alpha);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowClass(ImGuiWindowClass* window_class);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowCollapsed(byte collapsed, ImGuiCond cond);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowContentSize(Vector2 size);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowDockID(uint dock_id, ImGuiCond cond);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowFocus();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowPos(Vector2 pos, ImGuiCond cond, Vector2 pivot);
@ -545,17 +577,19 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback, void* custom_callback_data);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollFromPosX(float local_x, float center_x_ratio);
public static extern void igSetNextWindowViewport(uint viewport_id);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollFromPosY(float local_y, float center_y_ratio);
public static extern void igSetScrollFromPosXFloat(float local_x, float center_x_ratio);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollFromPosYFloat(float local_y, float center_y_ratio);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollHereX(float center_x_ratio);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollHereY(float center_y_ratio);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollX(float scroll_x);
public static extern void igSetScrollXFloat(float scroll_x);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollY(float scroll_y);
public static extern void igSetScrollYFloat(float scroll_y);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetStateStorage(ImGuiStorage* storage);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -567,7 +601,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetWindowCollapsedStr(byte* name, byte collapsed, ImGuiCond cond);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetWindowFocus();
public static extern void igSetWindowFocusNil();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetWindowFocusStr(byte* name);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -595,27 +629,27 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igShowUserGuide();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSliderAngle(byte* label, float* v_rad, float v_degrees_min, float v_degrees_max, byte* format);
public static extern byte igSliderAngle(byte* label, float* v_rad, float v_degrees_min, float v_degrees_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSliderFloat(byte* label, float* v, float v_min, float v_max, byte* format, float power);
public static extern byte igSliderFloat(byte* label, float* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSliderFloat2(byte* label, Vector2* v, float v_min, float v_max, byte* format, float power);
public static extern byte igSliderFloat2(byte* label, Vector2* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSliderFloat3(byte* label, Vector3* v, float v_min, float v_max, byte* format, float power);
public static extern byte igSliderFloat3(byte* label, Vector3* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSliderFloat4(byte* label, Vector4* v, float v_min, float v_max, byte* format, float power);
public static extern byte igSliderFloat4(byte* label, Vector4* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSliderInt(byte* label, int* v, int v_min, int v_max, byte* format);
public static extern byte igSliderInt(byte* label, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSliderInt2(byte* label, int* v, int v_min, int v_max, byte* format);
public static extern byte igSliderInt2(byte* label, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSliderInt3(byte* label, int* v, int v_min, int v_max, byte* format);
public static extern byte igSliderInt3(byte* label, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSliderInt4(byte* label, int* v, int v_min, int v_max, byte* format);
public static extern byte igSliderInt4(byte* label, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSliderScalar(byte* label, ImGuiDataType data_type, void* p_data, void* p_min, void* p_max, byte* format, float power);
public static extern byte igSliderScalar(byte* label, ImGuiDataType data_type, void* p_data, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSliderScalarN(byte* label, ImGuiDataType data_type, void* p_data, int components, void* p_min, void* p_max, byte* format, float power);
public static extern byte igSliderScalarN(byte* label, ImGuiDataType data_type, void* p_data, int components, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igSmallButton(byte* label);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -657,6 +691,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igUnindent(float indent_w);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igUpdatePlatformWindows();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igValueBool(byte* prefix, byte b);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igValueInt(byte* prefix, int v);
@ -665,17 +701,17 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igValueFloat(byte* prefix, float v, byte* float_format);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igVSliderFloat(byte* label, Vector2 size, float* v, float v_min, float v_max, byte* format, float power);
public static extern byte igVSliderFloat(byte* label, Vector2 size, float* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igVSliderInt(byte* label, Vector2 size, int* v, int v_min, int v_max, byte* format);
public static extern byte igVSliderInt(byte* label, Vector2 size, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igVSliderScalar(byte* label, Vector2 size, ImGuiDataType data_type, void* p_data, void* p_min, void* p_max, byte* format, float power);
public static extern byte igVSliderScalar(byte* label, Vector2 size, ImGuiDataType data_type, void* p_data, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImColor_destroy(ImColor* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImColor_HSV_nonUDT2")]
public static extern ImColor ImColor_HSV(ImColor* self, float h, float s, float v, float a);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImColor* ImColor_ImColor();
public static extern void ImColor_HSV(ImColor* pOut, ImColor* self, float h, float s, float v, float a);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImColor* ImColor_ImColorNil();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImColor* ImColor_ImColorInt(int r, int g, int b, int a);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -701,6 +737,18 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawData_ScaleClipRects(ImDrawData* self, Vector2 fb_scale);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList__ClearFreeMemory(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList__OnChangedClipRect(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList__OnChangedTextureID(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList__OnChangedVtxOffset(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList__PopUnusedDrawCmd(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList__ResetForNewFrame(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddBezierCurve(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness, int num_segments);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddCallback(ImDrawList* self, IntPtr callback, void* callback_data);
@ -737,7 +785,7 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddRectFilledMultiColor(ImDrawList* self, Vector2 p_min, Vector2 p_max, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddText(ImDrawList* self, Vector2 pos, uint col, byte* text_begin, byte* text_end);
public static extern void ImDrawList_AddTextVec2(ImDrawList* self, Vector2 pos, uint col, byte* text_begin, byte* text_end);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddTextFontPtr(ImDrawList* self, ImFont* font, float font_size, Vector2 pos, uint col, byte* text_begin, byte* text_end, float wrap_width, Vector4* cpu_fine_clip_rect);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -751,17 +799,13 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_ChannelsSplit(ImDrawList* self, int count);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_Clear(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_ClearFreeMemory(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* ImDrawList_CloneOutput(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_destroy(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImDrawList_GetClipRectMax_nonUDT2")]
public static extern Vector2 ImDrawList_GetClipRectMax(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImDrawList_GetClipRectMin_nonUDT2")]
public static extern Vector2 ImDrawList_GetClipRectMin(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_GetClipRectMax(Vector2* pOut, ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_GetClipRectMin(Vector2* pOut, ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* ImDrawList_ImDrawList(IntPtr shared_data);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -809,10 +853,6 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_PushTextureID(ImDrawList* self, IntPtr texture_id);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_UpdateClipRect(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_UpdateTextureID(ImDrawList* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawListSplitter_Clear(ImDrawListSplitter* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawListSplitter_ClearFreeMemory(ImDrawListSplitter* self);
@ -827,13 +867,13 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawListSplitter_Split(ImDrawListSplitter* self, ImDrawList* draw_list, int count);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFont_AddGlyph(ImFont* self, ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x);
public static extern void ImFont_AddGlyph(ImFont* self, ImFontConfig* src_cfg, ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFont_AddRemapChar(ImFont* self, ushort dst, ushort src, byte overwrite_dst);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFont_BuildLookupTable(ImFont* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImFont_CalcTextSizeA_nonUDT2")]
public static extern Vector2 ImFont_CalcTextSizeA(ImFont* self, float size, float max_width, float wrap_width, byte* text_begin, byte* text_end, byte** remaining);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFont_CalcTextSizeA(Vector2* pOut, ImFont* self, float size, float max_width, float wrap_width, byte* text_begin, byte* text_end, byte** remaining);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte* ImFont_CalcWordWrapPositionA(ImFont* self, float scale, byte* text, byte* text_end, float wrap_width);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -853,6 +893,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImFont* ImFont_ImFont();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImFont_IsGlyphRangeUnused(ImFont* self, uint c_begin, uint c_last);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImFont_IsLoaded(ImFont* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFont_RenderChar(ImFont* self, ImDrawList* draw_list, float size, Vector2 pos, uint col, ushort c);
@ -861,9 +903,11 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFont_SetFallbackChar(ImFont* self, ushort c);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFont_SetGlyphVisible(ImFont* self, ushort c, byte visible);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern int ImFontAtlas_AddCustomRectFontGlyph(ImFontAtlas* self, ImFont* font, ushort id, int width, int height, float advance_x, Vector2 offset);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self, uint id, int width, int height);
public static extern int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self, int width, int height);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImFont* ImFontAtlas_AddFont(ImFontAtlas* self, ImFontConfig* font_cfg);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -947,11 +991,11 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontGlyphRangesBuilder_destroy(ImFontGlyphRangesBuilder* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImFontGlyphRangesBuilder_GetBit(ImFontGlyphRangesBuilder* self, int n);
public static extern byte ImFontGlyphRangesBuilder_GetBit(ImFontGlyphRangesBuilder* self, uint n);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImFontGlyphRangesBuilder* ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImFontGlyphRangesBuilder_SetBit(ImFontGlyphRangesBuilder* self, int n);
public static extern void ImFontGlyphRangesBuilder_SetBit(ImFontGlyphRangesBuilder* self, uint n);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self, int pos, int bytes_count);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@ -967,6 +1011,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self, byte* str);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiIO_AddInputCharacterUTF16(ImGuiIO* self, ushort c);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiIO_ClearInputCharacters(ImGuiIO* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiIO_destroy(ImGuiIO* self);
@ -999,6 +1045,14 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiPayload_IsPreview(ImGuiPayload* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiPlatformIO_destroy(ImGuiPlatformIO* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiPlatformIO* ImGuiPlatformIO_ImGuiPlatformIO();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiPlatformMonitor_destroy(ImGuiPlatformMonitor* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiPlatformMonitor* ImGuiPlatformMonitor_ImGuiPlatformMonitor();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiStorage_BuildSortByKey(ImGuiStorage* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiStorage_Clear(ImGuiStorage* self);
@ -1083,21 +1137,35 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiTextRange_empty(ImGuiTextRange* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRange();
public static extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRangeNil();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRangeStr(byte* _b, byte* _e);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiTextRange_split(ImGuiTextRange* self, byte separator, ImVector* @out);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiViewport_destroy(ImGuiViewport* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiViewport_GetCenter(Vector2* pOut, ImGuiViewport* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiViewport_GetWorkPos(Vector2* pOut, ImGuiViewport* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiViewport_GetWorkSize(Vector2* pOut, ImGuiViewport* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiViewport* ImGuiViewport_ImGuiViewport();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiWindowClass_destroy(ImGuiWindowClass* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiWindowClass* ImGuiWindowClass_ImGuiWindowClass();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImVec2_destroy(Vector2* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2* ImVec2_ImVec2();
public static extern Vector2* ImVec2_ImVec2Nil();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2* ImVec2_ImVec2Float(float _x, float _y);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImVec4_destroy(Vector4* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Vector4* ImVec4_ImVec4();
public static extern Vector4* ImVec4_ImVec4Nil();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Vector4* ImVec4_ImVec4Float(float _x, float _y, float _z, float _w);
}

@ -20,7 +20,7 @@ namespace ImGuiNET
public ref int RefFrame => ref Unsafe.AsRef<int>(&NativePtr->RefFrame);
public void Destroy()
{
ImGuiNative.ImGuiOnceUponAFrame_destroy(NativePtr);
ImGuiNative.ImGuiOnceUponAFrame_destroy((ImGuiOnceUponAFrame*)(NativePtr));
}
}
}

@ -34,11 +34,11 @@ namespace ImGuiNET
public ref bool Delivery => ref Unsafe.AsRef<bool>(&NativePtr->Delivery);
public void Clear()
{
ImGuiNative.ImGuiPayload_Clear(NativePtr);
ImGuiNative.ImGuiPayload_Clear((ImGuiPayload*)(NativePtr));
}
public void Destroy()
{
ImGuiNative.ImGuiPayload_destroy(NativePtr);
ImGuiNative.ImGuiPayload_destroy((ImGuiPayload*)(NativePtr));
}
public bool IsDataType(string type)
{
@ -60,7 +60,7 @@ namespace ImGuiNET
native_type[native_type_offset] = 0;
}
else { native_type = null; }
byte ret = ImGuiNative.ImGuiPayload_IsDataType(NativePtr, native_type);
byte ret = ImGuiNative.ImGuiPayload_IsDataType((ImGuiPayload*)(NativePtr), native_type);
if (type_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_type);
@ -69,12 +69,12 @@ namespace ImGuiNET
}
public bool IsDelivery()
{
byte ret = ImGuiNative.ImGuiPayload_IsDelivery(NativePtr);
byte ret = ImGuiNative.ImGuiPayload_IsDelivery((ImGuiPayload*)(NativePtr));
return ret != 0;
}
public bool IsPreview()
{
byte ret = ImGuiNative.ImGuiPayload_IsPreview(NativePtr);
byte ret = ImGuiNative.ImGuiPayload_IsPreview((ImGuiPayload*)(NativePtr));
return ret != 0;
}
}

@ -0,0 +1,78 @@
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Text;
namespace ImGuiNET
{
public unsafe partial struct ImGuiPlatformIO
{
public IntPtr Platform_CreateWindow;
public IntPtr Platform_DestroyWindow;
public IntPtr Platform_ShowWindow;
public IntPtr Platform_SetWindowPos;
public IntPtr Platform_GetWindowPos;
public IntPtr Platform_SetWindowSize;
public IntPtr Platform_GetWindowSize;
public IntPtr Platform_SetWindowFocus;
public IntPtr Platform_GetWindowFocus;
public IntPtr Platform_GetWindowMinimized;
public IntPtr Platform_SetWindowTitle;
public IntPtr Platform_SetWindowAlpha;
public IntPtr Platform_UpdateWindow;
public IntPtr Platform_RenderWindow;
public IntPtr Platform_SwapBuffers;
public IntPtr Platform_GetWindowDpiScale;
public IntPtr Platform_OnChangedViewport;
public IntPtr Platform_SetImeInputPos;
public IntPtr Platform_CreateVkSurface;
public IntPtr Renderer_CreateWindow;
public IntPtr Renderer_DestroyWindow;
public IntPtr Renderer_SetWindowSize;
public IntPtr Renderer_RenderWindow;
public IntPtr Renderer_SwapBuffers;
public ImVector Monitors;
public ImGuiViewport* MainViewport;
public ImVector Viewports;
}
public unsafe partial struct ImGuiPlatformIOPtr
{
public ImGuiPlatformIO* NativePtr { get; }
public ImGuiPlatformIOPtr(ImGuiPlatformIO* nativePtr) => NativePtr = nativePtr;
public ImGuiPlatformIOPtr(IntPtr nativePtr) => NativePtr = (ImGuiPlatformIO*)nativePtr;
public static implicit operator ImGuiPlatformIOPtr(ImGuiPlatformIO* nativePtr) => new ImGuiPlatformIOPtr(nativePtr);
public static implicit operator ImGuiPlatformIO* (ImGuiPlatformIOPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImGuiPlatformIOPtr(IntPtr nativePtr) => new ImGuiPlatformIOPtr(nativePtr);
public ref IntPtr Platform_CreateWindow => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_CreateWindow);
public ref IntPtr Platform_DestroyWindow => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_DestroyWindow);
public ref IntPtr Platform_ShowWindow => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_ShowWindow);
public ref IntPtr Platform_SetWindowPos => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_SetWindowPos);
public ref IntPtr Platform_GetWindowPos => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_GetWindowPos);
public ref IntPtr Platform_SetWindowSize => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_SetWindowSize);
public ref IntPtr Platform_GetWindowSize => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_GetWindowSize);
public ref IntPtr Platform_SetWindowFocus => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_SetWindowFocus);
public ref IntPtr Platform_GetWindowFocus => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_GetWindowFocus);
public ref IntPtr Platform_GetWindowMinimized => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_GetWindowMinimized);
public ref IntPtr Platform_SetWindowTitle => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_SetWindowTitle);
public ref IntPtr Platform_SetWindowAlpha => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_SetWindowAlpha);
public ref IntPtr Platform_UpdateWindow => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_UpdateWindow);
public ref IntPtr Platform_RenderWindow => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_RenderWindow);
public ref IntPtr Platform_SwapBuffers => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_SwapBuffers);
public ref IntPtr Platform_GetWindowDpiScale => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_GetWindowDpiScale);
public ref IntPtr Platform_OnChangedViewport => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_OnChangedViewport);
public ref IntPtr Platform_SetImeInputPos => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_SetImeInputPos);
public ref IntPtr Platform_CreateVkSurface => ref Unsafe.AsRef<IntPtr>(&NativePtr->Platform_CreateVkSurface);
public ref IntPtr Renderer_CreateWindow => ref Unsafe.AsRef<IntPtr>(&NativePtr->Renderer_CreateWindow);
public ref IntPtr Renderer_DestroyWindow => ref Unsafe.AsRef<IntPtr>(&NativePtr->Renderer_DestroyWindow);
public ref IntPtr Renderer_SetWindowSize => ref Unsafe.AsRef<IntPtr>(&NativePtr->Renderer_SetWindowSize);
public ref IntPtr Renderer_RenderWindow => ref Unsafe.AsRef<IntPtr>(&NativePtr->Renderer_RenderWindow);
public ref IntPtr Renderer_SwapBuffers => ref Unsafe.AsRef<IntPtr>(&NativePtr->Renderer_SwapBuffers);
public ImPtrVector<ImGuiPlatformMonitorPtr> Monitors => new ImPtrVector<ImGuiPlatformMonitorPtr>(NativePtr->Monitors, Unsafe.SizeOf<ImGuiPlatformMonitor>());
public ImGuiViewportPtr MainViewport => new ImGuiViewportPtr(NativePtr->MainViewport);
public ImVector<ImGuiViewportPtr> Viewports => new ImVector<ImGuiViewportPtr>(NativePtr->Viewports);
public void Destroy()
{
ImGuiNative.ImGuiPlatformIO_destroy((ImGuiPlatformIO*)(NativePtr));
}
}
}

@ -0,0 +1,34 @@
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Text;
namespace ImGuiNET
{
public unsafe partial struct ImGuiPlatformMonitor
{
public Vector2 MainPos;
public Vector2 MainSize;
public Vector2 WorkPos;
public Vector2 WorkSize;
public float DpiScale;
}
public unsafe partial struct ImGuiPlatformMonitorPtr
{
public ImGuiPlatformMonitor* NativePtr { get; }
public ImGuiPlatformMonitorPtr(ImGuiPlatformMonitor* nativePtr) => NativePtr = nativePtr;
public ImGuiPlatformMonitorPtr(IntPtr nativePtr) => NativePtr = (ImGuiPlatformMonitor*)nativePtr;
public static implicit operator ImGuiPlatformMonitorPtr(ImGuiPlatformMonitor* nativePtr) => new ImGuiPlatformMonitorPtr(nativePtr);
public static implicit operator ImGuiPlatformMonitor* (ImGuiPlatformMonitorPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImGuiPlatformMonitorPtr(IntPtr nativePtr) => new ImGuiPlatformMonitorPtr(nativePtr);
public ref Vector2 MainPos => ref Unsafe.AsRef<Vector2>(&NativePtr->MainPos);
public ref Vector2 MainSize => ref Unsafe.AsRef<Vector2>(&NativePtr->MainSize);
public ref Vector2 WorkPos => ref Unsafe.AsRef<Vector2>(&NativePtr->WorkPos);
public ref Vector2 WorkSize => ref Unsafe.AsRef<Vector2>(&NativePtr->WorkSize);
public ref float DpiScale => ref Unsafe.AsRef<float>(&NativePtr->DpiScale);
public void Destroy()
{
ImGuiNative.ImGuiPlatformMonitor_destroy((ImGuiPlatformMonitor*)(NativePtr));
}
}
}

@ -0,0 +1,18 @@
namespace ImGuiNET
{
[System.Flags]
public enum ImGuiPopupFlags
{
None = 0,
MouseButtonLeft = 0,
MouseButtonRight = 1,
MouseButtonMiddle = 2,
MouseButtonMask = 0x1F,
MouseButtonDefault = 1,
NoOpenOverExistingPopup = 1 << 5,
NoOpenOverItems = 1 << 6,
AnyPopupId = 1 << 7,
AnyPopupLevel = 1 << 8,
AnyPopup = AnyPopupId | AnyPopupLevel,
}
}

@ -0,0 +1,13 @@
namespace ImGuiNET
{
[System.Flags]
public enum ImGuiSliderFlags
{
None = 0,
ClampOnInput = 1 << 4,
Logarithmic = 1 << 5,
NoRoundToFormat = 1 << 6,
NoInput = 1 << 7,
InvalidMask = 0x7000000F,
}
}

@ -20,118 +20,118 @@ namespace ImGuiNET
public ImPtrVector<ImGuiStoragePairPtr> Data => new ImPtrVector<ImGuiStoragePairPtr>(NativePtr->Data, Unsafe.SizeOf<ImGuiStoragePair>());
public void BuildSortByKey()
{
ImGuiNative.ImGuiStorage_BuildSortByKey(NativePtr);
ImGuiNative.ImGuiStorage_BuildSortByKey((ImGuiStorage*)(NativePtr));
}
public void Clear()
{
ImGuiNative.ImGuiStorage_Clear(NativePtr);
ImGuiNative.ImGuiStorage_Clear((ImGuiStorage*)(NativePtr));
}
public bool GetBool(uint key)
{
byte default_val = 0;
byte ret = ImGuiNative.ImGuiStorage_GetBool(NativePtr, key, default_val);
byte ret = ImGuiNative.ImGuiStorage_GetBool((ImGuiStorage*)(NativePtr), key, default_val);
return ret != 0;
}
public bool GetBool(uint key, bool default_val)
{
byte native_default_val = default_val ? (byte)1 : (byte)0;
byte ret = ImGuiNative.ImGuiStorage_GetBool(NativePtr, key, native_default_val);
byte ret = ImGuiNative.ImGuiStorage_GetBool((ImGuiStorage*)(NativePtr), key, native_default_val);
return ret != 0;
}
public byte* GetBoolRef(uint key)
{
byte default_val = 0;
byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef(NativePtr, key, default_val);
byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef((ImGuiStorage*)(NativePtr), key, default_val);
return ret;
}
public byte* GetBoolRef(uint key, bool default_val)
{
byte native_default_val = default_val ? (byte)1 : (byte)0;
byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef(NativePtr, key, native_default_val);
byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef((ImGuiStorage*)(NativePtr), key, native_default_val);
return ret;
}
public float GetFloat(uint key)
{
float default_val = 0.0f;
float ret = ImGuiNative.ImGuiStorage_GetFloat(NativePtr, key, default_val);
float ret = ImGuiNative.ImGuiStorage_GetFloat((ImGuiStorage*)(NativePtr), key, default_val);
return ret;
}
public float GetFloat(uint key, float default_val)
{
float ret = ImGuiNative.ImGuiStorage_GetFloat(NativePtr, key, default_val);
float ret = ImGuiNative.ImGuiStorage_GetFloat((ImGuiStorage*)(NativePtr), key, default_val);
return ret;
}
public float* GetFloatRef(uint key)
{
float default_val = 0.0f;
float* ret = ImGuiNative.ImGuiStorage_GetFloatRef(NativePtr, key, default_val);
float* ret = ImGuiNative.ImGuiStorage_GetFloatRef((ImGuiStorage*)(NativePtr), key, default_val);
return ret;
}
public float* GetFloatRef(uint key, float default_val)
{
float* ret = ImGuiNative.ImGuiStorage_GetFloatRef(NativePtr, key, default_val);
float* ret = ImGuiNative.ImGuiStorage_GetFloatRef((ImGuiStorage*)(NativePtr), key, default_val);
return ret;
}
public int GetInt(uint key)
{
int default_val = 0;
int ret = ImGuiNative.ImGuiStorage_GetInt(NativePtr, key, default_val);
int ret = ImGuiNative.ImGuiStorage_GetInt((ImGuiStorage*)(NativePtr), key, default_val);
return ret;
}
public int GetInt(uint key, int default_val)
{
int ret = ImGuiNative.ImGuiStorage_GetInt(NativePtr, key, default_val);
int ret = ImGuiNative.ImGuiStorage_GetInt((ImGuiStorage*)(NativePtr), key, default_val);
return ret;
}
public int* GetIntRef(uint key)
{
int default_val = 0;
int* ret = ImGuiNative.ImGuiStorage_GetIntRef(NativePtr, key, default_val);
int* ret = ImGuiNative.ImGuiStorage_GetIntRef((ImGuiStorage*)(NativePtr), key, default_val);
return ret;
}
public int* GetIntRef(uint key, int default_val)
{
int* ret = ImGuiNative.ImGuiStorage_GetIntRef(NativePtr, key, default_val);
int* ret = ImGuiNative.ImGuiStorage_GetIntRef((ImGuiStorage*)(NativePtr), key, default_val);
return ret;
}
public IntPtr GetVoidPtr(uint key)
{
void* ret = ImGuiNative.ImGuiStorage_GetVoidPtr(NativePtr, key);
void* ret = ImGuiNative.ImGuiStorage_GetVoidPtr((ImGuiStorage*)(NativePtr), key);
return (IntPtr)ret;
}
public void** GetVoidPtrRef(uint key)
{
void* default_val = null;
void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef(NativePtr, key, default_val);
void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef((ImGuiStorage*)(NativePtr), key, default_val);
return ret;
}
public void** GetVoidPtrRef(uint key, IntPtr default_val)
{
void* native_default_val = (void*)default_val.ToPointer();
void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef(NativePtr, key, native_default_val);
void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef((ImGuiStorage*)(NativePtr), key, native_default_val);
return ret;
}
public void SetAllInt(int val)
{
ImGuiNative.ImGuiStorage_SetAllInt(NativePtr, val);
ImGuiNative.ImGuiStorage_SetAllInt((ImGuiStorage*)(NativePtr), val);
}
public void SetBool(uint key, bool val)
{
byte native_val = val ? (byte)1 : (byte)0;
ImGuiNative.ImGuiStorage_SetBool(NativePtr, key, native_val);
ImGuiNative.ImGuiStorage_SetBool((ImGuiStorage*)(NativePtr), key, native_val);
}
public void SetFloat(uint key, float val)
{
ImGuiNative.ImGuiStorage_SetFloat(NativePtr, key, val);
ImGuiNative.ImGuiStorage_SetFloat((ImGuiStorage*)(NativePtr), key, val);
}
public void SetInt(uint key, int val)
{
ImGuiNative.ImGuiStorage_SetInt(NativePtr, key, val);
ImGuiNative.ImGuiStorage_SetInt((ImGuiStorage*)(NativePtr), key, val);
}
public void SetVoidPtr(uint key, IntPtr val)
{
void* native_val = (void*)val.ToPointer();
ImGuiNative.ImGuiStorage_SetVoidPtr(NativePtr, key, native_val);
ImGuiNative.ImGuiStorage_SetVoidPtr((ImGuiStorage*)(NativePtr), key, native_val);
}
}
}

@ -30,8 +30,10 @@ namespace ImGuiNET
public float ScrollbarRounding;
public float GrabMinSize;
public float GrabRounding;
public float LogSliderDeadzone;
public float TabRounding;
public float TabBorderSize;
public float TabMinWidthForUnselectedCloseButton;
public ImGuiDir ColorButtonPosition;
public Vector2 ButtonTextAlign;
public Vector2 SelectableTextAlign;
@ -39,6 +41,7 @@ namespace ImGuiNET
public Vector2 DisplaySafeAreaPadding;
public float MouseCursorScale;
public byte AntiAliasedLines;
public byte AntiAliasedLinesUseTex;
public byte AntiAliasedFill;
public float CurveTessellationTol;
public float CircleSegmentMaxError;
@ -90,6 +93,8 @@ namespace ImGuiNET
public Vector4 Colors_45;
public Vector4 Colors_46;
public Vector4 Colors_47;
public Vector4 Colors_48;
public Vector4 Colors_49;
}
public unsafe partial struct ImGuiStylePtr
{
@ -122,8 +127,10 @@ namespace ImGuiNET
public ref float ScrollbarRounding => ref Unsafe.AsRef<float>(&NativePtr->ScrollbarRounding);
public ref float GrabMinSize => ref Unsafe.AsRef<float>(&NativePtr->GrabMinSize);
public ref float GrabRounding => ref Unsafe.AsRef<float>(&NativePtr->GrabRounding);
public ref float LogSliderDeadzone => ref Unsafe.AsRef<float>(&NativePtr->LogSliderDeadzone);
public ref float TabRounding => ref Unsafe.AsRef<float>(&NativePtr->TabRounding);
public ref float TabBorderSize => ref Unsafe.AsRef<float>(&NativePtr->TabBorderSize);
public ref float TabMinWidthForUnselectedCloseButton => ref Unsafe.AsRef<float>(&NativePtr->TabMinWidthForUnselectedCloseButton);
public ref ImGuiDir ColorButtonPosition => ref Unsafe.AsRef<ImGuiDir>(&NativePtr->ColorButtonPosition);
public ref Vector2 ButtonTextAlign => ref Unsafe.AsRef<Vector2>(&NativePtr->ButtonTextAlign);
public ref Vector2 SelectableTextAlign => ref Unsafe.AsRef<Vector2>(&NativePtr->SelectableTextAlign);
@ -131,17 +138,18 @@ namespace ImGuiNET
public ref Vector2 DisplaySafeAreaPadding => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplaySafeAreaPadding);
public ref float MouseCursorScale => ref Unsafe.AsRef<float>(&NativePtr->MouseCursorScale);
public ref bool AntiAliasedLines => ref Unsafe.AsRef<bool>(&NativePtr->AntiAliasedLines);
public ref bool AntiAliasedLinesUseTex => ref Unsafe.AsRef<bool>(&NativePtr->AntiAliasedLinesUseTex);
public ref bool AntiAliasedFill => ref Unsafe.AsRef<bool>(&NativePtr->AntiAliasedFill);
public ref float CurveTessellationTol => ref Unsafe.AsRef<float>(&NativePtr->CurveTessellationTol);
public ref float CircleSegmentMaxError => ref Unsafe.AsRef<float>(&NativePtr->CircleSegmentMaxError);
public RangeAccessor<Vector4> Colors => new RangeAccessor<Vector4>(&NativePtr->Colors_0, 48);
public RangeAccessor<Vector4> Colors => new RangeAccessor<Vector4>(&NativePtr->Colors_0, 50);
public void Destroy()
{
ImGuiNative.ImGuiStyle_destroy(NativePtr);
ImGuiNative.ImGuiStyle_destroy((ImGuiStyle*)(NativePtr));
}
public void ScaleAllSizes(float scale_factor)
{
ImGuiNative.ImGuiStyle_ScaleAllSizes(NativePtr, scale_factor);
ImGuiNative.ImGuiStyle_ScaleAllSizes((ImGuiStyle*)(NativePtr), scale_factor);
}
}
}

@ -8,5 +8,6 @@ namespace ImGuiNET
SetSelected = 1 << 1,
NoCloseWithMiddleMouseButton = 1 << 2,
NoPushId = 1 << 3,
NoTooltip = 1 << 4,
}
}

@ -39,7 +39,7 @@ namespace ImGuiNET
}
else { native_str = null; }
byte* native_str_end = null;
ImGuiNative.ImGuiTextBuffer_append(NativePtr, native_str, native_str_end);
ImGuiNative.ImGuiTextBuffer_append((ImGuiTextBuffer*)(NativePtr), native_str, native_str_end);
if (str_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_str);
@ -65,7 +65,7 @@ namespace ImGuiNET
native_fmt[native_fmt_offset] = 0;
}
else { native_fmt = null; }
ImGuiNative.ImGuiTextBuffer_appendf(NativePtr, native_fmt);
ImGuiNative.ImGuiTextBuffer_appendf((ImGuiTextBuffer*)(NativePtr), native_fmt);
if (fmt_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_fmt);
@ -73,39 +73,39 @@ namespace ImGuiNET
}
public string begin()
{
byte* ret = ImGuiNative.ImGuiTextBuffer_begin(NativePtr);
byte* ret = ImGuiNative.ImGuiTextBuffer_begin((ImGuiTextBuffer*)(NativePtr));
return Util.StringFromPtr(ret);
}
public string c_str()
{
byte* ret = ImGuiNative.ImGuiTextBuffer_c_str(NativePtr);
byte* ret = ImGuiNative.ImGuiTextBuffer_c_str((ImGuiTextBuffer*)(NativePtr));
return Util.StringFromPtr(ret);
}
public void clear()
{
ImGuiNative.ImGuiTextBuffer_clear(NativePtr);
ImGuiNative.ImGuiTextBuffer_clear((ImGuiTextBuffer*)(NativePtr));
}
public void Destroy()
{
ImGuiNative.ImGuiTextBuffer_destroy(NativePtr);
ImGuiNative.ImGuiTextBuffer_destroy((ImGuiTextBuffer*)(NativePtr));
}
public bool empty()
{
byte ret = ImGuiNative.ImGuiTextBuffer_empty(NativePtr);
byte ret = ImGuiNative.ImGuiTextBuffer_empty((ImGuiTextBuffer*)(NativePtr));
return ret != 0;
}
public string end()
{
byte* ret = ImGuiNative.ImGuiTextBuffer_end(NativePtr);
byte* ret = ImGuiNative.ImGuiTextBuffer_end((ImGuiTextBuffer*)(NativePtr));
return Util.StringFromPtr(ret);
}
public void reserve(int capacity)
{
ImGuiNative.ImGuiTextBuffer_reserve(NativePtr, capacity);
ImGuiNative.ImGuiTextBuffer_reserve((ImGuiTextBuffer*)(NativePtr), capacity);
}
public int size()
{
int ret = ImGuiNative.ImGuiTextBuffer_size(NativePtr);
int ret = ImGuiNative.ImGuiTextBuffer_size((ImGuiTextBuffer*)(NativePtr));
return ret;
}
}

@ -24,15 +24,15 @@ namespace ImGuiNET
public ref int CountGrep => ref Unsafe.AsRef<int>(&NativePtr->CountGrep);
public void Build()
{
ImGuiNative.ImGuiTextFilter_Build(NativePtr);
ImGuiNative.ImGuiTextFilter_Build((ImGuiTextFilter*)(NativePtr));
}
public void Clear()
{
ImGuiNative.ImGuiTextFilter_Clear(NativePtr);
ImGuiNative.ImGuiTextFilter_Clear((ImGuiTextFilter*)(NativePtr));
}
public void Destroy()
{
ImGuiNative.ImGuiTextFilter_destroy(NativePtr);
ImGuiNative.ImGuiTextFilter_destroy((ImGuiTextFilter*)(NativePtr));
}
public bool Draw()
{
@ -51,7 +51,7 @@ namespace ImGuiNET
int native_label_offset = Util.GetUtf8("Filter(inc,-exc)", native_label, label_byteCount);
native_label[native_label_offset] = 0;
float width = 0.0f;
byte ret = ImGuiNative.ImGuiTextFilter_Draw(NativePtr, native_label, width);
byte ret = ImGuiNative.ImGuiTextFilter_Draw((ImGuiTextFilter*)(NativePtr), native_label, width);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_label);
@ -79,7 +79,7 @@ namespace ImGuiNET
}
else { native_label = null; }
float width = 0.0f;
byte ret = ImGuiNative.ImGuiTextFilter_Draw(NativePtr, native_label, width);
byte ret = ImGuiNative.ImGuiTextFilter_Draw((ImGuiTextFilter*)(NativePtr), native_label, width);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_label);
@ -106,7 +106,7 @@ namespace ImGuiNET
native_label[native_label_offset] = 0;
}
else { native_label = null; }
byte ret = ImGuiNative.ImGuiTextFilter_Draw(NativePtr, native_label, width);
byte ret = ImGuiNative.ImGuiTextFilter_Draw((ImGuiTextFilter*)(NativePtr), native_label, width);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_label);
@ -115,7 +115,7 @@ namespace ImGuiNET
}
public bool IsActive()
{
byte ret = ImGuiNative.ImGuiTextFilter_IsActive(NativePtr);
byte ret = ImGuiNative.ImGuiTextFilter_IsActive((ImGuiTextFilter*)(NativePtr));
return ret != 0;
}
public bool PassFilter(string text)
@ -139,7 +139,7 @@ namespace ImGuiNET
}
else { native_text = null; }
byte* native_text_end = null;
byte ret = ImGuiNative.ImGuiTextFilter_PassFilter(NativePtr, native_text, native_text_end);
byte ret = ImGuiNative.ImGuiTextFilter_PassFilter((ImGuiTextFilter*)(NativePtr), native_text, native_text_end);
if (text_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_text);

@ -22,18 +22,18 @@ namespace ImGuiNET
public IntPtr e { get => (IntPtr)NativePtr->e; set => NativePtr->e = (byte*)value; }
public void Destroy()
{
ImGuiNative.ImGuiTextRange_destroy(NativePtr);
ImGuiNative.ImGuiTextRange_destroy((ImGuiTextRange*)(NativePtr));
}
public bool empty()
{
byte ret = ImGuiNative.ImGuiTextRange_empty(NativePtr);
byte ret = ImGuiNative.ImGuiTextRange_empty((ImGuiTextRange*)(NativePtr));
return ret != 0;
}
public void split(byte separator, out ImVector @out)
{
fixed (ImVector* native_out = &@out)
{
ImGuiNative.ImGuiTextRange_split(NativePtr, separator, native_out);
ImGuiNative.ImGuiTextRange_split((ImGuiTextRange*)(NativePtr), separator, native_out);
}
}
}

@ -0,0 +1,74 @@
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Text;
namespace ImGuiNET
{
public unsafe partial struct ImGuiViewport
{
public uint ID;
public ImGuiViewportFlags Flags;
public Vector2 Pos;
public Vector2 Size;
public Vector2 WorkOffsetMin;
public Vector2 WorkOffsetMax;
public float DpiScale;
public ImDrawData* DrawData;
public uint ParentViewportId;
public void* RendererUserData;
public void* PlatformUserData;
public void* PlatformHandle;
public void* PlatformHandleRaw;
public byte PlatformRequestMove;
public byte PlatformRequestResize;
public byte PlatformRequestClose;
}
public unsafe partial struct ImGuiViewportPtr
{
public ImGuiViewport* NativePtr { get; }
public ImGuiViewportPtr(ImGuiViewport* nativePtr) => NativePtr = nativePtr;
public ImGuiViewportPtr(IntPtr nativePtr) => NativePtr = (ImGuiViewport*)nativePtr;
public static implicit operator ImGuiViewportPtr(ImGuiViewport* nativePtr) => new ImGuiViewportPtr(nativePtr);
public static implicit operator ImGuiViewport* (ImGuiViewportPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImGuiViewportPtr(IntPtr nativePtr) => new ImGuiViewportPtr(nativePtr);
public ref uint ID => ref Unsafe.AsRef<uint>(&NativePtr->ID);
public ref ImGuiViewportFlags Flags => ref Unsafe.AsRef<ImGuiViewportFlags>(&NativePtr->Flags);
public ref Vector2 Pos => ref Unsafe.AsRef<Vector2>(&NativePtr->Pos);
public ref Vector2 Size => ref Unsafe.AsRef<Vector2>(&NativePtr->Size);
public ref Vector2 WorkOffsetMin => ref Unsafe.AsRef<Vector2>(&NativePtr->WorkOffsetMin);
public ref Vector2 WorkOffsetMax => ref Unsafe.AsRef<Vector2>(&NativePtr->WorkOffsetMax);
public ref float DpiScale => ref Unsafe.AsRef<float>(&NativePtr->DpiScale);
public ImDrawDataPtr DrawData => new ImDrawDataPtr(NativePtr->DrawData);
public ref uint ParentViewportId => ref Unsafe.AsRef<uint>(&NativePtr->ParentViewportId);
public IntPtr RendererUserData { get => (IntPtr)NativePtr->RendererUserData; set => NativePtr->RendererUserData = (void*)value; }
public IntPtr PlatformUserData { get => (IntPtr)NativePtr->PlatformUserData; set => NativePtr->PlatformUserData = (void*)value; }
public IntPtr PlatformHandle { get => (IntPtr)NativePtr->PlatformHandle; set => NativePtr->PlatformHandle = (void*)value; }
public IntPtr PlatformHandleRaw { get => (IntPtr)NativePtr->PlatformHandleRaw; set => NativePtr->PlatformHandleRaw = (void*)value; }
public ref bool PlatformRequestMove => ref Unsafe.AsRef<bool>(&NativePtr->PlatformRequestMove);
public ref bool PlatformRequestResize => ref Unsafe.AsRef<bool>(&NativePtr->PlatformRequestResize);
public ref bool PlatformRequestClose => ref Unsafe.AsRef<bool>(&NativePtr->PlatformRequestClose);
public void Destroy()
{
ImGuiNative.ImGuiViewport_destroy((ImGuiViewport*)(NativePtr));
}
public Vector2 GetCenter()
{
Vector2 __retval;
ImGuiNative.ImGuiViewport_GetCenter(&__retval, (ImGuiViewport*)(NativePtr));
return __retval;
}
public Vector2 GetWorkPos()
{
Vector2 __retval;
ImGuiNative.ImGuiViewport_GetWorkPos(&__retval, (ImGuiViewport*)(NativePtr));
return __retval;
}
public Vector2 GetWorkSize()
{
Vector2 __retval;
ImGuiNative.ImGuiViewport_GetWorkSize(&__retval, (ImGuiViewport*)(NativePtr));
return __retval;
}
}
}

@ -0,0 +1,18 @@
namespace ImGuiNET
{
[System.Flags]
public enum ImGuiViewportFlags
{
None = 0,
NoDecoration = 1 << 0,
NoTaskBarIcon = 1 << 1,
NoFocusOnAppearing = 1 << 2,
NoFocusOnClick = 1 << 3,
NoInputs = 1 << 4,
NoRendererClear = 1 << 5,
TopMost = 1 << 6,
Minimized = 1 << 7,
NoAutoMerge = 1 << 8,
CanHostOtherWindows = 1 << 9,
}
}

@ -0,0 +1,40 @@
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Text;
namespace ImGuiNET
{
public unsafe partial struct ImGuiWindowClass
{
public uint ClassId;
public uint ParentViewportId;
public ImGuiViewportFlags ViewportFlagsOverrideSet;
public ImGuiViewportFlags ViewportFlagsOverrideClear;
public ImGuiDockNodeFlags DockNodeFlagsOverrideSet;
public ImGuiDockNodeFlags DockNodeFlagsOverrideClear;
public byte DockingAlwaysTabBar;
public byte DockingAllowUnclassed;
}
public unsafe partial struct ImGuiWindowClassPtr
{
public ImGuiWindowClass* NativePtr { get; }
public ImGuiWindowClassPtr(ImGuiWindowClass* nativePtr) => NativePtr = nativePtr;
public ImGuiWindowClassPtr(IntPtr nativePtr) => NativePtr = (ImGuiWindowClass*)nativePtr;
public static implicit operator ImGuiWindowClassPtr(ImGuiWindowClass* nativePtr) => new ImGuiWindowClassPtr(nativePtr);
public static implicit operator ImGuiWindowClass* (ImGuiWindowClassPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImGuiWindowClassPtr(IntPtr nativePtr) => new ImGuiWindowClassPtr(nativePtr);
public ref uint ClassId => ref Unsafe.AsRef<uint>(&NativePtr->ClassId);
public ref uint ParentViewportId => ref Unsafe.AsRef<uint>(&NativePtr->ParentViewportId);
public ref ImGuiViewportFlags ViewportFlagsOverrideSet => ref Unsafe.AsRef<ImGuiViewportFlags>(&NativePtr->ViewportFlagsOverrideSet);
public ref ImGuiViewportFlags ViewportFlagsOverrideClear => ref Unsafe.AsRef<ImGuiViewportFlags>(&NativePtr->ViewportFlagsOverrideClear);
public ref ImGuiDockNodeFlags DockNodeFlagsOverrideSet => ref Unsafe.AsRef<ImGuiDockNodeFlags>(&NativePtr->DockNodeFlagsOverrideSet);
public ref ImGuiDockNodeFlags DockNodeFlagsOverrideClear => ref Unsafe.AsRef<ImGuiDockNodeFlags>(&NativePtr->DockNodeFlagsOverrideClear);
public ref bool DockingAlwaysTabBar => ref Unsafe.AsRef<bool>(&NativePtr->DockingAlwaysTabBar);
public ref bool DockingAllowUnclassed => ref Unsafe.AsRef<bool>(&NativePtr->DockingAllowUnclassed);
public void Destroy()
{
ImGuiNative.ImGuiWindowClass_destroy((ImGuiWindowClass*)(NativePtr));
}
}
}

@ -24,6 +24,7 @@ namespace ImGuiNET
NoNavInputs = 1 << 18,
NoNavFocus = 1 << 19,
UnsavedDocument = 1 << 20,
NoDocking = 1 << 21,
NoNav = NoNavInputs | NoNavFocus,
NoDecoration = NoTitleBar | NoResize | NoScrollbar | NoCollapse,
NoInputs = NoMouseInputs | NoNavInputs | NoNavFocus,
@ -33,5 +34,6 @@ namespace ImGuiNET
Popup = 1 << 26,
Modal = 1 << 27,
ChildMenu = 1 << 28,
DockNodeHost = 1 << 29,
}
}

@ -15,7 +15,7 @@ namespace ImGuiNET
native_text_begin[native_text_begin_offset] = 0;
}
byte* native_text_end = null;
ImGuiNative.ImDrawList_AddText(NativePtr, pos, col, native_text_begin, native_text_end);
ImGuiNative.ImDrawList_AddTextVec2(NativePtr, pos, col, native_text_begin, native_text_end);
}
public void AddText(ImFontPtr font, float font_size, Vector2 pos, uint col, string text_begin)

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>A .NET wrapper for the Dear ImGui library.</Description>
<AssemblyVersion>1.75.0</AssemblyVersion>
<AssemblyVersion>1.78.0</AssemblyVersion>
<Authors>Eric Mellino</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

Loading…
Cancel
Save