| # Run with `dart run ffigen --config ffigen.yaml`. |
| name: JniBindings |
| description: | |
| Bindings for libdartjni.so which is part of jni plugin. |
| |
| It also transitively includes type definitions such as JNIEnv from third_party/jni.h; |
| |
| However, functions prefixed JNI_ are not usable because they are in a different shared library. |
| |
| Regenerate bindings with `flutter pub run ffigen.dart --config ffigen.yaml`. |
| output: 'lib/src/third_party/jni_bindings_generated.dart' |
| headers: |
| entry-points: |
| - 'src/dartjni.h' |
| include-directives: |
| - 'src/dartjni.h' |
| - 'third_party/jni.h' |
| compiler-opts: |
| - '-Ithird_party/' |
| functions: |
| exclude: # Exclude init functions supposed to be defined in loaded DLL, not JNI |
| - 'JNI_OnLoad' |
| - 'JNI_OnUnload' |
| - 'JNI_OnLoad_L' |
| - 'JNI_OnUnload_L' |
| structs: |
| exclude: |
| - 'jni_context' |
| rename: |
| ## opaque struct definitions, base types of jfieldID and jmethodID |
| '_jfieldID': 'jfieldID_' |
| '_jmethodID': 'jmethodID_' |
| #'JNI(.*)': 'Jni$1' |
| unions: |
| rename: |
| 'jvalue': 'JValue' |
| enums: |
| rename: |
| 'DartJniLogLevel': 'JniLogLevel' |
| globals: |
| exclude: |
| - 'jni' |
| - 'jniEnv' |
| typedefs: |
| rename: |
| 'JNI(.*)': 'Jni$1' |
| 'jint': 'JInt' |
| 'jclass': 'JClass' |
| 'jobject': 'JObject' |
| 'jbyte': 'JByte' |
| 'jsize': 'JSize' |
| 'jmethodID': 'JMethodID' |
| 'jfieldID': 'JFieldID' |
| 'jboolean': 'JBoolean' |
| 'jthrowable': 'JThrowable' |
| 'jchar': 'JChar' |
| 'jshort': 'JShort' |
| 'jlong': 'JLong' |
| 'jfloat': 'JFloat' |
| 'jdouble': 'JDouble' |
| 'jstring': 'JString' |
| 'jarray': 'JArray' |
| 'jobjectArray': 'JObjectArray' |
| 'jbooleanArray': 'JBooleanArray' |
| 'jbyteArray': 'JByteArray' |
| 'jcharArray': 'JCharArray' |
| 'jshortArray': 'JShortArray' |
| 'jintArray': 'JIntArray' |
| 'jlongArray': 'JLongArray' |
| 'jfloatArray': 'JFloatArray' |
| 'jdoubleArray': 'JDoubleArray' |
| 'jweak': 'JWeak' |
| 'jvalue': 'JValue' |
| preamble: | |
| // Autogenerated file. Do not edit. |
| // Generated from an annotated version of jni.h provided in Android NDK |
| // (NDK Version 23.1.7779620) |
| // The license for original file is provided below: |
| |
| /* |
| * Copyright (C) 2006 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| /* |
| * JNI specification, as defined by Sun: |
| * http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/jniTOC.html |
| * |
| * Everything here is expected to be VM-neutral. |
| */ |
| |
| // ignore_for_file: always_specify_types |
| // ignore_for_file: camel_case_types |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: constant_identifier_names |
| // ignore_for_file: unused_field |
| // ignore_for_file: unused_element |
| // coverage:ignore-file |
| comments: |
| style: any |
| length: full |
| |