make BitVec type alias pub, uniffi bitvec
original c# example equivalent works add uniffi bitvec original c# example now works with a few tweaks via uniffi
This commit is contained in:
parent
f9c8d20654
commit
960f12ebc5
8 changed files with 482 additions and 26 deletions
|
@ -1,5 +1,19 @@
|
|||
using ServicePoint;
|
||||
using System.Threading;
|
||||
using ServicePoint;
|
||||
|
||||
var connection = new Connection("127.0.0.1:2342");
|
||||
var clear = Command.Clear();
|
||||
connection.Send(clear);
|
||||
connection.Send(Command.Clear());
|
||||
|
||||
connection.Send(Command.Brightness(5));
|
||||
|
||||
var pixels = Bitmap.NewMaxSized();
|
||||
for (ulong offset = 0; offset < ulong.MaxValue; offset++)
|
||||
{
|
||||
pixels.Fill(false);
|
||||
|
||||
for (ulong y = 0; y < pixels.Height(); y++)
|
||||
pixels.Set((y + offset) % pixels.Width(), y, true);
|
||||
|
||||
connection.Send(Command.BitmapLinearWin(0, 0, pixels));
|
||||
Thread.Sleep(14);
|
||||
}
|
||||
|
|
|
@ -428,11 +428,44 @@ static class _UniFFILib {
|
|||
|
||||
}
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_bitvec(
|
||||
IntPtr ptr,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern BitVecSafeHandle uniffi_servicepoint_binding_uniffi_fn_constructor_bitvec_load(RustBuffer @data,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern BitVecSafeHandle uniffi_servicepoint_binding_uniffi_fn_constructor_bitvec_new(ulong @size,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern void uniffi_servicepoint_binding_uniffi_fn_method_bitvec_fill(BitVecSafeHandle @ptr,sbyte @value,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern sbyte uniffi_servicepoint_binding_uniffi_fn_method_bitvec_get(BitVecSafeHandle @ptr,ulong @index,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ulong uniffi_servicepoint_binding_uniffi_fn_method_bitvec_len(BitVecSafeHandle @ptr,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern void uniffi_servicepoint_binding_uniffi_fn_method_bitvec_set(BitVecSafeHandle @ptr,ulong @index,sbyte @value,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern void uniffi_servicepoint_binding_uniffi_fn_free_bitmap(
|
||||
IntPtr ptr,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern BitmapSafeHandle uniffi_servicepoint_binding_uniffi_fn_constructor_bitmap_load(ulong @width,ulong @height,RustBuffer @data,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern BitmapSafeHandle uniffi_servicepoint_binding_uniffi_fn_constructor_bitmap_new(ulong @width,ulong @height,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
@ -466,10 +499,26 @@ static class _UniFFILib {
|
|||
IntPtr ptr,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern CommandSafeHandle uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear(ulong @offset,BitVecSafeHandle @bitmap,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern CommandSafeHandle uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear_and(ulong @offset,BitVecSafeHandle @bitmap,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern CommandSafeHandle uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear_or(ulong @offset,BitVecSafeHandle @bitmap,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern CommandSafeHandle uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear_win(ulong @offsetX,ulong @offsetY,BitmapSafeHandle @bitmap,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern CommandSafeHandle uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear_xor(ulong @offset,BitVecSafeHandle @bitmap,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern CommandSafeHandle uniffi_servicepoint_binding_uniffi_fn_constructor_command_brightness(byte @brightness,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
@ -731,6 +780,22 @@ static class _UniFFILib {
|
|||
public static extern void ffi_servicepoint_binding_uniffi_rust_future_complete_void(IntPtr @handle,ref RustCallStatus _uniffi_out_err
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_fill(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_get(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_len(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_set(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_fill(
|
||||
);
|
||||
|
@ -755,6 +820,18 @@ static class _UniFFILib {
|
|||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_method_connection_send(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_load(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_new(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_load(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_new(
|
||||
);
|
||||
|
@ -763,10 +840,26 @@ static class _UniFFILib {
|
|||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_new_max_sized(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_and(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_or(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_win(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_xor(
|
||||
);
|
||||
|
||||
[DllImport("servicepoint_binding_uniffi")]
|
||||
public static extern ushort uniffi_servicepoint_binding_uniffi_checksum_constructor_command_brightness(
|
||||
);
|
||||
|
@ -805,6 +898,30 @@ static class _UniFFILib {
|
|||
}
|
||||
|
||||
static void uniffiCheckApiChecksums() {
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_fill();
|
||||
if (checksum != 12255) {
|
||||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_fill` checksum `12255`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_get();
|
||||
if (checksum != 43835) {
|
||||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_get` checksum `43835`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_len();
|
||||
if (checksum != 22196) {
|
||||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_len` checksum `22196`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_set();
|
||||
if (checksum != 16307) {
|
||||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_bitvec_set` checksum `16307`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_method_bitmap_fill();
|
||||
if (checksum != 43887) {
|
||||
|
@ -841,6 +958,24 @@ static class _UniFFILib {
|
|||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_method_connection_send` checksum `23796`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_load();
|
||||
if (checksum != 48913) {
|
||||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_load` checksum `48913`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_new();
|
||||
if (checksum != 11865) {
|
||||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitvec_new` checksum `11865`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_load();
|
||||
if (checksum != 24109) {
|
||||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_load` checksum `24109`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_new();
|
||||
if (checksum != 49832) {
|
||||
|
@ -853,12 +988,36 @@ static class _UniFFILib {
|
|||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_bitmap_new_max_sized` checksum `63762`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear();
|
||||
if (checksum != 14881) {
|
||||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear` checksum `14881`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_and();
|
||||
if (checksum != 7352) {
|
||||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_and` checksum `7352`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_or();
|
||||
if (checksum != 7046) {
|
||||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_or` checksum `7046`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_win();
|
||||
if (checksum != 51700) {
|
||||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_win` checksum `51700`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_xor();
|
||||
if (checksum != 54209) {
|
||||
throw new UniffiContractChecksumException($"ServicePoint: uniffi bindings expected function `uniffi_servicepoint_binding_uniffi_checksum_constructor_command_bitmap_linear_xor` checksum `54209`, library returned `{checksum}`");
|
||||
}
|
||||
}
|
||||
{
|
||||
var checksum = _UniFFILib.uniffi_servicepoint_binding_uniffi_checksum_constructor_command_brightness();
|
||||
if (checksum != 11291) {
|
||||
|
@ -1031,6 +1190,27 @@ class FfiConverterString: FfiConverter<string, RustBuffer> {
|
|||
|
||||
|
||||
|
||||
class FfiConverterByteArray: FfiConverterRustBuffer<byte[]> {
|
||||
public static FfiConverterByteArray INSTANCE = new FfiConverterByteArray();
|
||||
|
||||
public override byte[] Read(BigEndianStream stream) {
|
||||
var length = stream.ReadInt();
|
||||
return stream.ReadBytes(length);
|
||||
}
|
||||
|
||||
public override int AllocationSize(byte[] value) {
|
||||
return 4 + value.Length;
|
||||
}
|
||||
|
||||
public override void Write(byte[] value, BigEndianStream stream) {
|
||||
stream.WriteInt(value.Length);
|
||||
stream.WriteBytes(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// `SafeHandle` implements the semantics outlined below, i.e. its thread safe, and the dispose
|
||||
// method will only be called once, once all outstanding native calls have completed.
|
||||
// https://github.com/mozilla/uniffi-rs/blob/0dc031132d9493ca812c3af6e7dd60ad2ea95bf0/uniffi_bindgen/src/bindings/kotlin/templates/ObjectRuntime.kt#L31
|
||||
|
@ -1115,6 +1295,105 @@ static class FFIObjectUtil {
|
|||
}
|
||||
}
|
||||
}
|
||||
public interface IBitVec {
|
||||
|
||||
void Fill(bool @value);
|
||||
|
||||
bool Get(ulong @index);
|
||||
|
||||
ulong Len();
|
||||
|
||||
void Set(ulong @index, bool @value);
|
||||
|
||||
}
|
||||
|
||||
public class BitVecSafeHandle: FFISafeHandle {
|
||||
public BitVecSafeHandle(): base() {
|
||||
}
|
||||
public BitVecSafeHandle(IntPtr pointer): base(pointer) {
|
||||
}
|
||||
override protected bool ReleaseHandle() {
|
||||
_UniffiHelpers.RustCall((ref RustCallStatus status) => {
|
||||
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_free_bitvec(this.handle, ref status);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public class BitVec: FFIObject<BitVecSafeHandle>, IBitVec {
|
||||
public BitVec(BitVecSafeHandle pointer): base(pointer) {}
|
||||
public BitVec(ulong @size) :
|
||||
this(
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitvec_new(FfiConverterUInt64.INSTANCE.Lower(@size), ref _status)
|
||||
)) {}
|
||||
|
||||
|
||||
public void Fill(bool @value) {
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitvec_fill(this.GetHandle(), FfiConverterBoolean.INSTANCE.Lower(@value), ref _status)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public bool Get(ulong @index) {
|
||||
return FfiConverterBoolean.INSTANCE.Lift(
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitvec_get(this.GetHandle(), FfiConverterUInt64.INSTANCE.Lower(@index), ref _status)
|
||||
));
|
||||
}
|
||||
|
||||
public ulong Len() {
|
||||
return FfiConverterUInt64.INSTANCE.Lift(
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitvec_len(this.GetHandle(), ref _status)
|
||||
));
|
||||
}
|
||||
|
||||
public void Set(ulong @index, bool @value) {
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_method_bitvec_set(this.GetHandle(), FfiConverterUInt64.INSTANCE.Lower(@index), FfiConverterBoolean.INSTANCE.Lower(@value), ref _status)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static BitVec Load(byte[] @data) {
|
||||
return new BitVec(
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitvec_load(FfiConverterByteArray.INSTANCE.Lower(@data), ref _status)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class FfiConverterTypeBitVec: FfiConverter<BitVec, BitVecSafeHandle> {
|
||||
public static FfiConverterTypeBitVec INSTANCE = new FfiConverterTypeBitVec();
|
||||
|
||||
public override BitVecSafeHandle Lower(BitVec value) {
|
||||
return value.GetHandle();
|
||||
}
|
||||
|
||||
public override BitVec Lift(BitVecSafeHandle value) {
|
||||
return new BitVec(value);
|
||||
}
|
||||
|
||||
public override BitVec Read(BigEndianStream stream) {
|
||||
return Lift(new BitVecSafeHandle(new IntPtr(stream.ReadLong())));
|
||||
}
|
||||
|
||||
public override int AllocationSize(BitVec value) {
|
||||
return 8;
|
||||
}
|
||||
|
||||
public override void Write(BitVec value, BigEndianStream stream) {
|
||||
stream.WriteLong(Lower(value).DangerousGetRawFfiValue().ToInt64());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public interface IBitmap {
|
||||
|
||||
void Fill(bool @value);
|
||||
|
@ -1187,6 +1466,13 @@ public class Bitmap: FFIObject<BitmapSafeHandle>, IBitmap {
|
|||
|
||||
|
||||
|
||||
public static Bitmap Load(ulong @width, ulong @height, byte[] @data) {
|
||||
return new Bitmap(
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_bitmap_load(FfiConverterUInt64.INSTANCE.Lower(@width), FfiConverterUInt64.INSTANCE.Lower(@height), FfiConverterByteArray.INSTANCE.Lower(@data), ref _status)
|
||||
));
|
||||
}
|
||||
|
||||
public static Bitmap NewMaxSized() {
|
||||
return new Bitmap(
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
|
@ -1245,6 +1531,27 @@ public class Command: FFIObject<CommandSafeHandle>, ICommand {
|
|||
|
||||
|
||||
|
||||
public static Command BitmapLinear(ulong @offset, BitVec @bitmap) {
|
||||
return new Command(
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear(FfiConverterUInt64.INSTANCE.Lower(@offset), FfiConverterTypeBitVec.INSTANCE.Lower(@bitmap), ref _status)
|
||||
));
|
||||
}
|
||||
|
||||
public static Command BitmapLinearAnd(ulong @offset, BitVec @bitmap) {
|
||||
return new Command(
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear_and(FfiConverterUInt64.INSTANCE.Lower(@offset), FfiConverterTypeBitVec.INSTANCE.Lower(@bitmap), ref _status)
|
||||
));
|
||||
}
|
||||
|
||||
public static Command BitmapLinearOr(ulong @offset, BitVec @bitmap) {
|
||||
return new Command(
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear_or(FfiConverterUInt64.INSTANCE.Lower(@offset), FfiConverterTypeBitVec.INSTANCE.Lower(@bitmap), ref _status)
|
||||
));
|
||||
}
|
||||
|
||||
public static Command BitmapLinearWin(ulong @offsetX, ulong @offsetY, Bitmap @bitmap) {
|
||||
return new Command(
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
|
@ -1252,6 +1559,13 @@ public class Command: FFIObject<CommandSafeHandle>, ICommand {
|
|||
));
|
||||
}
|
||||
|
||||
public static Command BitmapLinearXor(ulong @offset, BitVec @bitmap) {
|
||||
return new Command(
|
||||
_UniffiHelpers.RustCall( (ref RustCallStatus _status) =>
|
||||
_UniFFILib.uniffi_servicepoint_binding_uniffi_fn_constructor_command_bitmap_linear_xor(FfiConverterUInt64.INSTANCE.Lower(@offset), FfiConverterTypeBitVec.INSTANCE.Lower(@bitmap), ref _status)
|
||||
));
|
||||
}
|
||||
|
||||
/// <exception cref="ServicePointException"></exception>
|
||||
public static Command Brightness(byte @brightness) {
|
||||
return new Command(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue