Using cimgui from docking_inter branch again

internals
Alex Hildebrand 4 years ago
parent 7ab250feb8
commit 2d1fc76b21
  1. 5181
      src/CodeGenerator/definitions/cimgui/definitions.json
  2. 1530
      src/CodeGenerator/definitions/cimgui/structs_and_enums.json
  3. 2
      src/ImGui.NET/Generated/ImDrawData.gen.cs
  4. 211
      src/ImGui.NET/Generated/ImGui.gen.cs
  5. 3
      src/ImGui.NET/Generated/ImGuiBackendFlags.gen.cs
  6. 34
      src/ImGui.NET/Generated/ImGuiCol.gen.cs
  7. 4
      src/ImGui.NET/Generated/ImGuiConfigFlags.gen.cs
  8. 14
      src/ImGui.NET/Generated/ImGuiDockNodeFlags.gen.cs
  9. 22
      src/ImGui.NET/Generated/ImGuiIO.gen.cs
  10. 46
      src/ImGui.NET/Generated/ImGuiNative.gen.cs
  11. 76
      src/ImGui.NET/Generated/ImGuiPlatformIO.gen.cs
  12. 34
      src/ImGui.NET/Generated/ImGuiPlatformMonitor.gen.cs
  13. 4
      src/ImGui.NET/Generated/ImGuiStyle.gen.cs
  14. 22
      src/ImGui.NET/Generated/ImGuiViewport.gen.cs
  15. 10
      src/ImGui.NET/Generated/ImGuiViewportFlags.gen.cs
  16. 42
      src/ImGui.NET/Generated/ImGuiWindowClass.gen.cs
  17. 2
      src/ImGui.NET/Generated/ImGuiWindowFlags.gen.cs

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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

@ -2258,6 +2258,63 @@ namespace ImGuiNET
{ {
ImGuiNative.igDestroyContext(ctx); ImGuiNative.igDestroyContext(ctx);
} }
public static void DestroyPlatformWindows()
{
ImGuiNative.igDestroyPlatformWindows();
}
public static void DockSpace(uint id)
{
Vector2 size = new Vector2();
ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0;
ImGuiWindowClass* window_class = null;
ImGuiNative.igDockSpace(id, size, flags, window_class);
}
public static void DockSpace(uint id, Vector2 size)
{
ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0;
ImGuiWindowClass* window_class = null;
ImGuiNative.igDockSpace(id, size, flags, window_class);
}
public static void DockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags)
{
ImGuiWindowClass* window_class = null;
ImGuiNative.igDockSpace(id, size, flags, window_class);
}
public static void DockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags, ImGuiWindowClassPtr window_class)
{
ImGuiWindowClass* native_window_class = window_class.NativePtr;
ImGuiNative.igDockSpace(id, size, flags, native_window_class);
}
public static uint DockSpaceOverViewport()
{
ImGuiViewport* viewport = null;
ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0;
ImGuiWindowClass* window_class = null;
uint ret = ImGuiNative.igDockSpaceOverViewport(viewport, flags, window_class);
return ret;
}
public static uint DockSpaceOverViewport(ImGuiViewportPtr viewport)
{
ImGuiViewport* native_viewport = viewport.NativePtr;
ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0;
ImGuiWindowClass* window_class = null;
uint ret = ImGuiNative.igDockSpaceOverViewport(native_viewport, flags, window_class);
return ret;
}
public static uint DockSpaceOverViewport(ImGuiViewportPtr viewport, ImGuiDockNodeFlags flags)
{
ImGuiViewport* native_viewport = viewport.NativePtr;
ImGuiWindowClass* window_class = null;
uint ret = ImGuiNative.igDockSpaceOverViewport(native_viewport, flags, window_class);
return ret;
}
public static uint DockSpaceOverViewport(ImGuiViewportPtr viewport, ImGuiDockNodeFlags flags, ImGuiWindowClassPtr window_class)
{
ImGuiViewport* native_viewport = viewport.NativePtr;
ImGuiWindowClass* native_window_class = window_class.NativePtr;
uint ret = ImGuiNative.igDockSpaceOverViewport(native_viewport, flags, native_window_class);
return ret;
}
public static bool DragFloat(string label, ref float v) public static bool DragFloat(string label, ref float v)
{ {
byte* native_label; byte* native_label;
@ -5574,39 +5631,6 @@ namespace ImGuiNET
} }
} }
} }
public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data)
{
byte* native_label;
int label_byteCount = 0;
if (label != null)
{
label_byteCount = Encoding.UTF8.GetByteCount(label);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
native_label = Util.Allocate(label_byteCount + 1);
}
else
{
byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1];
native_label = native_label_stackBytes;
}
int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount);
native_label[native_label_offset] = 0;
}
else { native_label = null; }
void* native_p_data = (void*)p_data.ToPointer();
float v_speed = 1.0f;
void* p_min = null;
void* p_max = null;
byte* native_format = null;
ImGuiSliderFlags flags = (ImGuiSliderFlags)0;
byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, p_min, p_max, native_format, flags);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_label);
}
return ret != 0;
}
public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed) public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed)
{ {
byte* native_label; byte* native_label;
@ -5808,39 +5832,6 @@ namespace ImGuiNET
} }
return ret != 0; return ret != 0;
} }
public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components)
{
byte* native_label;
int label_byteCount = 0;
if (label != null)
{
label_byteCount = Encoding.UTF8.GetByteCount(label);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
native_label = Util.Allocate(label_byteCount + 1);
}
else
{
byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1];
native_label = native_label_stackBytes;
}
int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount);
native_label[native_label_offset] = 0;
}
else { native_label = null; }
void* native_p_data = (void*)p_data.ToPointer();
float v_speed = 1.0f;
void* p_min = null;
void* p_max = null;
byte* native_format = null;
ImGuiSliderFlags flags = (ImGuiSliderFlags)0;
byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, p_min, p_max, native_format, flags);
if (label_byteCount > Util.StackAllocationSizeLimit)
{
Util.Free(native_label);
}
return ret != 0;
}
public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, float v_speed) public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, float v_speed)
{ {
byte* native_label; byte* native_label;
@ -6114,6 +6105,17 @@ namespace ImGuiNET
{ {
ImGuiNative.igEndTooltip(); ImGuiNative.igEndTooltip();
} }
public static ImGuiViewportPtr FindViewportByID(uint id)
{
ImGuiViewport* ret = ImGuiNative.igFindViewportByID(id);
return new ImGuiViewportPtr(ret);
}
public static ImGuiViewportPtr FindViewportByPlatformHandle(IntPtr platform_handle)
{
void* native_platform_handle = (void*)platform_handle.ToPointer();
ImGuiViewport* ret = ImGuiNative.igFindViewportByPlatformHandle(native_platform_handle);
return new ImGuiViewportPtr(ret);
}
public static void GetAllocatorFunctions(ref IntPtr p_alloc_func, ref IntPtr p_free_func, ref void* p_user_data) public static void GetAllocatorFunctions(ref IntPtr p_alloc_func, ref IntPtr p_free_func, ref void* p_user_data)
{ {
fixed (IntPtr* native_p_alloc_func = &p_alloc_func) fixed (IntPtr* native_p_alloc_func = &p_alloc_func)
@ -6132,6 +6134,12 @@ namespace ImGuiNET
ImDrawList* ret = ImGuiNative.igGetBackgroundDrawListNil(); ImDrawList* ret = ImGuiNative.igGetBackgroundDrawListNil();
return new ImDrawListPtr(ret); return new ImDrawListPtr(ret);
} }
public static ImDrawListPtr GetBackgroundDrawList(ImGuiViewportPtr viewport)
{
ImGuiViewport* native_viewport = viewport.NativePtr;
ImDrawList* ret = ImGuiNative.igGetBackgroundDrawListViewportPtr(native_viewport);
return new ImDrawListPtr(ret);
}
public static string GetClipboardText() public static string GetClipboardText()
{ {
byte* ret = ImGuiNative.igGetClipboardText(); byte* ret = ImGuiNative.igGetClipboardText();
@ -6271,6 +6279,12 @@ namespace ImGuiNET
ImDrawList* ret = ImGuiNative.igGetForegroundDrawListNil(); ImDrawList* ret = ImGuiNative.igGetForegroundDrawListNil();
return new ImDrawListPtr(ret); return new ImDrawListPtr(ret);
} }
public static ImDrawListPtr GetForegroundDrawList(ImGuiViewportPtr viewport)
{
ImGuiViewport* native_viewport = viewport.NativePtr;
ImDrawList* ret = ImGuiNative.igGetForegroundDrawListViewportPtr(native_viewport);
return new ImDrawListPtr(ret);
}
public static int GetFrameCount() public static int GetFrameCount()
{ {
int ret = ImGuiNative.igGetFrameCount(); int ret = ImGuiNative.igGetFrameCount();
@ -6395,6 +6409,11 @@ namespace ImGuiNET
ImGuiNative.igGetMousePosOnOpeningCurrentPopup(&__retval); ImGuiNative.igGetMousePosOnOpeningCurrentPopup(&__retval);
return __retval; return __retval;
} }
public static ImGuiPlatformIOPtr GetPlatformIO()
{
ImGuiPlatformIO* ret = ImGuiNative.igGetPlatformIO();
return new ImGuiPlatformIOPtr(ret);
}
public static float GetScrollMaxX() public static float GetScrollMaxX()
{ {
float ret = ImGuiNative.igGetScrollMaxX(); float ret = ImGuiNative.igGetScrollMaxX();
@ -6477,6 +6496,16 @@ namespace ImGuiNET
float ret = ImGuiNative.igGetWindowContentRegionWidth(); float ret = ImGuiNative.igGetWindowContentRegionWidth();
return ret; return ret;
} }
public static uint GetWindowDockID()
{
uint ret = ImGuiNative.igGetWindowDockID();
return ret;
}
public static float GetWindowDpiScale()
{
float ret = ImGuiNative.igGetWindowDpiScale();
return ret;
}
public static ImDrawListPtr GetWindowDrawList() public static ImDrawListPtr GetWindowDrawList()
{ {
ImDrawList* ret = ImGuiNative.igGetWindowDrawList(); ImDrawList* ret = ImGuiNative.igGetWindowDrawList();
@ -6499,6 +6528,11 @@ namespace ImGuiNET
ImGuiNative.igGetWindowSize(&__retval); ImGuiNative.igGetWindowSize(&__retval);
return __retval; return __retval;
} }
public static ImGuiViewportPtr GetWindowViewport()
{
ImGuiViewport* ret = ImGuiNative.igGetWindowViewport();
return new ImGuiViewportPtr(ret);
}
public static float GetWindowWidth() public static float GetWindowWidth()
{ {
float ret = ImGuiNative.igGetWindowWidth(); float ret = ImGuiNative.igGetWindowWidth();
@ -8860,6 +8894,11 @@ namespace ImGuiNET
byte ret = ImGuiNative.igIsWindowCollapsed(); byte ret = ImGuiNative.igIsWindowCollapsed();
return ret != 0; return ret != 0;
} }
public static bool IsWindowDocked()
{
byte ret = ImGuiNative.igIsWindowDocked();
return ret != 0;
}
public static bool IsWindowFocused() public static bool IsWindowFocused()
{ {
ImGuiFocusedFlags flags = (ImGuiFocusedFlags)0; ImGuiFocusedFlags flags = (ImGuiFocusedFlags)0;
@ -10533,6 +10572,24 @@ namespace ImGuiNET
{ {
ImGuiNative.igRender(); ImGuiNative.igRender();
} }
public static void RenderPlatformWindowsDefault()
{
void* platform_render_arg = null;
void* renderer_render_arg = null;
ImGuiNative.igRenderPlatformWindowsDefault(platform_render_arg, renderer_render_arg);
}
public static void RenderPlatformWindowsDefault(IntPtr platform_render_arg)
{
void* native_platform_render_arg = (void*)platform_render_arg.ToPointer();
void* renderer_render_arg = null;
ImGuiNative.igRenderPlatformWindowsDefault(native_platform_render_arg, renderer_render_arg);
}
public static void RenderPlatformWindowsDefault(IntPtr platform_render_arg, IntPtr renderer_render_arg)
{
void* native_platform_render_arg = (void*)platform_render_arg.ToPointer();
void* native_renderer_render_arg = (void*)renderer_render_arg.ToPointer();
ImGuiNative.igRenderPlatformWindowsDefault(native_platform_render_arg, native_renderer_render_arg);
}
public static void ResetMouseDragDelta() public static void ResetMouseDragDelta()
{ {
ImGuiMouseButton button = (ImGuiMouseButton)0; ImGuiMouseButton button = (ImGuiMouseButton)0;
@ -10976,6 +11033,11 @@ namespace ImGuiNET
{ {
ImGuiNative.igSetNextWindowBgAlpha(alpha); ImGuiNative.igSetNextWindowBgAlpha(alpha);
} }
public static void SetNextWindowClass(ImGuiWindowClassPtr window_class)
{
ImGuiWindowClass* native_window_class = window_class.NativePtr;
ImGuiNative.igSetNextWindowClass(native_window_class);
}
public static void SetNextWindowCollapsed(bool collapsed) public static void SetNextWindowCollapsed(bool collapsed)
{ {
byte native_collapsed = collapsed ? (byte)1 : (byte)0; byte native_collapsed = collapsed ? (byte)1 : (byte)0;
@ -10991,6 +11053,15 @@ namespace ImGuiNET
{ {
ImGuiNative.igSetNextWindowContentSize(size); ImGuiNative.igSetNextWindowContentSize(size);
} }
public static void SetNextWindowDockID(uint dock_id)
{
ImGuiCond cond = (ImGuiCond)0;
ImGuiNative.igSetNextWindowDockID(dock_id, cond);
}
public static void SetNextWindowDockID(uint dock_id, ImGuiCond cond)
{
ImGuiNative.igSetNextWindowDockID(dock_id, cond);
}
public static void SetNextWindowFocus() public static void SetNextWindowFocus()
{ {
ImGuiNative.igSetNextWindowFocus(); ImGuiNative.igSetNextWindowFocus();
@ -11035,6 +11106,10 @@ namespace ImGuiNET
void* native_custom_callback_data = (void*)custom_callback_data.ToPointer(); void* native_custom_callback_data = (void*)custom_callback_data.ToPointer();
ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, native_custom_callback_data); ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, native_custom_callback_data);
} }
public static void SetNextWindowViewport(uint viewport_id)
{
ImGuiNative.igSetNextWindowViewport(viewport_id);
}
public static void SetScrollFromPosX(float local_x) public static void SetScrollFromPosX(float local_x)
{ {
float center_x_ratio = 0.5f; float center_x_ratio = 0.5f;
@ -13976,6 +14051,10 @@ namespace ImGuiNET
{ {
ImGuiNative.igUnindent(indent_w); ImGuiNative.igUnindent(indent_w);
} }
public static void UpdatePlatformWindows()
{
ImGuiNative.igUpdatePlatformWindows();
}
public static void Value(string prefix, bool b) public static void Value(string prefix, bool b)
{ {
byte* native_prefix; byte* native_prefix;

@ -8,5 +8,8 @@ namespace ImGuiNET
HasMouseCursors = 2, HasMouseCursors = 2,
HasSetMousePos = 4, HasSetMousePos = 4,
RendererHasVtxOffset = 8, RendererHasVtxOffset = 8,
PlatformHasViewports = 1024,
HasMouseHoveredViewport = 2048,
RendererHasViewports = 4096,
} }
} }

@ -40,21 +40,23 @@ namespace ImGuiNET
TabActive = 35, TabActive = 35,
TabUnfocused = 36, TabUnfocused = 36,
TabUnfocusedActive = 37, TabUnfocusedActive = 37,
PlotLines = 38, DockingPreview = 38,
PlotLinesHovered = 39, DockingEmptyBg = 39,
PlotHistogram = 40, PlotLines = 40,
PlotHistogramHovered = 41, PlotLinesHovered = 41,
TableHeaderBg = 42, PlotHistogram = 42,
TableBorderStrong = 43, PlotHistogramHovered = 43,
TableBorderLight = 44, TableHeaderBg = 44,
TableRowBg = 45, TableBorderStrong = 45,
TableRowBgAlt = 46, TableBorderLight = 46,
TextSelectedBg = 47, TableRowBg = 47,
DragDropTarget = 48, TableRowBgAlt = 48,
NavHighlight = 49, TextSelectedBg = 49,
NavWindowingHighlight = 50, DragDropTarget = 50,
NavWindowingDimBg = 51, NavHighlight = 51,
ModalWindowDimBg = 52, NavWindowingHighlight = 52,
COUNT = 53, NavWindowingDimBg = 53,
ModalWindowDimBg = 54,
COUNT = 55,
} }
} }

@ -10,6 +10,10 @@ namespace ImGuiNET
NavNoCaptureKeyboard = 8, NavNoCaptureKeyboard = 8,
NoMouse = 16, NoMouse = 16,
NoMouseCursorChange = 32, NoMouseCursorChange = 32,
DockingEnable = 64,
ViewportsEnable = 1024,
DpiEnableScaleViewports = 16384,
DpiEnableScaleFonts = 32768,
IsSRGB = 1048576, IsSRGB = 1048576,
IsTouchScreen = 2097152, IsTouchScreen = 2097152,
} }

@ -0,0 +1,14 @@
namespace ImGuiNET
{
[System.Flags]
public enum ImGuiDockNodeFlags
{
None = 0,
KeepAliveOnly = 1,
NoDockingInCentralNode = 4,
PassthruCentralNode = 8,
NoSplit = 16,
NoResize = 32,
AutoHideTabBar = 64,
}
}

@ -26,6 +26,14 @@ namespace ImGuiNET
public byte FontAllowUserScaling; public byte FontAllowUserScaling;
public ImFont* FontDefault; public ImFont* FontDefault;
public Vector2 DisplayFramebufferScale; 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 MouseDrawCursor;
public byte ConfigMacOSXBehaviors; public byte ConfigMacOSXBehaviors;
public byte ConfigInputTextCursorBlink; public byte ConfigInputTextCursorBlink;
@ -41,12 +49,11 @@ namespace ImGuiNET
public IntPtr GetClipboardTextFn; public IntPtr GetClipboardTextFn;
public IntPtr SetClipboardTextFn; public IntPtr SetClipboardTextFn;
public void* ClipboardUserData; public void* ClipboardUserData;
public IntPtr ImeSetInputScreenPosFn;
public void* ImeWindowHandle;
public Vector2 MousePos; public Vector2 MousePos;
public fixed byte MouseDown[5]; public fixed byte MouseDown[5];
public float MouseWheel; public float MouseWheel;
public float MouseWheelH; public float MouseWheelH;
public uint MouseHoveredViewport;
public byte KeyCtrl; public byte KeyCtrl;
public byte KeyShift; public byte KeyShift;
public byte KeyAlt; public byte KeyAlt;
@ -123,6 +130,14 @@ namespace ImGuiNET
public ref bool FontAllowUserScaling => ref Unsafe.AsRef<bool>(&NativePtr->FontAllowUserScaling); public ref bool FontAllowUserScaling => ref Unsafe.AsRef<bool>(&NativePtr->FontAllowUserScaling);
public ImFontPtr FontDefault => new ImFontPtr(NativePtr->FontDefault); public ImFontPtr FontDefault => new ImFontPtr(NativePtr->FontDefault);
public ref Vector2 DisplayFramebufferScale => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayFramebufferScale); 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 MouseDrawCursor => ref Unsafe.AsRef<bool>(&NativePtr->MouseDrawCursor);
public ref bool ConfigMacOSXBehaviors => ref Unsafe.AsRef<bool>(&NativePtr->ConfigMacOSXBehaviors); public ref bool ConfigMacOSXBehaviors => ref Unsafe.AsRef<bool>(&NativePtr->ConfigMacOSXBehaviors);
public ref bool ConfigInputTextCursorBlink => ref Unsafe.AsRef<bool>(&NativePtr->ConfigInputTextCursorBlink); public ref bool ConfigInputTextCursorBlink => ref Unsafe.AsRef<bool>(&NativePtr->ConfigInputTextCursorBlink);
@ -138,12 +153,11 @@ namespace ImGuiNET
public ref IntPtr GetClipboardTextFn => ref Unsafe.AsRef<IntPtr>(&NativePtr->GetClipboardTextFn); public ref IntPtr GetClipboardTextFn => ref Unsafe.AsRef<IntPtr>(&NativePtr->GetClipboardTextFn);
public ref IntPtr SetClipboardTextFn => ref Unsafe.AsRef<IntPtr>(&NativePtr->SetClipboardTextFn); public ref IntPtr SetClipboardTextFn => ref Unsafe.AsRef<IntPtr>(&NativePtr->SetClipboardTextFn);
public IntPtr ClipboardUserData { get => (IntPtr)NativePtr->ClipboardUserData; set => NativePtr->ClipboardUserData = (void*)value; } 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 ref Vector2 MousePos => ref Unsafe.AsRef<Vector2>(&NativePtr->MousePos); public ref Vector2 MousePos => ref Unsafe.AsRef<Vector2>(&NativePtr->MousePos);
public RangeAccessor<bool> MouseDown => new RangeAccessor<bool>(NativePtr->MouseDown, 5); public RangeAccessor<bool> MouseDown => new RangeAccessor<bool>(NativePtr->MouseDown, 5);
public ref float MouseWheel => ref Unsafe.AsRef<float>(&NativePtr->MouseWheel); public ref float MouseWheel => ref Unsafe.AsRef<float>(&NativePtr->MouseWheel);
public ref float MouseWheelH => ref Unsafe.AsRef<float>(&NativePtr->MouseWheelH); 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 KeyCtrl => ref Unsafe.AsRef<bool>(&NativePtr->KeyCtrl);
public ref bool KeyShift => ref Unsafe.AsRef<bool>(&NativePtr->KeyShift); public ref bool KeyShift => ref Unsafe.AsRef<bool>(&NativePtr->KeyShift);
public ref bool KeyAlt => ref Unsafe.AsRef<bool>(&NativePtr->KeyAlt); public ref bool KeyAlt => ref Unsafe.AsRef<bool>(&NativePtr->KeyAlt);

@ -113,6 +113,12 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igDestroyContext(IntPtr ctx); public static extern void igDestroyContext(IntPtr ctx);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
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 igDragFloat(byte* label, float* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); 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)] [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, ImGuiSliderFlags flags); public static extern byte igDragFloat2(byte* label, Vector2* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags);
@ -173,10 +179,16 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igEndTooltip(); public static extern void igEndTooltip();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
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 void igGetAllocatorFunctions(IntPtr* p_alloc_func, IntPtr* p_free_func, void** p_user_data); public static extern void igGetAllocatorFunctions(IntPtr* p_alloc_func, IntPtr* p_free_func, void** p_user_data);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetBackgroundDrawListNil(); public static extern ImDrawList* igGetBackgroundDrawListNil();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetBackgroundDrawListViewportPtr(ImGuiViewport* viewport);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte* igGetClipboardText(); public static extern byte* igGetClipboardText();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern uint igGetColorU32Col(ImGuiCol idx, float alpha_mul); public static extern uint igGetColorU32Col(ImGuiCol idx, float alpha_mul);
@ -223,6 +235,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetForegroundDrawListNil(); public static extern ImDrawList* igGetForegroundDrawListNil();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImDrawList* igGetForegroundDrawListViewportPtr(ImGuiViewport* viewport);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern int igGetFrameCount(); public static extern int igGetFrameCount();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetFrameHeight(); public static extern float igGetFrameHeight();
@ -257,6 +271,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetMousePosOnOpeningCurrentPopup(Vector2* pOut); public static extern void igGetMousePosOnOpeningCurrentPopup(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiPlatformIO* igGetPlatformIO();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetScrollMaxX(); public static extern float igGetScrollMaxX();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetScrollMaxY(); public static extern float igGetScrollMaxY();
@ -289,6 +305,10 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetWindowContentRegionWidth(); public static extern float igGetWindowContentRegionWidth();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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(); public static extern ImDrawList* igGetWindowDrawList();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetWindowHeight(); public static extern float igGetWindowHeight();
@ -297,6 +317,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igGetWindowSize(Vector2* pOut); public static extern void igGetWindowSize(Vector2* pOut);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiViewport* igGetWindowViewport();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetWindowWidth(); public static extern float igGetWindowWidth();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igImage(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tint_col, Vector4 border_col); public static extern void igImage(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tint_col, Vector4 border_col);
@ -393,6 +415,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsWindowCollapsed(); public static extern byte igIsWindowCollapsed();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsWindowDocked();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsWindowFocused(ImGuiFocusedFlags flags); public static extern byte igIsWindowFocused(ImGuiFocusedFlags flags);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte igIsWindowHovered(ImGuiHoveredFlags flags); public static extern byte igIsWindowHovered(ImGuiHoveredFlags flags);
@ -493,6 +517,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igRender(); public static extern void igRender();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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); public static extern void igResetMouseDragDelta(ImGuiMouseButton button);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSameLine(float offset_from_start_x, float spacing); public static extern void igSameLine(float offset_from_start_x, float spacing);
@ -543,10 +569,14 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowBgAlpha(float alpha); public static extern void igSetNextWindowBgAlpha(float alpha);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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); public static extern void igSetNextWindowCollapsed(byte collapsed, ImGuiCond cond);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowContentSize(Vector2 size); public static extern void igSetNextWindowContentSize(Vector2 size);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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(); public static extern void igSetNextWindowFocus();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowPos(Vector2 pos, ImGuiCond cond, Vector2 pivot); public static extern void igSetNextWindowPos(Vector2 pos, ImGuiCond cond, Vector2 pivot);
@ -555,6 +585,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback, void* custom_callback_data); public static extern void igSetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback, void* custom_callback_data);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowViewport(uint viewport_id);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollFromPosXFloat(float local_x, float center_x_ratio); public static extern void igSetScrollFromPosXFloat(float local_x, float center_x_ratio);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollFromPosYFloat(float local_y, float center_y_ratio); public static extern void igSetScrollFromPosYFloat(float local_y, float center_y_ratio);
@ -697,6 +729,8 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igUnindent(float indent_w); public static extern void igUnindent(float indent_w);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igUpdatePlatformWindows();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igValueBool(byte* prefix, byte b); public static extern void igValueBool(byte* prefix, byte b);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void igValueInt(byte* prefix, int v); public static extern void igValueInt(byte* prefix, int v);
@ -1063,6 +1097,14 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ImGuiPayload_IsPreview(ImGuiPayload* self); public static extern byte ImGuiPayload_IsPreview(ImGuiPayload* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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); public static extern void ImGuiStorage_BuildSortByKey(ImGuiStorage* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern void ImGuiStorage_Clear(ImGuiStorage* self); public static extern void ImGuiStorage_Clear(ImGuiStorage* self);
@ -1169,6 +1211,10 @@ namespace ImGuiNET
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern ImGuiViewport* ImGuiViewport_ImGuiViewport(); public static extern ImGuiViewport* ImGuiViewport_ImGuiViewport();
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [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); public static extern void ImVec2_destroy(Vector2* self);
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
public static extern Vector2* ImVec2_ImVec2Nil(); public static extern Vector2* ImVec2_ImVec2Nil();

@ -0,0 +1,76 @@
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 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 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));
}
}
}

@ -99,6 +99,8 @@ namespace ImGuiNET
public Vector4 Colors_50; public Vector4 Colors_50;
public Vector4 Colors_51; public Vector4 Colors_51;
public Vector4 Colors_52; public Vector4 Colors_52;
public Vector4 Colors_53;
public Vector4 Colors_54;
} }
public unsafe partial struct ImGuiStylePtr public unsafe partial struct ImGuiStylePtr
{ {
@ -147,7 +149,7 @@ namespace ImGuiNET
public ref bool AntiAliasedFill => ref Unsafe.AsRef<bool>(&NativePtr->AntiAliasedFill); public ref bool AntiAliasedFill => ref Unsafe.AsRef<bool>(&NativePtr->AntiAliasedFill);
public ref float CurveTessellationTol => ref Unsafe.AsRef<float>(&NativePtr->CurveTessellationTol); public ref float CurveTessellationTol => ref Unsafe.AsRef<float>(&NativePtr->CurveTessellationTol);
public ref float CircleTessellationMaxError => ref Unsafe.AsRef<float>(&NativePtr->CircleTessellationMaxError); public ref float CircleTessellationMaxError => ref Unsafe.AsRef<float>(&NativePtr->CircleTessellationMaxError);
public RangeAccessor<Vector4> Colors => new RangeAccessor<Vector4>(&NativePtr->Colors_0, 53); public RangeAccessor<Vector4> Colors => new RangeAccessor<Vector4>(&NativePtr->Colors_0, 55);
public void Destroy() public void Destroy()
{ {
ImGuiNative.ImGuiStyle_destroy((ImGuiStyle*)(NativePtr)); ImGuiNative.ImGuiStyle_destroy((ImGuiStyle*)(NativePtr));

@ -7,11 +7,22 @@ namespace ImGuiNET
{ {
public unsafe partial struct ImGuiViewport public unsafe partial struct ImGuiViewport
{ {
public uint ID;
public ImGuiViewportFlags Flags; public ImGuiViewportFlags Flags;
public Vector2 Pos; public Vector2 Pos;
public Vector2 Size; public Vector2 Size;
public Vector2 WorkPos; public Vector2 WorkPos;
public Vector2 WorkSize; public Vector2 WorkSize;
public float DpiScale;
public uint ParentViewportId;
public ImDrawData* DrawData;
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 unsafe partial struct ImGuiViewportPtr
{ {
@ -21,11 +32,22 @@ namespace ImGuiNET
public static implicit operator ImGuiViewportPtr(ImGuiViewport* nativePtr) => new ImGuiViewportPtr(nativePtr); public static implicit operator ImGuiViewportPtr(ImGuiViewport* nativePtr) => new ImGuiViewportPtr(nativePtr);
public static implicit operator ImGuiViewport* (ImGuiViewportPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiViewport* (ImGuiViewportPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImGuiViewportPtr(IntPtr nativePtr) => new ImGuiViewportPtr(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 ImGuiViewportFlags Flags => ref Unsafe.AsRef<ImGuiViewportFlags>(&NativePtr->Flags);
public ref Vector2 Pos => ref Unsafe.AsRef<Vector2>(&NativePtr->Pos); public ref Vector2 Pos => ref Unsafe.AsRef<Vector2>(&NativePtr->Pos);
public ref Vector2 Size => ref Unsafe.AsRef<Vector2>(&NativePtr->Size); public ref Vector2 Size => ref Unsafe.AsRef<Vector2>(&NativePtr->Size);
public ref Vector2 WorkPos => ref Unsafe.AsRef<Vector2>(&NativePtr->WorkPos); public ref Vector2 WorkPos => ref Unsafe.AsRef<Vector2>(&NativePtr->WorkPos);
public ref Vector2 WorkSize => ref Unsafe.AsRef<Vector2>(&NativePtr->WorkSize); public ref Vector2 WorkSize => ref Unsafe.AsRef<Vector2>(&NativePtr->WorkSize);
public ref float DpiScale => ref Unsafe.AsRef<float>(&NativePtr->DpiScale);
public ref uint ParentViewportId => ref Unsafe.AsRef<uint>(&NativePtr->ParentViewportId);
public ImDrawDataPtr DrawData => new ImDrawDataPtr(NativePtr->DrawData);
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() public void Destroy()
{ {
ImGuiNative.ImGuiViewport_destroy((ImGuiViewport*)(NativePtr)); ImGuiNative.ImGuiViewport_destroy((ImGuiViewport*)(NativePtr));

@ -7,5 +7,15 @@ namespace ImGuiNET
IsPlatformWindow = 1, IsPlatformWindow = 1,
IsPlatformMonitor = 2, IsPlatformMonitor = 2,
OwnedByApp = 4, OwnedByApp = 4,
NoDecoration = 8,
NoTaskBarIcon = 16,
NoFocusOnAppearing = 32,
NoFocusOnClick = 64,
NoInputs = 128,
NoRendererClear = 256,
TopMost = 512,
Minimized = 1024,
NoAutoMerge = 2048,
CanHostOtherWindows = 4096,
} }
} }

@ -0,0 +1,42 @@
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 ImGuiTabItemFlags TabItemFlagsOverrideSet;
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 ImGuiTabItemFlags TabItemFlagsOverrideSet => ref Unsafe.AsRef<ImGuiTabItemFlags>(&NativePtr->TabItemFlagsOverrideSet);
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 = 262144, NoNavInputs = 262144,
NoNavFocus = 524288, NoNavFocus = 524288,
UnsavedDocument = 1048576, UnsavedDocument = 1048576,
NoDocking = 2097152,
NoNav = 786432, NoNav = 786432,
NoDecoration = 43, NoDecoration = 43,
NoInputs = 786944, NoInputs = 786944,
@ -33,5 +34,6 @@ namespace ImGuiNET
Popup = 67108864, Popup = 67108864,
Modal = 134217728, Modal = 134217728,
ChildMenu = 268435456, ChildMenu = 268435456,
DockNodeHost = 536870912,
} }
} }

Loading…
Cancel
Save