mirror of
https://github.com/StarCitizenToolBox/app.git
synced 2026-01-13 19:50:28 +00:00
61 lines
1.7 KiB
Dart
61 lines
1.7 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`, `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<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,
|
|
);
|
|
|
|
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;
|
|
}
|