| // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| // AUTO GENERATED FILE, DO NOT EDIT. | |
| // | |
| // Generated by `package:ffigen`. | |
| // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package | |
| @ffi.DefaultAsset('package:ffinative_example/generated_bindings.dart') | |
| library; | |
| import 'dart:ffi' as ffi; | |
| import '' as self; | |
| @ffi.Array.multi([5]) | |
| @ffi.Native<ffi.Array<ffi.Int>>() | |
| external ffi.Array<ffi.Int> array; | |
| /// Divides 2 integers, returns pointer to a float. | |
| @ffi.Native<ffi.Pointer<ffi.Float> Function(ffi.Int, ffi.Int)>() | |
| external ffi.Pointer<ffi.Float> divide(int a, int b); | |
| /// Divides 2 floats, returns a pointer to double. | |
| @ffi.Native<ffi.Pointer<ffi.Double> Function(ffi.Float, ffi.Float)>() | |
| external ffi.Pointer<ffi.Double> dividePrecision(double a, double b); | |
| /// Version of the native C library | |
| @ffi.Native<ffi.Pointer<ffi.Char>>() | |
| external final ffi.Pointer<ffi.Char> library_version; | |
| @ffi.Native<ffi.Int>() | |
| external int log_level; | |
| /// Multiplies 2 integers, returns pointer to an integer,. | |
| @ffi.Native<ffi.Pointer<ffi.Int> Function(ffi.Int, ffi.Int)>() | |
| external ffi.Pointer<ffi.Int> multiply(int a, int b); | |
| /// Subtracts 2 integers. | |
| @ffi.Native<ffi.Int Function(ffi.Int, ffi.Int)>() | |
| external int subtract(int a, int b); | |
| /// Adds 2 integers. | |
| @ffi.Native<ffi.Int Function(ffi.Int, ffi.Int)>() | |
| external int sum(int a, int b); | |
| const addresses = _SymbolAddresses(); | |
| class _SymbolAddresses { | |
| const _SymbolAddresses(); | |
| ffi.Pointer<ffi.Pointer<ffi.Char>> get library_version => | |
| ffi.Native.addressOf(self.library_version); | |
| ffi.Pointer<ffi.NativeFunction<ffi.Int Function(ffi.Int, ffi.Int)>> get sum => | |
| ffi.Native.addressOf(self.sum); | |
| } |