Added basics for automatic C# -> C++ Bindings

This commit is contained in:
antopilo
2025-04-04 00:17:07 -04:00
parent 2908429b68
commit 00367c37c9
10 changed files with 95 additions and 43 deletions

View File

@@ -1,20 +1,13 @@
using System;
namespace Nuake
namespace Nuake.Net
{
public static class AudioModule
public class AudioModule
{
public static void SetVolume(float volume)
{
unsafe
{
Internals.AudioModuleSetVolumeICall(volume);
}
}
public static void SetMuted(bool muted)
{
unsafe
{
Internals.AudioModuleSetMutedICall(muted);
Internals.SetVolumeICall(volume);
}
}
}

View File

@@ -1,21 +1,5 @@
using System;
namespace Nuake
namespace Nuake.Net
{
public static class ExampleModule
{
public static void ExampleFunction()
{
unsafe
{
Internals.ExampleModuleExampleFunctionICall();
}
}
public static void ExampleModuleLog(string hi)
{
unsafe
{
Internals.ExampleModuleExampleModuleLogICall(hi);
}
}
}
}

View File

@@ -1,12 +1,11 @@
using Coral.Managed.Interop;
public class Internals
namespace Nuake.Net
{
// AudioModule
public static unsafe delegate*<float,void> AudioModuleSetVolumeICall;
public static unsafe delegate*<bool,void> AudioModuleSetMutedICall;
// ExampleModule
public static unsafe delegate*<void> ExampleModuleExampleFunctionICall;
public static unsafe delegate*<NativeString,void> ExampleModuleExampleModuleLogICall;
public class Internals
{
// AudioModule
public static unsafe delegate*<float, void> SetVolumeICall;
}
}