mirror of
https://github.com/StarCitizenToolBox/app.git
synced 2026-01-13 19:50:28 +00:00
* Initial plan * Add Linux Nightly Build workflow configuration Co-authored-by: xkeyC <39891083+xkeyC@users.noreply.github.com> * Add explicit permissions and comments to Linux workflow Co-authored-by: xkeyC <39891083+xkeyC@users.noreply.github.com> * Add NASM dependency and verify Linux build Co-authored-by: xkeyC <39891083+xkeyC@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: xkeyC <39891083+xkeyC@users.noreply.github.com>
154 lines
4.3 KiB
Dart
154 lines
4.3 KiB
Dart
// This file is automatically generated, so please do not edit it.
|
|
// @generated by `flutter_rust_bridge`@ 2.11.1.
|
|
|
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
|
|
|
import '../frb_generated.dart';
|
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
|
|
|
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`, `fmt`, `fmt`
|
|
|
|
Future<void> sendNotify({
|
|
String? summary,
|
|
String? body,
|
|
String? appName,
|
|
String? appId,
|
|
}) => RustLib.instance.api.crateApiWin32ApiSendNotify(
|
|
summary: summary,
|
|
body: body,
|
|
appName: appName,
|
|
appId: appId,
|
|
);
|
|
|
|
Future<BigInt> getSystemMemorySizeGb() =>
|
|
RustLib.instance.api.crateApiWin32ApiGetSystemMemorySizeGb();
|
|
|
|
Future<int> getNumberOfLogicalProcessors() =>
|
|
RustLib.instance.api.crateApiWin32ApiGetNumberOfLogicalProcessors();
|
|
|
|
Future<SystemInfo> getSystemInfo() =>
|
|
RustLib.instance.api.crateApiWin32ApiGetSystemInfo();
|
|
|
|
Future<String> getGpuInfoFromRegistry() =>
|
|
RustLib.instance.api.crateApiWin32ApiGetGpuInfoFromRegistry();
|
|
|
|
Future<String> resolveShortcut({required String lnkPath}) =>
|
|
RustLib.instance.api.crateApiWin32ApiResolveShortcut(lnkPath: lnkPath);
|
|
|
|
Future<void> openDirWithExplorer({
|
|
required String path,
|
|
required bool isFile,
|
|
}) => RustLib.instance.api.crateApiWin32ApiOpenDirWithExplorer(
|
|
path: path,
|
|
isFile: isFile,
|
|
);
|
|
|
|
Future<bool> setForegroundWindow({required String windowName}) => RustLib
|
|
.instance
|
|
.api
|
|
.crateApiWin32ApiSetForegroundWindow(windowName: windowName);
|
|
|
|
Future<int> getProcessPidByName({required String processName}) => RustLib
|
|
.instance
|
|
.api
|
|
.crateApiWin32ApiGetProcessPidByName(processName: processName);
|
|
|
|
Future<List<ProcessInfo>> getProcessListByName({required String processName}) =>
|
|
RustLib.instance.api.crateApiWin32ApiGetProcessListByName(
|
|
processName: processName,
|
|
);
|
|
|
|
Future<int> killProcessByName({required String processName}) => RustLib
|
|
.instance
|
|
.api
|
|
.crateApiWin32ApiKillProcessByName(processName: processName);
|
|
|
|
Future<int> getDiskPhysicalSectorSize({required String driveLetter}) => RustLib
|
|
.instance
|
|
.api
|
|
.crateApiWin32ApiGetDiskPhysicalSectorSize(driveLetter: driveLetter);
|
|
|
|
Future<void> createDesktopShortcut({
|
|
required String targetPath,
|
|
required String shortcutName,
|
|
}) => RustLib.instance.api.crateApiWin32ApiCreateDesktopShortcut(
|
|
targetPath: targetPath,
|
|
shortcutName: shortcutName,
|
|
);
|
|
|
|
Future<void> runAsAdmin({required String program, required String args}) =>
|
|
RustLib.instance.api.crateApiWin32ApiRunAsAdmin(
|
|
program: program,
|
|
args: args,
|
|
);
|
|
|
|
Future<void> startProcess({
|
|
required String program,
|
|
required List<String> args,
|
|
}) => RustLib.instance.api.crateApiWin32ApiStartProcess(
|
|
program: program,
|
|
args: args,
|
|
);
|
|
|
|
Future<bool> checkNvmePatchStatus() =>
|
|
RustLib.instance.api.crateApiWin32ApiCheckNvmePatchStatus();
|
|
|
|
Future<void> addNvmePatch() =>
|
|
RustLib.instance.api.crateApiWin32ApiAddNvmePatch();
|
|
|
|
Future<void> removeNvmePatch() =>
|
|
RustLib.instance.api.crateApiWin32ApiRemoveNvmePatch();
|
|
|
|
class ProcessInfo {
|
|
final int pid;
|
|
final String name;
|
|
final String path;
|
|
|
|
const ProcessInfo({
|
|
required this.pid,
|
|
required this.name,
|
|
required this.path,
|
|
});
|
|
|
|
@override
|
|
int get hashCode => pid.hashCode ^ name.hashCode ^ path.hashCode;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is ProcessInfo &&
|
|
runtimeType == other.runtimeType &&
|
|
pid == other.pid &&
|
|
name == other.name &&
|
|
path == other.path;
|
|
}
|
|
|
|
/// System information struct
|
|
class SystemInfo {
|
|
final String osName;
|
|
final String cpuName;
|
|
final String gpuInfo;
|
|
final String diskInfo;
|
|
|
|
const SystemInfo({
|
|
required this.osName,
|
|
required this.cpuName,
|
|
required this.gpuInfo,
|
|
required this.diskInfo,
|
|
});
|
|
|
|
@override
|
|
int get hashCode =>
|
|
osName.hashCode ^ cpuName.hashCode ^ gpuInfo.hashCode ^ diskInfo.hashCode;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is SystemInfo &&
|
|
runtimeType == other.runtimeType &&
|
|
osName == other.osName &&
|
|
cpuName == other.cpuName &&
|
|
gpuInfo == other.gpuInfo &&
|
|
diskInfo == other.diskInfo;
|
|
}
|