261 lines
6.3 KiB
Dart
261 lines
6.3 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;
|
|
|
|
/// Dart bindings for the OpenMVG library.
|
|
///
|
|
class LibDartOpenMVG {
|
|
/// Holds the symbol lookup function.
|
|
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
|
|
_lookup;
|
|
|
|
/// The symbols are looked up in [dynamicLibrary].
|
|
LibDartOpenMVG(ffi.DynamicLibrary dynamicLibrary)
|
|
: _lookup = dynamicLibrary.lookup;
|
|
|
|
/// The symbols are looked up with [lookup].
|
|
LibDartOpenMVG.fromLookup(
|
|
ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
|
|
lookup)
|
|
: _lookup = lookup;
|
|
|
|
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 error_t,
|
|
) {
|
|
return _image_result_new_error(
|
|
error_t,
|
|
);
|
|
}
|
|
|
|
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>)>();
|
|
|
|
ffi.Pointer<Frame> new_frame_from_handle(
|
|
ffi.Pointer<FILE> arg0,
|
|
int arg1,
|
|
int arg2,
|
|
int arg3,
|
|
) {
|
|
return _new_frame_from_handle(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
arg3,
|
|
);
|
|
}
|
|
|
|
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)>();
|
|
|
|
ffi.Pointer<ImageResult> archimedes_get_image_data(
|
|
ffi.Pointer<Frame> arg0,
|
|
) {
|
|
return _archimedes_get_image_data(
|
|
arg0,
|
|
);
|
|
}
|
|
|
|
late final _archimedes_get_image_dataPtr = _lookup<
|
|
ffi.NativeFunction<
|
|
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)>();
|
|
}
|
|
|
|
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 {}
|
|
|
|
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;
|
|
typedef Frame = _Frame;
|