diff --git a/crates/servicepoint_binding_cs/ServicePoint/BindGen/ServicePoint.g.cs b/crates/servicepoint_binding_cs/ServicePoint/BindGen/ServicePoint.g.cs index 6a743b0..6545319 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/BindGen/ServicePoint.g.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/BindGen/ServicePoint.g.cs @@ -40,7 +40,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_bit_vec_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_bit_vec_new", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CBitVec* sp_bit_vec_new(nuint size); + public static extern BitVec* sp_bit_vec_new(nuint size); /// /// Interpret the data as a series of bits and load then into a new `BitVec` instance. @@ -55,7 +55,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_bit_vec_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_bit_vec_load", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CBitVec* sp_bit_vec_load(byte* data, nuint data_length); + public static extern BitVec* sp_bit_vec_load(byte* data, nuint data_length); /// /// Clones a `BitVec`. @@ -70,7 +70,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_bit_vec_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_bit_vec_clone", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CBitVec* sp_bit_vec_clone(CBitVec* @this); + public static extern BitVec* sp_bit_vec_clone(BitVec* @this); /// /// Deallocates a `BitVec`. @@ -84,7 +84,7 @@ namespace ServicePoint.BindGen /// - `this` was not passed to another consuming function, e.g. to create a `Command` /// [DllImport(__DllName, EntryPoint = "sp_bit_vec_dealloc", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void sp_bit_vec_dealloc(CBitVec* @this); + public static extern void sp_bit_vec_dealloc(BitVec* @this); /// /// Gets the value of a bit from the `BitVec`. @@ -109,7 +109,7 @@ namespace ServicePoint.BindGen /// [DllImport(__DllName, EntryPoint = "sp_bit_vec_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] - public static extern bool sp_bit_vec_get(CBitVec* @this, nuint index); + public static extern bool sp_bit_vec_get(BitVec* @this, nuint index); /// /// Sets the value of a bit in the `BitVec`. @@ -134,7 +134,7 @@ namespace ServicePoint.BindGen /// - `this` is not written to or read from concurrently /// [DllImport(__DllName, EntryPoint = "sp_bit_vec_set", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void sp_bit_vec_set(CBitVec* @this, nuint index, [MarshalAs(UnmanagedType.U1)] bool value); + public static extern void sp_bit_vec_set(BitVec* @this, nuint index, [MarshalAs(UnmanagedType.U1)] bool value); /// /// Sets the value of all bits in the `BitVec`. @@ -151,7 +151,7 @@ namespace ServicePoint.BindGen /// - `this` is not written to or read from concurrently /// [DllImport(__DllName, EntryPoint = "sp_bit_vec_fill", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void sp_bit_vec_fill(CBitVec* @this, [MarshalAs(UnmanagedType.U1)] bool value); + public static extern void sp_bit_vec_fill(BitVec* @this, [MarshalAs(UnmanagedType.U1)] bool value); /// /// Gets the length of the `BitVec` in bits. @@ -163,7 +163,7 @@ namespace ServicePoint.BindGen /// - `this` points to a valid `BitVec` /// [DllImport(__DllName, EntryPoint = "sp_bit_vec_len", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern nuint sp_bit_vec_len(CBitVec* @this); + public static extern nuint sp_bit_vec_len(BitVec* @this); /// /// Returns true if length is 0. @@ -176,7 +176,7 @@ namespace ServicePoint.BindGen /// [DllImport(__DllName, EntryPoint = "sp_bit_vec_is_empty", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: MarshalAs(UnmanagedType.U1)] - public static extern bool sp_bit_vec_is_empty(CBitVec* @this); + public static extern bool sp_bit_vec_is_empty(BitVec* @this); /// /// Gets an unsafe reference to the data of the `BitVec` instance. @@ -190,7 +190,7 @@ namespace ServicePoint.BindGen /// - the returned memory range is never accessed concurrently, either via the `BitVec` or directly /// [DllImport(__DllName, EntryPoint = "sp_bit_vec_unsafe_data_ref", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CByteSlice sp_bit_vec_unsafe_data_ref(CBitVec* @this); + public static extern ByteSlice sp_bit_vec_unsafe_data_ref(BitVec* @this); /// /// Creates a new `BrightnessGrid` with the specified dimensions. @@ -205,7 +205,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_brightness_grid_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_brightness_grid_new", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CBrightnessGrid* sp_brightness_grid_new(nuint width, nuint height); + public static extern BrightnessGrid* sp_brightness_grid_new(nuint width, nuint height); /// /// Loads a `BrightnessGrid` with the specified dimensions from the provided data. @@ -224,7 +224,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_brightness_grid_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_brightness_grid_load", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CBrightnessGrid* sp_brightness_grid_load(nuint width, nuint height, byte* data, nuint data_length); + public static extern BrightnessGrid* sp_brightness_grid_load(nuint width, nuint height, byte* data, nuint data_length); /// /// Clones a `BrightnessGrid`. @@ -239,7 +239,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_brightness_grid_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_brightness_grid_clone", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CBrightnessGrid* sp_brightness_grid_clone(CBrightnessGrid* @this); + public static extern BrightnessGrid* sp_brightness_grid_clone(BrightnessGrid* @this); /// /// Deallocates a `BrightnessGrid`. @@ -253,7 +253,7 @@ namespace ServicePoint.BindGen /// - `this` was not passed to another consuming function, e.g. to create a `Command` /// [DllImport(__DllName, EntryPoint = "sp_brightness_grid_dealloc", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void sp_brightness_grid_dealloc(CBrightnessGrid* @this); + public static extern void sp_brightness_grid_dealloc(BrightnessGrid* @this); /// /// Gets the current value at the specified position. @@ -275,7 +275,7 @@ namespace ServicePoint.BindGen /// - `this` is not written to concurrently /// [DllImport(__DllName, EntryPoint = "sp_brightness_grid_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern byte sp_brightness_grid_get(CBrightnessGrid* @this, nuint x, nuint y); + public static extern byte sp_brightness_grid_get(BrightnessGrid* @this, nuint x, nuint y); /// /// Sets the value of the specified position in the `BrightnessGrid`. @@ -301,7 +301,7 @@ namespace ServicePoint.BindGen /// - `this` is not written to or read from concurrently /// [DllImport(__DllName, EntryPoint = "sp_brightness_grid_set", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void sp_brightness_grid_set(CBrightnessGrid* @this, nuint x, nuint y, byte value); + public static extern void sp_brightness_grid_set(BrightnessGrid* @this, nuint x, nuint y, byte value); /// /// Sets the value of all cells in the `BrightnessGrid`. @@ -323,7 +323,7 @@ namespace ServicePoint.BindGen /// - `this` is not written to or read from concurrently /// [DllImport(__DllName, EntryPoint = "sp_brightness_grid_fill", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void sp_brightness_grid_fill(CBrightnessGrid* @this, byte value); + public static extern void sp_brightness_grid_fill(BrightnessGrid* @this, byte value); /// /// Gets the width of the `BrightnessGrid` instance. @@ -339,7 +339,7 @@ namespace ServicePoint.BindGen /// - `this` points to a valid `BrightnessGrid` /// [DllImport(__DllName, EntryPoint = "sp_brightness_grid_width", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern nuint sp_brightness_grid_width(CBrightnessGrid* @this); + public static extern nuint sp_brightness_grid_width(BrightnessGrid* @this); /// /// Gets the height of the `BrightnessGrid` instance. @@ -355,7 +355,7 @@ namespace ServicePoint.BindGen /// - `this` points to a valid `BrightnessGrid` /// [DllImport(__DllName, EntryPoint = "sp_brightness_grid_height", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern nuint sp_brightness_grid_height(CBrightnessGrid* @this); + public static extern nuint sp_brightness_grid_height(BrightnessGrid* @this); /// /// Gets an unsafe reference to the data of the `BrightnessGrid` instance. @@ -369,7 +369,7 @@ namespace ServicePoint.BindGen /// - the returned memory range is never accessed concurrently, either via the `BrightnessGrid` or directly /// [DllImport(__DllName, EntryPoint = "sp_brightness_grid_unsafe_data_ref", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CByteSlice sp_brightness_grid_unsafe_data_ref(CBrightnessGrid* @this); + public static extern ByteSlice sp_brightness_grid_unsafe_data_ref(BrightnessGrid* @this); /// /// Creates a new `Cp437Grid` with the specified dimensions. @@ -384,7 +384,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_cp437_grid_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_cp437_grid_new", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCp437Grid* sp_cp437_grid_new(nuint width, nuint height); + public static extern Cp437Grid* sp_cp437_grid_new(nuint width, nuint height); /// /// Loads a `Cp437Grid` with the specified dimensions from the provided data. @@ -403,7 +403,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_cp437_grid_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_cp437_grid_load", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCp437Grid* sp_cp437_grid_load(nuint width, nuint height, byte* data, nuint data_length); + public static extern Cp437Grid* sp_cp437_grid_load(nuint width, nuint height, byte* data, nuint data_length); /// /// Clones a `Cp437Grid`. @@ -418,7 +418,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_cp437_grid_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_cp437_grid_clone", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCp437Grid* sp_cp437_grid_clone(CCp437Grid* @this); + public static extern Cp437Grid* sp_cp437_grid_clone(Cp437Grid* @this); /// /// Deallocates a `Cp437Grid`. @@ -432,7 +432,7 @@ namespace ServicePoint.BindGen /// - `this` was not passed to another consuming function, e.g. to create a `Command` /// [DllImport(__DllName, EntryPoint = "sp_cp437_grid_dealloc", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void sp_cp437_grid_dealloc(CCp437Grid* @this); + public static extern void sp_cp437_grid_dealloc(Cp437Grid* @this); /// /// Gets the current value at the specified position. @@ -454,7 +454,7 @@ namespace ServicePoint.BindGen /// - `this` is not written to concurrently /// [DllImport(__DllName, EntryPoint = "sp_cp437_grid_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern byte sp_cp437_grid_get(CCp437Grid* @this, nuint x, nuint y); + public static extern byte sp_cp437_grid_get(Cp437Grid* @this, nuint x, nuint y); /// /// Sets the value of the specified position in the `Cp437Grid`. @@ -479,7 +479,7 @@ namespace ServicePoint.BindGen /// - `this` is not written to or read from concurrently /// [DllImport(__DllName, EntryPoint = "sp_cp437_grid_set", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void sp_cp437_grid_set(CCp437Grid* @this, nuint x, nuint y, byte value); + public static extern void sp_cp437_grid_set(Cp437Grid* @this, nuint x, nuint y, byte value); /// /// Sets the value of all cells in the `Cp437Grid`. @@ -497,7 +497,7 @@ namespace ServicePoint.BindGen /// - `this` is not written to or read from concurrently /// [DllImport(__DllName, EntryPoint = "sp_cp437_grid_fill", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void sp_cp437_grid_fill(CCp437Grid* @this, byte value); + public static extern void sp_cp437_grid_fill(Cp437Grid* @this, byte value); /// /// Gets the width of the `Cp437Grid` instance. @@ -513,7 +513,7 @@ namespace ServicePoint.BindGen /// - `this` points to a valid `Cp437Grid` /// [DllImport(__DllName, EntryPoint = "sp_cp437_grid_width", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern nuint sp_cp437_grid_width(CCp437Grid* @this); + public static extern nuint sp_cp437_grid_width(Cp437Grid* @this); /// /// Gets the height of the `Cp437Grid` instance. @@ -529,7 +529,7 @@ namespace ServicePoint.BindGen /// - `this` points to a valid `Cp437Grid` /// [DllImport(__DllName, EntryPoint = "sp_cp437_grid_height", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern nuint sp_cp437_grid_height(CCp437Grid* @this); + public static extern nuint sp_cp437_grid_height(Cp437Grid* @this); /// /// Gets an unsafe reference to the data of the `Cp437Grid` instance. @@ -543,7 +543,7 @@ namespace ServicePoint.BindGen /// - the returned memory range is never accessed concurrently, either via the `Cp437Grid` or directly /// [DllImport(__DllName, EntryPoint = "sp_cp437_grid_unsafe_data_ref", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CByteSlice sp_cp437_grid_unsafe_data_ref(CCp437Grid* @this); + public static extern ByteSlice sp_cp437_grid_unsafe_data_ref(Cp437Grid* @this); /// /// Tries to turn a `Packet` into a `Command`. The packet is deallocated in the process. @@ -561,7 +561,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_try_from_packet", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_try_from_packet(Packet* packet); + public static extern Command* sp_command_try_from_packet(Packet* packet); /// /// Clones a `Command` instance. @@ -576,7 +576,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_clone", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_clone(CCommand* original); + public static extern Command* sp_command_clone(Command* original); /// /// Allocates a new `Command::Clear` instance. @@ -589,7 +589,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_clear", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_clear(); + public static extern Command* sp_command_clear(); /// /// Allocates a new `Command::HardReset` instance. @@ -602,7 +602,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_hard_reset", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_hard_reset(); + public static extern Command* sp_command_hard_reset(); /// /// Allocates a new `Command::FadeOut` instance. @@ -615,7 +615,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_fade_out", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_fade_out(); + public static extern Command* sp_command_fade_out(); /// /// Allocates a new `Command::Brightness` instance for setting the brightness of all tiles to the @@ -633,7 +633,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_brightness", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_brightness(byte brightness); + public static extern Command* sp_command_brightness(byte brightness); /// /// Allocates a new `Command::CharBrightness` instance. @@ -649,7 +649,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_char_brightness", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_char_brightness(nuint x, nuint y, CBrightnessGrid* byte_grid); + public static extern Command* sp_command_char_brightness(nuint x, nuint y, BrightnessGrid* byte_grid); /// /// Allocates a new `Command::BitmapLinear` instance. @@ -666,7 +666,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_bitmap_linear", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_bitmap_linear(nuint offset, CBitVec* bit_vec, CompressionCode compression); + public static extern Command* sp_command_bitmap_linear(nuint offset, BitVec* bit_vec, CompressionCode compression); /// /// Allocates a new `Command::BitmapLinearAnd` instance. @@ -683,7 +683,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_bitmap_linear_and", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_bitmap_linear_and(nuint offset, CBitVec* bit_vec, CompressionCode compression); + public static extern Command* sp_command_bitmap_linear_and(nuint offset, BitVec* bit_vec, CompressionCode compression); /// /// Allocates a new `Command::BitmapLinearOr` instance. @@ -700,7 +700,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_bitmap_linear_or", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_bitmap_linear_or(nuint offset, CBitVec* bit_vec, CompressionCode compression); + public static extern Command* sp_command_bitmap_linear_or(nuint offset, BitVec* bit_vec, CompressionCode compression); /// /// Allocates a new `Command::BitmapLinearXor` instance. @@ -717,7 +717,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_bitmap_linear_xor", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_bitmap_linear_xor(nuint offset, CBitVec* bit_vec, CompressionCode compression); + public static extern Command* sp_command_bitmap_linear_xor(nuint offset, BitVec* bit_vec, CompressionCode compression); /// /// Allocates a new `Command::Cp437Data` instance. @@ -733,7 +733,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_cp437_data", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_cp437_data(nuint x, nuint y, CCp437Grid* byte_grid); + public static extern Command* sp_command_cp437_data(nuint x, nuint y, Cp437Grid* byte_grid); /// /// Allocates a new `Command::BitmapLinearWin` instance. @@ -750,7 +750,7 @@ namespace ServicePoint.BindGen /// by explicitly calling `sp_command_dealloc`. /// [DllImport(__DllName, EntryPoint = "sp_command_bitmap_linear_win", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CCommand* sp_command_bitmap_linear_win(nuint x, nuint y, PixelGrid* pixel_grid, CompressionCode compression_code); + public static extern Command* sp_command_bitmap_linear_win(nuint x, nuint y, PixelGrid* pixel_grid, CompressionCode compression_code); /// /// Deallocates a `Command`. @@ -764,7 +764,7 @@ namespace ServicePoint.BindGen /// - `this` was not passed to another consuming function, e.g. to create a `Packet` /// [DllImport(__DllName, EntryPoint = "sp_command_dealloc", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void sp_command_dealloc(CCommand* ptr); + public static extern void sp_command_dealloc(Command* ptr); /// /// Creates a new instance of `Connection`. @@ -1005,7 +1005,7 @@ namespace ServicePoint.BindGen /// - the returned memory range is never accessed concurrently, either via the `PixelGrid` or directly /// [DllImport(__DllName, EntryPoint = "sp_pixel_grid_unsafe_data_ref", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern CByteSlice sp_pixel_grid_unsafe_data_ref(PixelGrid* @this); + public static extern ByteSlice sp_pixel_grid_unsafe_data_ref(PixelGrid* @this); /// /// Turns a `Command` into a `Packet`. @@ -1057,27 +1057,27 @@ namespace ServicePoint.BindGen } [StructLayout(LayoutKind.Sequential)] - public unsafe partial struct CBitVec + public unsafe partial struct BitVec { } [StructLayout(LayoutKind.Sequential)] - public unsafe partial struct CBrightnessGrid + public unsafe partial struct BrightnessGrid { } [StructLayout(LayoutKind.Sequential)] - public unsafe partial struct CCp437Grid + public unsafe partial struct Cp437Grid { } [StructLayout(LayoutKind.Sequential)] - public unsafe partial struct CCommand + public unsafe partial struct Command { } [StructLayout(LayoutKind.Sequential)] - public unsafe partial struct CByteSlice + public unsafe partial struct ByteSlice { public byte* start; public nuint length; diff --git a/crates/servicepoint_binding_cs/ServicePoint/BitVec.cs b/crates/servicepoint_binding_cs/ServicePoint/BitVec.cs index 53ee65c..13b2200 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/BitVec.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/BitVec.cs @@ -2,7 +2,7 @@ using ServicePoint.BindGen; namespace ServicePoint; -public sealed class BitVec : SpNativeInstance +public sealed class BitVec : SpNativeInstance { public static BitVec New(int size) { @@ -80,7 +80,7 @@ public sealed class BitVec : SpNativeInstance } } - private unsafe BitVec(BindGen.CBitVec* instance) : base(instance) + private unsafe BitVec(BindGen.BitVec* instance) : base(instance) { } diff --git a/crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.cs b/crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.cs index 36af6e0..b80f64f 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.cs @@ -2,7 +2,7 @@ using ServicePoint.BindGen; namespace ServicePoint; -public sealed class BrightnessGrid : SpNativeInstance +public sealed class BrightnessGrid : SpNativeInstance { public static BrightnessGrid New(int width, int height) { @@ -92,7 +92,7 @@ public sealed class BrightnessGrid : SpNativeInstance } } - private unsafe BrightnessGrid(BindGen.CBrightnessGrid* instance) : base(instance) + private unsafe BrightnessGrid(BindGen.BrightnessGrid* instance) : base(instance) { } diff --git a/crates/servicepoint_binding_cs/ServicePoint/Command.cs b/crates/servicepoint_binding_cs/ServicePoint/Command.cs index e9512a3..a0349c8 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/Command.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/Command.cs @@ -3,7 +3,7 @@ using ServicePoint.BindGen; namespace ServicePoint; -public sealed class Command : SpNativeInstance +public sealed class Command : SpNativeInstance { public static bool TryFromPacket(Packet packet, [MaybeNullWhen(false)] out Command command) { @@ -121,7 +121,7 @@ public sealed class Command : SpNativeInstance } } - private unsafe Command(BindGen.CCommand* instance) : base(instance) + private unsafe Command(BindGen.Command* instance) : base(instance) { } diff --git a/crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.cs b/crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.cs index 01a83fb..e795c85 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.cs @@ -3,7 +3,7 @@ using ServicePoint.BindGen; namespace ServicePoint; -public sealed class Cp437Grid : SpNativeInstance +public sealed class Cp437Grid : SpNativeInstance { public static Cp437Grid New(int width, int height) { @@ -123,7 +123,7 @@ public sealed class Cp437Grid : SpNativeInstance } } - private unsafe Cp437Grid(BindGen.CCp437Grid* instance) : base(instance) + private unsafe Cp437Grid(BindGen.Cp437Grid* instance) : base(instance) { } diff --git a/crates/servicepoint_binding_cs/build.rs b/crates/servicepoint_binding_cs/build.rs index ec2744e..648324d 100644 --- a/crates/servicepoint_binding_cs/build.rs +++ b/crates/servicepoint_binding_cs/build.rs @@ -24,6 +24,16 @@ fn main() { .csharp_use_nint_types(true) .csharp_class_accessibility("public") .csharp_generate_const_filter(|_| true) + .csharp_type_rename(move |name| { + if name.len() > 1 + && name.starts_with("C") + && name.chars().nth(1).unwrap().is_uppercase() + { + name[1..].to_string() + } else { + name + } + }) .generate_csharp_file("ServicePoint/BindGen/ServicePoint.g.cs") .unwrap(); }