Skip to content

Commit 13ce5ec

Browse files
committed
Generated code files for ImPlot.NET, ImNodes.NET and ImGuizmo.NET
1 parent 0bf95cb commit 13ce5ec

31 files changed

+34937
-0
lines changed
Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
using System;
2+
using System.Numerics;
3+
using System.Runtime.InteropServices;
4+
using System.Text;
5+
6+
namespace ImGuiNET
7+
{
8+
public static unsafe partial class ImGuizmo
9+
{
10+
public static void BeginFrame()
11+
{
12+
ImGuizmoNative.ImGuizmo_BeginFrame();
13+
}
14+
public static void DecomposeMatrixToComponents(ref float matrix, ref float translation, ref float rotation, ref float scale)
15+
{
16+
fixed (float* native_matrix = &matrix)
17+
{
18+
fixed (float* native_translation = &translation)
19+
{
20+
fixed (float* native_rotation = &rotation)
21+
{
22+
fixed (float* native_scale = &scale)
23+
{
24+
ImGuizmoNative.ImGuizmo_DecomposeMatrixToComponents(native_matrix, native_translation, native_rotation, native_scale);
25+
}
26+
}
27+
}
28+
}
29+
}
30+
public static void DrawCubes(ref float view, ref float projection, ref float matrices, int matrixCount)
31+
{
32+
fixed (float* native_view = &view)
33+
{
34+
fixed (float* native_projection = &projection)
35+
{
36+
fixed (float* native_matrices = &matrices)
37+
{
38+
ImGuizmoNative.ImGuizmo_DrawCubes(native_view, native_projection, native_matrices, matrixCount);
39+
}
40+
}
41+
}
42+
}
43+
public static void DrawGrid(ref float view, ref float projection, ref float matrix, float gridSize)
44+
{
45+
fixed (float* native_view = &view)
46+
{
47+
fixed (float* native_projection = &projection)
48+
{
49+
fixed (float* native_matrix = &matrix)
50+
{
51+
ImGuizmoNative.ImGuizmo_DrawGrid(native_view, native_projection, native_matrix, gridSize);
52+
}
53+
}
54+
}
55+
}
56+
public static void Enable(bool enable)
57+
{
58+
byte native_enable = enable ? (byte)1 : (byte)0;
59+
ImGuizmoNative.ImGuizmo_Enable(native_enable);
60+
}
61+
public static bool IsOver()
62+
{
63+
byte ret = ImGuizmoNative.ImGuizmo_IsOverNil();
64+
return ret != 0;
65+
}
66+
public static bool IsOver(OPERATION op)
67+
{
68+
byte ret = ImGuizmoNative.ImGuizmo_IsOverOPERATION(op);
69+
return ret != 0;
70+
}
71+
public static bool IsUsing()
72+
{
73+
byte ret = ImGuizmoNative.ImGuizmo_IsUsing();
74+
return ret != 0;
75+
}
76+
public static bool Manipulate(ref float view, ref float projection, OPERATION operation, MODE mode, ref float matrix)
77+
{
78+
float* deltaMatrix = null;
79+
float* snap = null;
80+
float* localBounds = null;
81+
float* boundsSnap = null;
82+
fixed (float* native_view = &view)
83+
{
84+
fixed (float* native_projection = &projection)
85+
{
86+
fixed (float* native_matrix = &matrix)
87+
{
88+
byte ret = ImGuizmoNative.ImGuizmo_Manipulate(native_view, native_projection, operation, mode, native_matrix, deltaMatrix, snap, localBounds, boundsSnap);
89+
return ret != 0;
90+
}
91+
}
92+
}
93+
}
94+
public static bool Manipulate(ref float view, ref float projection, OPERATION operation, MODE mode, ref float matrix, ref float deltaMatrix)
95+
{
96+
float* snap = null;
97+
float* localBounds = null;
98+
float* boundsSnap = null;
99+
fixed (float* native_view = &view)
100+
{
101+
fixed (float* native_projection = &projection)
102+
{
103+
fixed (float* native_matrix = &matrix)
104+
{
105+
fixed (float* native_deltaMatrix = &deltaMatrix)
106+
{
107+
byte ret = ImGuizmoNative.ImGuizmo_Manipulate(native_view, native_projection, operation, mode, native_matrix, native_deltaMatrix, snap, localBounds, boundsSnap);
108+
return ret != 0;
109+
}
110+
}
111+
}
112+
}
113+
}
114+
public static bool Manipulate(ref float view, ref float projection, OPERATION operation, MODE mode, ref float matrix, ref float deltaMatrix, ref float snap)
115+
{
116+
float* localBounds = null;
117+
float* boundsSnap = null;
118+
fixed (float* native_view = &view)
119+
{
120+
fixed (float* native_projection = &projection)
121+
{
122+
fixed (float* native_matrix = &matrix)
123+
{
124+
fixed (float* native_deltaMatrix = &deltaMatrix)
125+
{
126+
fixed (float* native_snap = &snap)
127+
{
128+
byte ret = ImGuizmoNative.ImGuizmo_Manipulate(native_view, native_projection, operation, mode, native_matrix, native_deltaMatrix, native_snap, localBounds, boundsSnap);
129+
return ret != 0;
130+
}
131+
}
132+
}
133+
}
134+
}
135+
}
136+
public static bool Manipulate(ref float view, ref float projection, OPERATION operation, MODE mode, ref float matrix, ref float deltaMatrix, ref float snap, ref float localBounds)
137+
{
138+
float* boundsSnap = null;
139+
fixed (float* native_view = &view)
140+
{
141+
fixed (float* native_projection = &projection)
142+
{
143+
fixed (float* native_matrix = &matrix)
144+
{
145+
fixed (float* native_deltaMatrix = &deltaMatrix)
146+
{
147+
fixed (float* native_snap = &snap)
148+
{
149+
fixed (float* native_localBounds = &localBounds)
150+
{
151+
byte ret = ImGuizmoNative.ImGuizmo_Manipulate(native_view, native_projection, operation, mode, native_matrix, native_deltaMatrix, native_snap, native_localBounds, boundsSnap);
152+
return ret != 0;
153+
}
154+
}
155+
}
156+
}
157+
}
158+
}
159+
}
160+
public static bool Manipulate(ref float view, ref float projection, OPERATION operation, MODE mode, ref float matrix, ref float deltaMatrix, ref float snap, ref float localBounds, ref float boundsSnap)
161+
{
162+
fixed (float* native_view = &view)
163+
{
164+
fixed (float* native_projection = &projection)
165+
{
166+
fixed (float* native_matrix = &matrix)
167+
{
168+
fixed (float* native_deltaMatrix = &deltaMatrix)
169+
{
170+
fixed (float* native_snap = &snap)
171+
{
172+
fixed (float* native_localBounds = &localBounds)
173+
{
174+
fixed (float* native_boundsSnap = &boundsSnap)
175+
{
176+
byte ret = ImGuizmoNative.ImGuizmo_Manipulate(native_view, native_projection, operation, mode, native_matrix, native_deltaMatrix, native_snap, native_localBounds, native_boundsSnap);
177+
return ret != 0;
178+
}
179+
}
180+
}
181+
}
182+
}
183+
}
184+
}
185+
}
186+
public static void RecomposeMatrixFromComponents(ref float translation, ref float rotation, ref float scale, ref float matrix)
187+
{
188+
fixed (float* native_translation = &translation)
189+
{
190+
fixed (float* native_rotation = &rotation)
191+
{
192+
fixed (float* native_scale = &scale)
193+
{
194+
fixed (float* native_matrix = &matrix)
195+
{
196+
ImGuizmoNative.ImGuizmo_RecomposeMatrixFromComponents(native_translation, native_rotation, native_scale, native_matrix);
197+
}
198+
}
199+
}
200+
}
201+
}
202+
public static void SetDrawlist()
203+
{
204+
ImDrawList* drawlist = null;
205+
ImGuizmoNative.ImGuizmo_SetDrawlist(drawlist);
206+
}
207+
public static void SetDrawlist(ImDrawListPtr drawlist)
208+
{
209+
ImDrawList* native_drawlist = drawlist.NativePtr;
210+
ImGuizmoNative.ImGuizmo_SetDrawlist(native_drawlist);
211+
}
212+
public static void SetID(int id)
213+
{
214+
ImGuizmoNative.ImGuizmo_SetID(id);
215+
}
216+
public static void SetOrthographic(bool isOrthographic)
217+
{
218+
byte native_isOrthographic = isOrthographic ? (byte)1 : (byte)0;
219+
ImGuizmoNative.ImGuizmo_SetOrthographic(native_isOrthographic);
220+
}
221+
public static void SetRect(float x, float y, float width, float height)
222+
{
223+
ImGuizmoNative.ImGuizmo_SetRect(x, y, width, height);
224+
}
225+
public static void ViewManipulate(ref float view, float length, Vector2 position, Vector2 size, uint backgroundColor)
226+
{
227+
fixed (float* native_view = &view)
228+
{
229+
ImGuizmoNative.ImGuizmo_ViewManipulate(native_view, length, position, size, backgroundColor);
230+
}
231+
}
232+
}
233+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
using System;
2+
using System.Numerics;
3+
using System.Runtime.InteropServices;
4+
5+
namespace ImGuiNET
6+
{
7+
public static unsafe partial class ImGuizmoNative
8+
{
9+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
10+
public static extern void ImGuizmo_BeginFrame();
11+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
12+
public static extern void ImGuizmo_DecomposeMatrixToComponents(float* matrix, float* translation, float* rotation, float* scale);
13+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
14+
public static extern void ImGuizmo_DrawCubes(float* view, float* projection, float* matrices, int matrixCount);
15+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
16+
public static extern void ImGuizmo_DrawGrid(float* view, float* projection, float* matrix, float gridSize);
17+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
18+
public static extern void ImGuizmo_Enable(byte enable);
19+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
20+
public static extern byte ImGuizmo_IsOverNil();
21+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
22+
public static extern byte ImGuizmo_IsOverOPERATION(OPERATION op);
23+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
24+
public static extern byte ImGuizmo_IsUsing();
25+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
26+
public static extern byte ImGuizmo_Manipulate(float* view, float* projection, OPERATION operation, MODE mode, float* matrix, float* deltaMatrix, float* snap, float* localBounds, float* boundsSnap);
27+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
28+
public static extern void ImGuizmo_RecomposeMatrixFromComponents(float* translation, float* rotation, float* scale, float* matrix);
29+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
30+
public static extern void ImGuizmo_SetDrawlist(ImDrawList* drawlist);
31+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
32+
public static extern void ImGuizmo_SetID(int id);
33+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
34+
public static extern void ImGuizmo_SetOrthographic(byte isOrthographic);
35+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
36+
public static extern void ImGuizmo_SetRect(float x, float y, float width, float height);
37+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
38+
public static extern void ImGuizmo_ViewManipulate(float* view, float length, Vector2 position, Vector2 size, uint backgroundColor);
39+
}
40+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace ImGuiNET
2+
{
3+
public enum MODE
4+
{
5+
LOCAL = 0,
6+
WORLD = 1,
7+
}
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace ImGuiNET
2+
{
3+
public enum OPERATION
4+
{
5+
TRANSLATE = 0,
6+
ROTATE = 1,
7+
SCALE = 2,
8+
BOUNDS = 3,
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace ImGuiNET
2+
{
3+
[System.Flags]
4+
public enum AttributeFlags
5+
{
6+
_None = 0,
7+
_EnableLinkDetachWithDragClick = 1 << 0,
8+
_EnableLinkCreationOnSnap = 1 << 1,
9+
}
10+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
namespace ImGuiNET
2+
{
3+
public enum ColorStyle
4+
{
5+
_NodeBackground = 0,
6+
_NodeBackgroundHovered = 1,
7+
_NodeBackgroundSelected = 2,
8+
_NodeOutline = 3,
9+
_TitleBar = 4,
10+
_TitleBarHovered = 5,
11+
_TitleBarSelected = 6,
12+
_Link = 7,
13+
_LinkHovered = 8,
14+
_LinkSelected = 9,
15+
_Pin = 10,
16+
_PinHovered = 11,
17+
_BoxSelector = 12,
18+
_BoxSelectorOutline = 13,
19+
_GridBackground = 14,
20+
_GridLine = 15,
21+
_Count = 16,
22+
}
23+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Numerics;
3+
using System.Runtime.CompilerServices;
4+
using System.Text;
5+
6+
namespace ImGuiNET
7+
{
8+
public unsafe partial struct EmulateThreeButtonMouse
9+
{
10+
public byte enabled;
11+
public byte* modifier;
12+
}
13+
public unsafe partial struct EmulateThreeButtonMousePtr
14+
{
15+
public EmulateThreeButtonMouse* NativePtr { get; }
16+
public EmulateThreeButtonMousePtr(EmulateThreeButtonMouse* nativePtr) => NativePtr = nativePtr;
17+
public EmulateThreeButtonMousePtr(IntPtr nativePtr) => NativePtr = (EmulateThreeButtonMouse*)nativePtr;
18+
public static implicit operator EmulateThreeButtonMousePtr(EmulateThreeButtonMouse* nativePtr) => new EmulateThreeButtonMousePtr(nativePtr);
19+
public static implicit operator EmulateThreeButtonMouse* (EmulateThreeButtonMousePtr wrappedPtr) => wrappedPtr.NativePtr;
20+
public static implicit operator EmulateThreeButtonMousePtr(IntPtr nativePtr) => new EmulateThreeButtonMousePtr(nativePtr);
21+
public ref bool enabled => ref Unsafe.AsRef<bool>(&NativePtr->enabled);
22+
public IntPtr modifier { get => (IntPtr)NativePtr->modifier; set => NativePtr->modifier = (byte*)value; }
23+
public void Destroy()
24+
{
25+
ImNodesNative.EmulateThreeButtonMouse_destroy((EmulateThreeButtonMouse*)(NativePtr));
26+
}
27+
}
28+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Numerics;
3+
using System.Runtime.CompilerServices;
4+
using System.Text;
5+
6+
namespace ImGuiNET
7+
{
8+
public unsafe partial struct IO
9+
{
10+
public EmulateThreeButtonMouse emulate_three_button_mouse;
11+
public LinkDetachWithModifierClick link_detach_with_modifier_click;
12+
}
13+
public unsafe partial struct IOPtr
14+
{
15+
public IO* NativePtr { get; }
16+
public IOPtr(IO* nativePtr) => NativePtr = nativePtr;
17+
public IOPtr(IntPtr nativePtr) => NativePtr = (IO*)nativePtr;
18+
public static implicit operator IOPtr(IO* nativePtr) => new IOPtr(nativePtr);
19+
public static implicit operator IO* (IOPtr wrappedPtr) => wrappedPtr.NativePtr;
20+
public static implicit operator IOPtr(IntPtr nativePtr) => new IOPtr(nativePtr);
21+
public ref EmulateThreeButtonMouse emulate_three_button_mouse => ref Unsafe.AsRef<EmulateThreeButtonMouse>(&NativePtr->emulate_three_button_mouse);
22+
public ref LinkDetachWithModifierClick link_detach_with_modifier_click => ref Unsafe.AsRef<LinkDetachWithModifierClick>(&NativePtr->link_detach_with_modifier_click);
23+
public void Destroy()
24+
{
25+
ImNodesNative.IO_destroy((IO*)(NativePtr));
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)