Skip to content

Commit 7f9b7d3

Browse files
committed
Order Functions alphabetically by name
* This helps with consistency between versions, since the json file does not always preserve order.
1 parent 5f8dffa commit 7f9b7d3

16 files changed

Lines changed: 5622 additions & 5622 deletions

src/CodeGenerator/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static void Main(string[] args)
218218
}).Where(od => od != null).ToArray();
219219

220220
return new FunctionDefinition(name, overloads);
221-
}).ToArray();
221+
}).OrderBy(fd => fd.Name).ToArray();
222222

223223
foreach (EnumDefinition ed in enums)
224224
{

src/ImGui.NET/Generated/GlyphRangesBuilder.gen.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@ public unsafe partial struct GlyphRangesBuilderPtr
1818
public static implicit operator GlyphRangesBuilder* (GlyphRangesBuilderPtr wrappedPtr) => wrappedPtr.NativePtr;
1919
public static implicit operator GlyphRangesBuilderPtr(IntPtr nativePtr) => new GlyphRangesBuilderPtr(nativePtr);
2020
public ImVector<byte> UsedChars => new ImVector<byte>(NativePtr->UsedChars);
21-
public void SetBit(int n)
21+
public void AddChar(ushort c)
2222
{
23-
ImGuiNative.GlyphRangesBuilder_SetBit(NativePtr, n);
23+
ImGuiNative.GlyphRangesBuilder_AddChar(NativePtr, c);
24+
}
25+
public void AddRanges(IntPtr ranges)
26+
{
27+
ushort* native_ranges = (ushort*)ranges.ToPointer();
28+
ImGuiNative.GlyphRangesBuilder_AddRanges(NativePtr, native_ranges);
2429
}
2530
public void AddText(string text)
2631
{
@@ -40,11 +45,6 @@ public void AddText(string text)
4045
byte* native_text_end = null;
4146
ImGuiNative.GlyphRangesBuilder_AddText(NativePtr, native_text, native_text_end);
4247
}
43-
public void AddRanges(IntPtr ranges)
44-
{
45-
ushort* native_ranges = (ushort*)ranges.ToPointer();
46-
ImGuiNative.GlyphRangesBuilder_AddRanges(NativePtr, native_ranges);
47-
}
4848
public void BuildRanges(out ImVector out_ranges)
4949
{
5050
fixed (ImVector* native_out_ranges = &out_ranges)
@@ -57,9 +57,9 @@ public bool GetBit(int n)
5757
byte ret = ImGuiNative.GlyphRangesBuilder_GetBit(NativePtr, n);
5858
return ret != 0;
5959
}
60-
public void AddChar(ushort c)
60+
public void SetBit(int n)
6161
{
62-
ImGuiNative.GlyphRangesBuilder_AddChar(NativePtr, c);
62+
ImGuiNative.GlyphRangesBuilder_SetBit(NativePtr, n);
6363
}
6464
}
6565
}

src/ImGui.NET/Generated/ImColor.gen.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@ public unsafe partial struct ImColorPtr
1818
public static implicit operator ImColor* (ImColorPtr wrappedPtr) => wrappedPtr.NativePtr;
1919
public static implicit operator ImColorPtr(IntPtr nativePtr) => new ImColorPtr(nativePtr);
2020
public ref Vector4 Value => ref Unsafe.AsRef<Vector4>(&NativePtr->Value);
21-
public void SetHSV(float h, float s, float v)
22-
{
23-
float a = 1.0f;
24-
ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a);
25-
}
26-
public void SetHSV(float h, float s, float v, float a)
27-
{
28-
ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a);
29-
}
3021
public ImColor HSV(float h, float s, float v)
3122
{
3223
float a = 1.0f;
@@ -38,5 +29,14 @@ public ImColor HSV(float h, float s, float v, float a)
3829
ImColor ret = ImGuiNative.ImColor_HSV(NativePtr, h, s, v, a);
3930
return ret;
4031
}
32+
public void SetHSV(float h, float s, float v)
33+
{
34+
float a = 1.0f;
35+
ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a);
36+
}
37+
public void SetHSV(float h, float s, float v, float a)
38+
{
39+
ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a);
40+
}
4141
}
4242
}

src/ImGui.NET/Generated/ImDrawData.gen.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ public unsafe partial struct ImDrawDataPtr
3030
public ref int TotalVtxCount => ref Unsafe.AsRef<int>(&NativePtr->TotalVtxCount);
3131
public ref Vector2 DisplayPos => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayPos);
3232
public ref Vector2 DisplaySize => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplaySize);
33-
public void ScaleClipRects(Vector2 sc)
33+
public void Clear()
3434
{
35-
ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, sc);
35+
ImGuiNative.ImDrawData_Clear(NativePtr);
3636
}
3737
public void DeIndexAllBuffers()
3838
{
3939
ImGuiNative.ImDrawData_DeIndexAllBuffers(NativePtr);
4040
}
41-
public void Clear()
41+
public void ScaleClipRects(Vector2 sc)
4242
{
43-
ImGuiNative.ImDrawData_Clear(NativePtr);
43+
ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, sc);
4444
}
4545
}
4646
}

src/ImGui.NET/Generated/ImDrawList.gen.cs

Lines changed: 195 additions & 195 deletions
Large diffs are not rendered by default.

src/ImGui.NET/Generated/ImFont.gen.cs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ public unsafe partial struct ImFontPtr
4848
public ref float Descent => ref Unsafe.AsRef<float>(&NativePtr->Descent);
4949
public ref bool DirtyLookupTables => ref Unsafe.AsRef<bool>(&NativePtr->DirtyLookupTables);
5050
public ref int MetricsTotalSurface => ref Unsafe.AsRef<int>(&NativePtr->MetricsTotalSurface);
51-
public void GrowIndex(int new_size)
51+
public void AddGlyph(ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x)
5252
{
53-
ImGuiNative.ImFont_GrowIndex(NativePtr, new_size);
53+
ImGuiNative.ImFont_AddGlyph(NativePtr, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x);
5454
}
5555
public void AddRemapChar(ushort dst, ushort src)
5656
{
@@ -62,51 +62,51 @@ public void AddRemapChar(ushort dst, ushort src, bool overwrite_dst)
6262
byte native_overwrite_dst = overwrite_dst ? (byte)1 : (byte)0;
6363
ImGuiNative.ImFont_AddRemapChar(NativePtr, dst, src, native_overwrite_dst);
6464
}
65-
public void AddGlyph(ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x)
65+
public void BuildLookupTable()
6666
{
67-
ImGuiNative.ImFont_AddGlyph(NativePtr, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x);
67+
ImGuiNative.ImFont_BuildLookupTable(NativePtr);
6868
}
69-
public ImFontGlyphPtr FindGlyphNoFallback(ushort c)
69+
public void ClearOutputData()
7070
{
71-
ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyphNoFallback(NativePtr, c);
71+
ImGuiNative.ImFont_ClearOutputData(NativePtr);
72+
}
73+
public ImFontGlyphPtr FindGlyph(ushort c)
74+
{
75+
ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph(NativePtr, c);
7276
return new ImFontGlyphPtr(ret);
7377
}
74-
public bool IsLoaded()
78+
public ImFontGlyphPtr FindGlyphNoFallback(ushort c)
7579
{
76-
byte ret = ImGuiNative.ImFont_IsLoaded(NativePtr);
77-
return ret != 0;
80+
ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyphNoFallback(NativePtr, c);
81+
return new ImFontGlyphPtr(ret);
7882
}
7983
public float GetCharAdvance(ushort c)
8084
{
8185
float ret = ImGuiNative.ImFont_GetCharAdvance(NativePtr, c);
8286
return ret;
8387
}
84-
public void SetFallbackChar(ushort c)
85-
{
86-
ImGuiNative.ImFont_SetFallbackChar(NativePtr, c);
87-
}
88-
public void RenderChar(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, ushort c)
88+
public string GetDebugName()
8989
{
90-
ImDrawList* native_draw_list = draw_list.NativePtr;
91-
ImGuiNative.ImFont_RenderChar(NativePtr, native_draw_list, size, pos, col, c);
90+
byte* ret = ImGuiNative.ImFont_GetDebugName(NativePtr);
91+
return Util.StringFromPtr(ret);
9292
}
93-
public ImFontGlyphPtr FindGlyph(ushort c)
93+
public void GrowIndex(int new_size)
9494
{
95-
ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph(NativePtr, c);
96-
return new ImFontGlyphPtr(ret);
95+
ImGuiNative.ImFont_GrowIndex(NativePtr, new_size);
9796
}
98-
public string GetDebugName()
97+
public bool IsLoaded()
9998
{
100-
byte* ret = ImGuiNative.ImFont_GetDebugName(NativePtr);
101-
return Util.StringFromPtr(ret);
99+
byte ret = ImGuiNative.ImFont_IsLoaded(NativePtr);
100+
return ret != 0;
102101
}
103-
public void BuildLookupTable()
102+
public void RenderChar(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, ushort c)
104103
{
105-
ImGuiNative.ImFont_BuildLookupTable(NativePtr);
104+
ImDrawList* native_draw_list = draw_list.NativePtr;
105+
ImGuiNative.ImFont_RenderChar(NativePtr, native_draw_list, size, pos, col, c);
106106
}
107-
public void ClearOutputData()
107+
public void SetFallbackChar(ushort c)
108108
{
109-
ImGuiNative.ImFont_ClearOutputData(NativePtr);
109+
ImGuiNative.ImFont_SetFallbackChar(NativePtr, c);
110110
}
111111
}
112112
}

0 commit comments

Comments
 (0)