2024-03-07 15:29:36 +01:00
|
|
|
// 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;
|
|
|
|
|
2024-03-12 19:53:16 +01:00
|
|
|
/// Dart bindings for the OpenMVG library.
|
2024-03-07 15:29:36 +01:00
|
|
|
///
|
2024-03-12 19:53:16 +01:00
|
|
|
class LibDartOpenMVG {
|
2024-03-07 15:29:36 +01:00
|
|
|
/// Holds the symbol lookup function.
|
|
|
|
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
|
|
|
|
_lookup;
|
|
|
|
|
|
|
|
/// The symbols are looked up in [dynamicLibrary].
|
2024-03-12 19:53:16 +01:00
|
|
|
LibDartOpenMVG(ffi.DynamicLibrary dynamicLibrary)
|
2024-03-07 15:29:36 +01:00
|
|
|
: _lookup = dynamicLibrary.lookup;
|
|
|
|
|
|
|
|
/// The symbols are looked up with [lookup].
|
2024-03-12 19:53:16 +01:00
|
|
|
LibDartOpenMVG.fromLookup(
|
2024-03-07 15:29:36 +01:00
|
|
|
ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
|
|
|
|
lookup)
|
|
|
|
: _lookup = lookup;
|
|
|
|
|
2024-03-13 18:26:37 +01:00
|
|
|
ffi.Pointer<FILE> make_buffer(
|
|
|
|
ffi.Pointer<ffi.Uint8> arg0,
|
|
|
|
int arg1,
|
2024-03-12 19:53:16 +01:00
|
|
|
) {
|
2024-03-13 18:26:37 +01:00
|
|
|
return _make_buffer(
|
2024-03-12 19:53:16 +01:00
|
|
|
arg0,
|
2024-03-13 18:26:37 +01:00
|
|
|
arg1,
|
2024-03-12 19:53:16 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2024-03-13 18:26:37 +01:00
|
|
|
late final _make_bufferPtr = _lookup<
|
2024-03-12 19:53:16 +01:00
|
|
|
ffi.NativeFunction<
|
2024-03-13 18:26:37 +01:00
|
|
|
ffi.Pointer<FILE> Function(
|
|
|
|
ffi.Pointer<ffi.Uint8>, ffi.Size)>>('make_buffer');
|
|
|
|
late final _make_buffer = _make_bufferPtr
|
|
|
|
.asFunction<ffi.Pointer<FILE> Function(ffi.Pointer<ffi.Uint8>, int)>();
|
2024-03-12 19:53:16 +01:00
|
|
|
|
2024-03-20 17:42:18 +01:00
|
|
|
int read_buffer(
|
|
|
|
ffi.Pointer<FILE> arg0,
|
|
|
|
ffi.Pointer<ffi.Pointer<ffi.Uint8>> arg1,
|
|
|
|
ffi.Pointer<ffi.Size> arg2,
|
|
|
|
) {
|
|
|
|
return _read_buffer(
|
|
|
|
arg0,
|
|
|
|
arg1,
|
|
|
|
arg2,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _read_bufferPtr = _lookup<
|
|
|
|
ffi.NativeFunction<
|
|
|
|
ffi.Int Function(
|
|
|
|
ffi.Pointer<FILE>,
|
|
|
|
ffi.Pointer<ffi.Pointer<ffi.Uint8>>,
|
|
|
|
ffi.Pointer<ffi.Size>)>>('read_buffer');
|
|
|
|
late final _read_buffer = _read_bufferPtr.asFunction<
|
|
|
|
int Function(ffi.Pointer<FILE>, ffi.Pointer<ffi.Pointer<ffi.Uint8>>,
|
|
|
|
ffi.Pointer<ffi.Size>)>();
|
|
|
|
|
2024-03-11 15:36:09 +01:00
|
|
|
ffi.Pointer<Frame> new_frame_from_handle(
|
|
|
|
ffi.Pointer<FILE> arg0,
|
|
|
|
int arg1,
|
|
|
|
int arg2,
|
|
|
|
int arg3,
|
2024-03-07 15:29:36 +01:00
|
|
|
) {
|
2024-03-11 15:36:09 +01:00
|
|
|
return _new_frame_from_handle(
|
|
|
|
arg0,
|
|
|
|
arg1,
|
|
|
|
arg2,
|
|
|
|
arg3,
|
2024-03-07 15:29:36 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2024-03-11 15:36:09 +01:00
|
|
|
late final _new_frame_from_handlePtr = _lookup<
|
|
|
|
ffi.NativeFunction<
|
|
|
|
ffi.Pointer<Frame> Function(ffi.Pointer<FILE>, ffi.Int, ffi.Int,
|
|
|
|
ffi.Int)>>('new_frame_from_handle');
|
|
|
|
late final _new_frame_from_handle = _new_frame_from_handlePtr.asFunction<
|
|
|
|
ffi.Pointer<Frame> Function(ffi.Pointer<FILE>, int, int, int)>();
|
|
|
|
|
|
|
|
ffi.Pointer<Frame> new_frame_from_data(
|
|
|
|
ffi.Pointer<ffi.Uint8> arg0,
|
|
|
|
int arg1,
|
|
|
|
int arg2,
|
|
|
|
int arg3,
|
|
|
|
int arg4,
|
|
|
|
) {
|
|
|
|
return _new_frame_from_data(
|
|
|
|
arg0,
|
|
|
|
arg1,
|
|
|
|
arg2,
|
|
|
|
arg3,
|
|
|
|
arg4,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _new_frame_from_dataPtr = _lookup<
|
|
|
|
ffi.NativeFunction<
|
|
|
|
ffi.Pointer<Frame> Function(ffi.Pointer<ffi.Uint8>, ffi.Size, ffi.Int,
|
|
|
|
ffi.Int, ffi.Int)>>('new_frame_from_data');
|
|
|
|
late final _new_frame_from_data = _new_frame_from_dataPtr.asFunction<
|
|
|
|
ffi.Pointer<Frame> Function(
|
|
|
|
ffi.Pointer<ffi.Uint8>, int, int, int, int)>();
|
|
|
|
|
2024-03-13 18:26:37 +01:00
|
|
|
ffi.Pointer<ImageResult> image_result_new(
|
|
|
|
ffi.Pointer<u_char> arg0,
|
|
|
|
int data_len,
|
|
|
|
) {
|
|
|
|
return _image_result_new(
|
|
|
|
arg0,
|
|
|
|
data_len,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _image_result_newPtr = _lookup<
|
|
|
|
ffi.NativeFunction<
|
|
|
|
ffi.Pointer<ImageResult> Function(
|
|
|
|
ffi.Pointer<u_char>, ffi.Size)>>('image_result_new');
|
|
|
|
late final _image_result_new = _image_result_newPtr.asFunction<
|
|
|
|
ffi.Pointer<ImageResult> Function(ffi.Pointer<u_char>, int)>();
|
|
|
|
|
|
|
|
ffi.Pointer<ImageResult> image_result_new_error(
|
|
|
|
int arg0,
|
|
|
|
) {
|
|
|
|
return _image_result_new_error(
|
|
|
|
arg0,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _image_result_new_errorPtr =
|
|
|
|
_lookup<ffi.NativeFunction<ffi.Pointer<ImageResult> Function(ffi.Int)>>(
|
|
|
|
'image_result_new_error');
|
|
|
|
late final _image_result_new_error = _image_result_new_errorPtr
|
|
|
|
.asFunction<ffi.Pointer<ImageResult> Function(int)>();
|
|
|
|
|
|
|
|
int image_result_free(
|
|
|
|
ffi.Pointer<ImageResult> arg0,
|
|
|
|
) {
|
|
|
|
return _image_result_free(
|
|
|
|
arg0,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _image_result_freePtr =
|
|
|
|
_lookup<ffi.NativeFunction<ffi.Int Function(ffi.Pointer<ImageResult>)>>(
|
|
|
|
'image_result_free');
|
|
|
|
late final _image_result_free = _image_result_freePtr
|
|
|
|
.asFunction<int Function(ffi.Pointer<ImageResult>)>();
|
|
|
|
|
2024-03-12 19:53:16 +01:00
|
|
|
ffi.Pointer<ImageResult> archimedes_get_image_data(
|
2024-03-11 15:36:09 +01:00
|
|
|
ffi.Pointer<Frame> arg0,
|
2024-03-07 15:29:36 +01:00
|
|
|
) {
|
2024-03-11 15:36:09 +01:00
|
|
|
return _archimedes_get_image_data(
|
|
|
|
arg0,
|
2024-03-07 15:29:36 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2024-03-11 15:36:09 +01:00
|
|
|
late final _archimedes_get_image_dataPtr = _lookup<
|
|
|
|
ffi.NativeFunction<
|
2024-03-12 19:53:16 +01:00
|
|
|
ffi.Pointer<ImageResult> Function(
|
|
|
|
ffi.Pointer<Frame>)>>('archimedes_get_image_data');
|
|
|
|
late final _archimedes_get_image_data = _archimedes_get_image_dataPtr
|
|
|
|
.asFunction<ffi.Pointer<ImageResult> Function(ffi.Pointer<Frame>)>();
|
|
|
|
|
|
|
|
int archimedes_images_to_sfm(
|
|
|
|
ffi.Pointer<ffi.Pointer<Frame>> arg0,
|
|
|
|
int arg1,
|
|
|
|
) {
|
|
|
|
return _archimedes_images_to_sfm(
|
|
|
|
arg0,
|
|
|
|
arg1,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _archimedes_images_to_sfmPtr = _lookup<
|
|
|
|
ffi.NativeFunction<
|
|
|
|
ffi.Int Function(ffi.Pointer<ffi.Pointer<Frame>>,
|
|
|
|
ffi.Size)>>('archimedes_images_to_sfm');
|
|
|
|
late final _archimedes_images_to_sfm = _archimedes_images_to_sfmPtr
|
|
|
|
.asFunction<int Function(ffi.Pointer<ffi.Pointer<Frame>>, int)>();
|
2024-03-07 15:29:36 +01:00
|
|
|
}
|
2024-03-11 15:36:09 +01:00
|
|
|
|
|
|
|
final class _Frame extends ffi.Struct {
|
|
|
|
external ffi.Pointer<FILE> stream;
|
|
|
|
|
|
|
|
@ffi.Int()
|
|
|
|
external int w;
|
|
|
|
|
|
|
|
@ffi.Int()
|
|
|
|
external int h;
|
|
|
|
|
|
|
|
@ffi.Int()
|
|
|
|
external int depth;
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef FILE = _IO_FILE;
|
|
|
|
|
|
|
|
final class _IO_FILE extends ffi.Struct {
|
|
|
|
@ffi.Int()
|
|
|
|
external int _flags;
|
|
|
|
|
|
|
|
external ffi.Pointer<ffi.Char> _IO_read_ptr;
|
|
|
|
|
|
|
|
external ffi.Pointer<ffi.Char> _IO_read_end;
|
|
|
|
|
|
|
|
external ffi.Pointer<ffi.Char> _IO_read_base;
|
|
|
|
|
|
|
|
external ffi.Pointer<ffi.Char> _IO_write_base;
|
|
|
|
|
|
|
|
external ffi.Pointer<ffi.Char> _IO_write_ptr;
|
|
|
|
|
|
|
|
external ffi.Pointer<ffi.Char> _IO_write_end;
|
|
|
|
|
|
|
|
external ffi.Pointer<ffi.Char> _IO_buf_base;
|
|
|
|
|
|
|
|
external ffi.Pointer<ffi.Char> _IO_buf_end;
|
|
|
|
|
|
|
|
external ffi.Pointer<ffi.Char> _IO_save_base;
|
|
|
|
|
|
|
|
external ffi.Pointer<ffi.Char> _IO_backup_base;
|
|
|
|
|
|
|
|
external ffi.Pointer<ffi.Char> _IO_save_end;
|
|
|
|
|
|
|
|
external ffi.Pointer<_IO_marker> _markers;
|
|
|
|
|
|
|
|
external ffi.Pointer<_IO_FILE> _chain;
|
|
|
|
|
|
|
|
@ffi.Int()
|
|
|
|
external int _fileno;
|
|
|
|
|
|
|
|
@ffi.Int()
|
|
|
|
external int _flags2;
|
|
|
|
|
|
|
|
@__off_t()
|
|
|
|
external int _old_offset;
|
|
|
|
|
|
|
|
@ffi.UnsignedShort()
|
|
|
|
external int _cur_column;
|
|
|
|
|
|
|
|
@ffi.SignedChar()
|
|
|
|
external int _vtable_offset;
|
|
|
|
|
|
|
|
@ffi.Array.multi([1])
|
|
|
|
external ffi.Array<ffi.Char> _shortbuf;
|
|
|
|
|
|
|
|
external ffi.Pointer<_IO_lock_t> _lock;
|
|
|
|
|
|
|
|
@__off64_t()
|
|
|
|
external int _offset;
|
|
|
|
|
|
|
|
external ffi.Pointer<_IO_codecvt> _codecvt;
|
|
|
|
|
|
|
|
external ffi.Pointer<_IO_wide_data> _wide_data;
|
|
|
|
|
|
|
|
external ffi.Pointer<_IO_FILE> _freeres_list;
|
|
|
|
|
|
|
|
external ffi.Pointer<ffi.Void> _freeres_buf;
|
|
|
|
|
|
|
|
@ffi.Size()
|
|
|
|
external int __pad5;
|
|
|
|
|
|
|
|
@ffi.Int()
|
|
|
|
external int _mode;
|
|
|
|
|
|
|
|
@ffi.Array.multi([20])
|
|
|
|
external ffi.Array<ffi.Char> _unused2;
|
|
|
|
}
|
|
|
|
|
|
|
|
final class _IO_marker extends ffi.Opaque {}
|
|
|
|
|
|
|
|
typedef __off_t = ffi.Long;
|
|
|
|
typedef _IO_lock_t = ffi.Void;
|
|
|
|
typedef __off64_t = ffi.Long;
|
|
|
|
|
|
|
|
final class _IO_codecvt extends ffi.Opaque {}
|
|
|
|
|
|
|
|
final class _IO_wide_data extends ffi.Opaque {}
|
|
|
|
|
2024-03-13 18:26:37 +01:00
|
|
|
typedef Frame = _Frame;
|
|
|
|
|
2024-03-12 19:53:16 +01:00
|
|
|
final class _ImageResult extends ffi.Struct {
|
|
|
|
external ffi.Pointer<u_char> data;
|
|
|
|
|
|
|
|
@ffi.Size()
|
|
|
|
external int data_len;
|
|
|
|
|
|
|
|
@ffi.Int()
|
|
|
|
external int error;
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef u_char = __u_char;
|
|
|
|
typedef __u_char = ffi.UnsignedChar;
|
|
|
|
typedef ImageResult = _ImageResult;
|