Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d4ee8c4
Start of generator fixes and polish branch
Exanite Jun 7, 2026
88f6065
Merge branch 'feature/generator-docs' into feature/generator-fixes-an…
Exanite Jun 8, 2026
4e39057
Add stubs for ExtractEnumConstants and ExtractFunctionPointers
Exanite Jun 8, 2026
a4f0a98
Fix invalid interface implementation
Exanite Jun 8, 2026
2a622cb
Work on splitting ExtractNestedTyping into 3 separate mods
Exanite Jun 8, 2026
298c3b0
Continue to move code to their new locations
Exanite Jun 8, 2026
e9b67f9
Further cleanup
Exanite Jun 8, 2026
d569b7a
Rename ExtractNestedTyping to ExtractNestedTypes
Exanite Jun 8, 2026
88b225e
Split ExtractNestedTypes tests into 3 sets of tests and ensure projec…
Exanite Jun 8, 2026
afa8792
Get ExtractNestedTypes working
Exanite Jun 8, 2026
a969aeb
Update test snapshot names
Exanite Jun 8, 2026
9f120c6
Get ExtractFunctionPointers working
Exanite Jun 8, 2026
bd48a68
Fix subtly incorrect behavior and remove dependency on Mod for Extrac…
Exanite Jun 8, 2026
de0a8ca
Move GetNativeTypeNameForPredefinedType to ExtractEnumConstants and c…
Exanite Jun 8, 2026
cd3a9f8
Fix incorrect file name
Exanite Jun 8, 2026
06056fc
Prefer IMod over Mod where possible
Exanite Jun 8, 2026
33437dc
Document where ExtractFunctionPointers and ExtractNestedTypes output …
Exanite Jun 8, 2026
725edda
Get ExtractEnumConstants working
Exanite Jun 9, 2026
95d88c8
Update config
Exanite Jun 9, 2026
425f575
Add remark comment on ExtractNestedTypes only handling ClangScraper's…
Exanite Jun 9, 2026
18f2e21
Generate on Windows (apparently accidentally fixed a namespace bug)
Exanite Jun 9, 2026
626fb61
Remove unused code
Exanite Jun 9, 2026
6b9108d
Cleanup GetNativeTypeNameForPredefinedType
Exanite Jun 9, 2026
02ce5e3
Use constructor and avoid nullable properties
Exanite Jun 9, 2026
0531153
Refactor code to use record structs
Exanite Jun 9, 2026
1f62ae0
Work on deciphering tuple usages
Exanite Jun 9, 2026
8b73fee
Figure out what _numericTypeNames does
Exanite Jun 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions generator.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
"ClangScraper",
"MarkNativeNames",
"ExtractHandles",
"ExtractNestedTyping",
"ExtractNestedTypes",
"ExtractEnumConstants",
"ExtractFunctionPointers",
"TransformHandles",
"TransformFunctions",
"TransformProperties",
Expand Down Expand Up @@ -254,7 +256,9 @@
"AddApiProfiles",
"MixKhronosData",
"ExtractHandles",
"ExtractNestedTyping",
"ExtractNestedTypes",
"ExtractEnumConstants",
"ExtractFunctionPointers",
"TransformHandles",
"InterceptNativeFunctions",
"TransformFunctions",
Expand Down Expand Up @@ -397,7 +401,9 @@
"ClangScraper",
"MarkNativeNames",
"ExtractHandles",
"ExtractNestedTyping",
"ExtractNestedTypes",
"ExtractEnumConstants",
"ExtractFunctionPointers",
"TransformHandles",
"MixKhronosData",
"AddApiProfiles",
Expand Down
2 changes: 2 additions & 0 deletions sources/SDL/SDL/SDL3/VirtualJoystickDescCleanup.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_Cleanup")]
public readonly unsafe struct VirtualJoystickDescCleanup : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_Cleanup")]
public unsafe delegate void VirtualJoystickDescCleanupDelegate(void* arg0);
2 changes: 2 additions & 0 deletions sources/SDL/SDL/SDL3/VirtualJoystickDescRumble.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_Rumble")]
public readonly unsafe struct VirtualJoystickDescRumble : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_Rumble")]
public unsafe delegate byte VirtualJoystickDescRumbleDelegate(void* arg0, ushort arg1, ushort arg2);
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_RumbleTriggers")]
public readonly unsafe struct VirtualJoystickDescRumbleTriggers : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_RumbleTriggers")]
public unsafe delegate byte VirtualJoystickDescRumbleTriggersDelegate(
void* arg0,
Expand Down
2 changes: 2 additions & 0 deletions sources/SDL/SDL/SDL3/VirtualJoystickDescSendEffect.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_SendEffect")]
public readonly unsafe struct VirtualJoystickDescSendEffect : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_SendEffect")]
public unsafe delegate byte VirtualJoystickDescSendEffectDelegate(void* arg0, void* arg1, int arg2);
2 changes: 2 additions & 0 deletions sources/SDL/SDL/SDL3/VirtualJoystickDescSetLed.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_SetLED")]
public readonly unsafe struct VirtualJoystickDescSetLed : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_SetLED")]
public unsafe delegate byte VirtualJoystickDescSetLedDelegate(
void* arg0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_SetPlayerIndex")]
public readonly unsafe struct VirtualJoystickDescSetPlayerIndex : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_SetPlayerIndex")]
public unsafe delegate void VirtualJoystickDescSetPlayerIndexDelegate(void* arg0, int arg1);
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_SetSensorsEnabled")]
public readonly unsafe struct VirtualJoystickDescSetSensorsEnabled : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_SetSensorsEnabled")]
public unsafe delegate byte VirtualJoystickDescSetSensorsEnabledDelegate(void* arg0, byte arg1);
2 changes: 2 additions & 0 deletions sources/SDL/SDL/SDL3/VirtualJoystickDescUpdate.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_Update")]
public readonly unsafe struct VirtualJoystickDescUpdate : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace Silk.NET.SDL;

[NativeName("SDL_VirtualJoystickDesc_Update")]
public unsafe delegate void VirtualJoystickDescUpdateDelegate(void* arg0);
5 changes: 2 additions & 3 deletions sources/SilkTouch/SilkTouch/Mods/AddApiProfiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AddApiProfiles(
IEnumerable<
IJobDependency<IApiMetadataProvider<IEnumerable<SupportedApiProfileAttribute>>>
> versionProviders
) : Mod
) : IMod
{
/// <summary>
/// The mod configuration.
Expand Down Expand Up @@ -209,9 +209,8 @@ out var parentSymbolBefore
}

/// <inheritdoc />
public override async Task ExecuteAsync(IModContext ctx, CancellationToken ct = default)
public async Task ExecuteAsync(IModContext ctx, CancellationToken ct = default)
{
await base.ExecuteAsync(ctx, ct);
if (ctx.SourceProject is null)
{
return;
Expand Down
3 changes: 2 additions & 1 deletion sources/SilkTouch/SilkTouch/Mods/Common/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public string PathForFullyQualified(string fullyQualified, string extension = ".
}

/// <inheritdoc />
public virtual void InitializeAsync(IModContext ctx, CancellationToken ct = default) { }
public virtual Task InitializeAsync(IModContext ctx, CancellationToken ct = default) =>
Task.CompletedTask;

/// <inheritdoc />
public virtual async Task ExecuteAsync(IModContext ctx, CancellationToken ct = default)
Expand Down
4 changes: 3 additions & 1 deletion sources/SilkTouch/SilkTouch/Mods/Common/ModLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ public class ModLoader
nameof(ChangeNamespace) => typeof(ChangeNamespace),
nameof(ChangeNativeClass) => typeof(ChangeNativeClass),
nameof(ClangScraper) => typeof(ClangScraper),
nameof(ExtractEnumConstants) => typeof(ExtractEnumConstants),
nameof(ExtractFunctionPointers) => typeof(ExtractFunctionPointers),
nameof(ExtractHandles) => typeof(ExtractHandles),
nameof(ExtractNestedTyping) => typeof(ExtractNestedTyping),
nameof(ExtractNestedTypes) => typeof(ExtractNestedTypes),
nameof(IdentifySharedPrefixes) => typeof(IdentifySharedPrefixes),
nameof(InterceptNativeFunctions) => typeof(InterceptNativeFunctions),
nameof(MarkNativeNames) => typeof(MarkNativeNames),
Expand Down
Loading
Loading