96 lines
2.9 KiB
Dart
96 lines
2.9 KiB
Dart
// ignore_for_file: always_specify_types
|
|
// ignore_for_file: camel_case_types
|
|
// ignore_for_file: non_constant_identifier_names
|
|
|
|
// AUTO GENERATED FILE, DO NOT EDIT.
|
|
//
|
|
// Generated by `package:ffigen`.
|
|
// ignore_for_file: type=lint
|
|
import 'dart:ffi' as ffi;
|
|
|
|
/// Bindings for `src/stockfish.h`.
|
|
///
|
|
/// Regenerate bindings with `dart run ffigen --config ffigen.yaml`.
|
|
///
|
|
class StockfishChessEngineCBindings {
|
|
/// Holds the symbol lookup function.
|
|
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
|
|
_lookup;
|
|
|
|
/// The symbols are looked up in [dynamicLibrary].
|
|
StockfishChessEngineCBindings(ffi.DynamicLibrary dynamicLibrary)
|
|
: _lookup = dynamicLibrary.lookup;
|
|
|
|
/// The symbols are looked up with [lookup].
|
|
StockfishChessEngineCBindings.fromLookup(
|
|
ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
|
|
lookup)
|
|
: _lookup = lookup;
|
|
|
|
int stockfish_init() {
|
|
return _stockfish_init();
|
|
}
|
|
|
|
late final _stockfish_initPtr =
|
|
_lookup<ffi.NativeFunction<ffi.Int Function()>>('stockfish_init');
|
|
late final _stockfish_init = _stockfish_initPtr.asFunction<int Function()>();
|
|
|
|
int stockfish_main() {
|
|
return _stockfish_main();
|
|
}
|
|
|
|
late final _stockfish_mainPtr =
|
|
_lookup<ffi.NativeFunction<ffi.Int Function()>>('stockfish_main');
|
|
late final _stockfish_main = _stockfish_mainPtr.asFunction<int Function()>();
|
|
|
|
void stockfish_start_main() {
|
|
return _stockfish_start_main();
|
|
}
|
|
|
|
late final _stockfish_start_mainPtr =
|
|
_lookup<ffi.NativeFunction<ffi.Void Function()>>('stockfish_start_main');
|
|
late final _stockfish_start_main =
|
|
_stockfish_start_mainPtr.asFunction<void Function()>();
|
|
|
|
int stockfish_last_main_state() {
|
|
return _stockfish_last_main_state();
|
|
}
|
|
|
|
late final _stockfish_last_main_statePtr =
|
|
_lookup<ffi.NativeFunction<ffi.Int Function()>>(
|
|
'stockfish_last_main_state');
|
|
late final _stockfish_last_main_state =
|
|
_stockfish_last_main_statePtr.asFunction<int Function()>();
|
|
|
|
int stockfish_stdin_write(
|
|
ffi.Pointer<ffi.Char> data,
|
|
) {
|
|
return _stockfish_stdin_write(
|
|
data,
|
|
);
|
|
}
|
|
|
|
late final _stockfish_stdin_writePtr =
|
|
_lookup<ffi.NativeFunction<ssize_t Function(ffi.Pointer<ffi.Char>)>>(
|
|
'stockfish_stdin_write');
|
|
late final _stockfish_stdin_write = _stockfish_stdin_writePtr
|
|
.asFunction<int Function(ffi.Pointer<ffi.Char>)>();
|
|
|
|
ffi.Pointer<ffi.Char> stockfish_stdout_read(
|
|
int trygetline,
|
|
) {
|
|
return _stockfish_stdout_read(
|
|
trygetline,
|
|
);
|
|
}
|
|
|
|
late final _stockfish_stdout_readPtr =
|
|
_lookup<ffi.NativeFunction<ffi.Pointer<ffi.Char> Function(ffi.Int)>>(
|
|
'stockfish_stdout_read');
|
|
late final _stockfish_stdout_read = _stockfish_stdout_readPtr
|
|
.asFunction<ffi.Pointer<ffi.Char> Function(int)>();
|
|
}
|
|
|
|
typedef ssize_t = __ssize_t;
|
|
typedef __ssize_t = ffi.Long;
|
|
typedef Dart__ssize_t = int;
|