flutter_texture_rgba_renderer/lib/texture_rgba_ffi.dart
2023-02-19 23:54:22 -08:00

20 lines
No EOL
513 B
Dart

import 'dart:ffi';
typedef F1 = Void Function(
Pointer<Void> ptr, Pointer<Uint8> buffer, Int32 width, Int32 height);
typedef F1Dart = void Function(
Pointer<Void> ptr, Pointer<Uint8> buffer, int width, int height);
class Native {
Native._();
static Native get _instance => Native._()..init();
static Native get instance => _instance;
late F1Dart onRgba;
init() {
final lib = DynamicLibrary.process();
onRgba = lib.lookupFunction<F1, F1Dart>("FlutterRgbaRendererPluginOnRgba");
}
}