15 lines
538 B
Dart
15 lines
538 B
Dart
import 'dart:ffi';
|
|
import 'package:archimedes_mobile_lib/dynloader.dart';
|
|
import 'archimedes_mobile_lib_bindings_generated.dart';
|
|
|
|
final _dylib = getArchimedesCLib();
|
|
final ArchimedesMobileLibBindings _bindings =
|
|
ArchimedesMobileLibBindings(_dylib);
|
|
|
|
int getImageData(Pointer<Frame> frame, Pointer<UnsignedChar> data) =>
|
|
_bindings.archimedes_get_image_data(frame, data);
|
|
|
|
Pointer<Frame> newFrame(
|
|
Pointer<Uint8> data, int dataLen, int w, int h, int depth) =>
|
|
_bindings.new_frame_from_data(data, dataLen, w, h, depth);
|