feat: Change App Name, add rust/set_foreground_window

This commit is contained in:
2024-04-28 21:50:36 +08:00
parent e9c494096f
commit c5549cf4c8
9 changed files with 160 additions and 39 deletions

View File

@ -34,6 +34,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
@protected
String dco_decode_String(dynamic raw);
@protected
bool dco_decode_bool(dynamic raw);
@protected
int dco_decode_box_autoadd_u_64(dynamic raw);
@ -109,6 +112,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
@protected
String sse_decode_String(SseDeserializer deserializer);
@protected
bool sse_decode_bool(SseDeserializer deserializer);
@protected
int sse_decode_box_autoadd_u_64(SseDeserializer deserializer);
@ -174,9 +180,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
@protected
void sse_decode_unit(SseDeserializer deserializer);
@protected
bool sse_decode_bool(SseDeserializer deserializer);
@protected
ffi.Pointer<wire_cst_list_prim_u_8_strict> cst_encode_AnyhowException(
AnyhowException raw) {
@ -306,6 +309,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
wireObj.data = cst_encode_opt_list_prim_u_8_strict(apiObj.data);
}
@protected
bool cst_encode_bool(bool raw);
@protected
int cst_encode_i_32(int raw);
@ -345,6 +351,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
@protected
void sse_encode_String(String self, SseSerializer serializer);
@protected
void sse_encode_bool(bool self, SseSerializer serializer);
@protected
void sse_encode_box_autoadd_u_64(int self, SseSerializer serializer);
@ -412,9 +421,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
@protected
void sse_encode_unit(void self, SseSerializer serializer);
@protected
void sse_encode_bool(bool self, SseSerializer serializer);
}
// Section: wire_class
@ -582,6 +588,25 @@ class RustLibWire implements BaseWire {
ffi.Pointer<wire_cst_list_prim_u_8_strict>,
ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
void wire_set_foreground_window(
int port_,
ffi.Pointer<wire_cst_list_prim_u_8_strict> window_name,
) {
return _wire_set_foreground_window(
port_,
window_name,
);
}
late final _wire_set_foreground_windowPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(
ffi.Int64, ffi.Pointer<wire_cst_list_prim_u_8_strict>)>>(
'frbgen_starcitizen_doctor_wire_set_foreground_window');
late final _wire_set_foreground_window =
_wire_set_foreground_windowPtr.asFunction<
void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_strict>)>();
void wire_start(
int port_,
ffi.Pointer<wire_cst_list_prim_u_8_strict> executable,