diff --git a/android/.gitignore b/android/.gitignore
deleted file mode 100644
index 161bdcd..0000000
--- a/android/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-*.iml
-.gradle
-/local.properties
-/.idea/workspace.xml
-/.idea/libraries
-.DS_Store
-/build
-/captures
-.cxx
diff --git a/android/build.gradle b/android/build.gradle
deleted file mode 100644
index cc50e66..0000000
--- a/android/build.gradle
+++ /dev/null
@@ -1,63 +0,0 @@
-// The Android Gradle Plugin builds the native code with the Android NDK.
-
-group = "dr1009.com.image_ffi"
-version = "1.0"
-
-buildscript {
- repositories {
- google()
- mavenCentral()
- }
-
- dependencies {
- // The Android Gradle Plugin knows how to build native code with the NDK.
- classpath("com.android.tools.build:gradle:8.11.1")
- }
-}
-
-rootProject.allprojects {
- repositories {
- google()
- mavenCentral()
- }
-}
-
-apply plugin: "com.android.library"
-
-android {
- namespace = "dr1009.com.image_ffi"
-
- // Bumping the plugin compileSdk version requires all clients of this plugin
- // to bump the version in their app.
- compileSdk = 36
-
- // Use the NDK version
- // declared in /android/app/build.gradle file of the Flutter project.
- // Replace it with a version number if this plugin requires a specific NDK version.
- // (e.g. ndkVersion "23.1.7779620")
- ndkVersion = android.ndkVersion
-
- // Invoke the shared CMake build with the Android Gradle Plugin.
- externalNativeBuild {
- cmake {
- path = "../src/CMakeLists.txt"
-
- // The default CMake version for the Android Gradle Plugin is 3.10.2.
- // https://developer.android.com/studio/projects/install-ndk#vanilla_cmake
- //
- // The Flutter tooling requires that developers have CMake 3.10 or later
- // installed. You should not increase this version, as doing so will cause
- // the plugin to fail to compile for some customers of the plugin.
- // version "3.10.2"
- }
- }
-
- compileOptions {
- sourceCompatibility = JavaVersion.VERSION_17
- targetCompatibility = JavaVersion.VERSION_17
- }
-
- defaultConfig {
- minSdk = 24
- }
-}
diff --git a/android/settings.gradle b/android/settings.gradle
deleted file mode 100644
index 5397af8..0000000
--- a/android/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = 'image_ffi'
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
deleted file mode 100644
index f52894f..0000000
--- a/android/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
diff --git a/ffigen.dart b/ffigen.dart
new file mode 100644
index 0000000..626a98a
--- /dev/null
+++ b/ffigen.dart
@@ -0,0 +1,31 @@
+// Regenerate bindings with `dart run ffigen.dart`.
+import 'package:ffigen/ffigen.dart';
+
+final config = FfiGenerator(
+ headers: Headers(
+ entryPoints: [
+ Uri.file(
+ '$macSdkPath/System/Library/Frameworks/ImageIO.framework/Headers/ImageIO.h',
+ ),
+ ],
+ ),
+ objectiveC: ObjectiveC(interfaces: Interfaces.includeSet({'ImageIO'})),
+ output: Output(dartFile: Uri.file('lib/gen/darwin_bindings.dart')),
+ functions: Functions.includeSet({
+ // CFData operations
+ 'CFDataCreate',
+ 'CFDataCreateMutable',
+ 'CFDataGetBytePtr',
+ 'CFDataGetLength',
+ // CGImageSource operations (decoding)
+ 'CGImageSourceCreateWithData',
+ 'CGImageSourceCreateImageAtIndex',
+ // CGImageDestination operations (encoding)
+ 'CGImageDestinationCreateWithData',
+ 'CGImageDestinationAddImage',
+ 'CGImageDestinationFinalize',
+ }),
+ globals: Globals.includeSet({'kCFAllocatorDefault'}),
+);
+
+void main() => config.generate();
diff --git a/ffigen.yaml b/ffigen.yaml
deleted file mode 100644
index e2992de..0000000
--- a/ffigen.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-# Run with `dart run ffigen --config ffigen.yaml`.
-name: ImageFfiBindings
-description: |
- Bindings for `src/image_ffi.h`.
-
- Regenerate bindings with `dart run ffigen --config ffigen.yaml`.
-output: 'lib/image_ffi_bindings_generated.dart'
-headers:
- entry-points:
- - 'src/image_ffi.h'
- include-directives:
- - 'src/image_ffi.h'
-preamble: |
- // ignore_for_file: always_specify_types
- // ignore_for_file: camel_case_types
- // ignore_for_file: non_constant_identifier_names
-comments:
- style: any
- length: full
diff --git a/ios/Classes/image_ffi.c b/ios/Classes/image_ffi.c
deleted file mode 100644
index 8f5b39b..0000000
--- a/ios/Classes/image_ffi.c
+++ /dev/null
@@ -1,3 +0,0 @@
-// Relative import to be able to reuse the C sources.
-// See the comment in ../image_ffi.podspec for more information.
-#include "../../src/image_ffi.c"
diff --git a/ios/image_ffi.podspec b/ios/image_ffi.podspec
deleted file mode 100644
index 8b68a00..0000000
--- a/ios/image_ffi.podspec
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
-# Run `pod lib lint image_ffi.podspec` to validate before publishing.
-#
-Pod::Spec.new do |s|
- s.name = 'image_ffi'
- s.version = '0.0.1'
- s.summary = 'A new Flutter FFI plugin project.'
- s.description = <<-DESC
-A new Flutter FFI plugin project.
- DESC
- s.homepage = 'http://example.com'
- s.license = { :file => '../LICENSE' }
- s.author = { 'Your Company' => 'email@example.com' }
-
- # This will ensure the source files in Classes/ are included in the native
- # builds of apps using this FFI plugin. Podspec does not support relative
- # paths, so Classes contains a forwarder C file that relatively imports
- # `../src/*` so that the C sources can be shared among all target platforms.
- s.source = { :path => '.' }
- s.source_files = 'Classes/**/*'
- s.dependency 'Flutter'
- s.platform = :ios, '13.0'
-
- # Flutter.framework does not contain a i386 slice.
- s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
- s.swift_version = '5.0'
-end
diff --git a/jnigen.yaml b/jnigen.yaml
new file mode 100644
index 0000000..562c203
--- /dev/null
+++ b/jnigen.yaml
@@ -0,0 +1,17 @@
+# Regenerate bindings with `dart run jnigen --config jnigen.yaml`.
+
+android_sdk_config:
+ add_gradle_deps: true
+ android_example: 'example/'
+
+output:
+ dart:
+ path: lib/gen/jnigen_bindings.dart
+ structure: single_file
+
+source_path:
+ - 'java/'
+classes:
+ - 'java.io.ByteArrayOutputStream'
+ - 'android/graphics/BitmapFactory'
+ - 'android/graphics/Bitmap'
diff --git a/lib/gen/darwin_bindings.dart b/lib/gen/darwin_bindings.dart
new file mode 100644
index 0000000..2866e3c
--- /dev/null
+++ b/lib/gen/darwin_bindings.dart
@@ -0,0 +1,105 @@
+// AUTO GENERATED FILE, DO NOT EDIT.
+//
+// Generated by `package:ffigen`.
+// ignore_for_file: type=lint, unused_import
+import 'dart:ffi' as ffi;
+import 'package:objective_c/objective_c.dart' as objc;
+
+@ffi.Native>()
+external final ffi.Pointer<__CFAllocator> kCFAllocatorDefault;
+
+@ffi.Native<
+ ffi.Pointer<__CFData> Function(
+ ffi.Pointer<__CFAllocator>,
+ ffi.Pointer,
+ ffi.Long,
+ )
+>()
+external ffi.Pointer<__CFData> CFDataCreate(
+ ffi.Pointer<__CFAllocator> allocator,
+ ffi.Pointer bytes,
+ int length,
+);
+
+@ffi.Native<
+ ffi.Pointer<__CFData> Function(ffi.Pointer<__CFAllocator>, ffi.Long)
+>()
+external ffi.Pointer<__CFData> CFDataCreateMutable(
+ ffi.Pointer<__CFAllocator> allocator,
+ int capacity,
+);
+
+@ffi.Native)>()
+external int CFDataGetLength(ffi.Pointer<__CFData> theData);
+
+@ffi.Native Function(ffi.Pointer<__CFData>)>()
+external ffi.Pointer CFDataGetBytePtr(
+ ffi.Pointer<__CFData> theData,
+);
+
+@ffi.Native<
+ ffi.Pointer Function(
+ ffi.Pointer<__CFData>,
+ ffi.Pointer<__CFDictionary>,
+ )
+>()
+external ffi.Pointer CGImageSourceCreateWithData(
+ ffi.Pointer<__CFData> data,
+ ffi.Pointer<__CFDictionary> options,
+);
+
+@ffi.Native<
+ ffi.Pointer Function(
+ ffi.Pointer,
+ ffi.Size,
+ ffi.Pointer<__CFDictionary>,
+ )
+>()
+external ffi.Pointer CGImageSourceCreateImageAtIndex(
+ ffi.Pointer isrc,
+ int index,
+ ffi.Pointer<__CFDictionary> options,
+);
+
+@ffi.Native<
+ ffi.Pointer Function(
+ ffi.Pointer<__CFData>,
+ ffi.Pointer,
+ ffi.Size,
+ ffi.Pointer<__CFDictionary>,
+ )
+>()
+external ffi.Pointer CGImageDestinationCreateWithData(
+ ffi.Pointer<__CFData> data,
+ ffi.Pointer type,
+ int count,
+ ffi.Pointer<__CFDictionary> options,
+);
+
+@ffi.Native<
+ ffi.Void Function(
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer<__CFDictionary>,
+ )
+>()
+external void CGImageDestinationAddImage(
+ ffi.Pointer idst,
+ ffi.Pointer image,
+ ffi.Pointer<__CFDictionary> properties,
+);
+
+@ffi.Native)>()
+external bool CGImageDestinationFinalize(ffi.Pointer idst);
+
+final class __CFAllocator extends ffi.Opaque {}
+
+final class __CFDictionary extends ffi.Opaque {}
+
+final class __CFData extends ffi.Opaque {}
+
+final class CGImageSource extends ffi.Opaque {}
+
+final class CGImage extends ffi.Opaque {}
+
+final class CGImageDestination extends ffi.Opaque {}
diff --git a/lib/gen/jnigen_bindings.dart b/lib/gen/jnigen_bindings.dart
new file mode 100644
index 0000000..f419ec9
--- /dev/null
+++ b/lib/gen/jnigen_bindings.dart
@@ -0,0 +1,4677 @@
+// AUTO GENERATED BY JNIGEN 0.15.0. DO NOT EDIT!
+
+// ignore_for_file: annotate_overrides
+// ignore_for_file: argument_type_not_assignable
+// ignore_for_file: camel_case_extensions
+// ignore_for_file: camel_case_types
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: comment_references
+// ignore_for_file: doc_directive_unknown
+// ignore_for_file: file_names
+// ignore_for_file: inference_failure_on_untyped_parameter
+// ignore_for_file: invalid_internal_annotation
+// ignore_for_file: invalid_use_of_internal_member
+// ignore_for_file: library_prefixes
+// ignore_for_file: lines_longer_than_80_chars
+// ignore_for_file: no_leading_underscores_for_library_prefixes
+// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: non_constant_identifier_names
+// ignore_for_file: only_throw_errors
+// ignore_for_file: overridden_fields
+// ignore_for_file: prefer_double_quotes
+// ignore_for_file: unintended_html_in_doc_comment
+// ignore_for_file: unnecessary_cast
+// ignore_for_file: unnecessary_non_null_assertion
+// ignore_for_file: unnecessary_parenthesis
+// ignore_for_file: unused_element
+// ignore_for_file: unused_field
+// ignore_for_file: unused_import
+// ignore_for_file: unused_local_variable
+// ignore_for_file: unused_shown_name
+// ignore_for_file: use_super_parameters
+
+import 'dart:core' as core$_;
+import 'dart:core' show Object, String, bool, double, int;
+
+import 'package:jni/_internal.dart' as jni$_;
+import 'package:jni/jni.dart' as jni$_;
+
+/// from: `java.io.ByteArrayOutputStream`
+class ByteArrayOutputStream extends jni$_.JObject {
+ @jni$_.internal
+ @core$_.override
+ final jni$_.JType $type;
+
+ @jni$_.internal
+ ByteArrayOutputStream.fromReference(jni$_.JReference reference)
+ : $type = type,
+ super.fromReference(reference);
+
+ static final _class = jni$_.JClass.forName(r'java/io/ByteArrayOutputStream');
+
+ /// The type which includes information such as the signature of this class.
+ static const jni$_.JType nullableType =
+ $ByteArrayOutputStream$NullableType$();
+
+ /// The type which includes information such as the signature of this class.
+ static const jni$_.JType type =
+ $ByteArrayOutputStream$Type$();
+ static final _id_new$ = _class.constructorId(r'()V');
+
+ static final _new$ =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >
+ >('globalEnv_NewObject')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >();
+
+ /// from: `public void ()`
+ /// The returned object must be released after use, by calling the [release] method.
+ factory ByteArrayOutputStream() {
+ return ByteArrayOutputStream.fromReference(
+ _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr).reference,
+ );
+ }
+
+ static final _id_new$1 = _class.constructorId(r'(I)V');
+
+ static final _new$1 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Int32,)>,
+ )
+ >
+ >('globalEnv_NewObject')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ int,
+ )
+ >();
+
+ /// from: `public void (int i)`
+ /// The returned object must be released after use, by calling the [release] method.
+ factory ByteArrayOutputStream.new$1(int i) {
+ return ByteArrayOutputStream.fromReference(
+ _new$1(
+ _class.reference.pointer,
+ _id_new$1 as jni$_.JMethodIDPtr,
+ i,
+ ).reference,
+ );
+ }
+
+ static final _id_close = _class.instanceMethodId(r'close', r'()V');
+
+ static final _close =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >
+ >('globalEnv_CallVoidMethod')
+ .asFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >();
+
+ /// from: `public void close()`
+ void close() {
+ _close(reference.pointer, _id_close as jni$_.JMethodIDPtr).check();
+ }
+
+ static final _id_reset = _class.instanceMethodId(r'reset', r'()V');
+
+ static final _reset =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >
+ >('globalEnv_CallVoidMethod')
+ .asFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >();
+
+ /// from: `public void reset()`
+ void reset() {
+ _reset(reference.pointer, _id_reset as jni$_.JMethodIDPtr).check();
+ }
+
+ static final _id_size = _class.instanceMethodId(r'size', r'()I');
+
+ static final _size =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >
+ >('globalEnv_CallIntMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >();
+
+ /// from: `public int size()`
+ int size() {
+ return _size(reference.pointer, _id_size as jni$_.JMethodIDPtr).integer;
+ }
+
+ static final _id_toByteArray = _class.instanceMethodId(
+ r'toByteArray',
+ r'()[B',
+ );
+
+ static final _toByteArray =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >
+ >('globalEnv_CallObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >();
+
+ /// from: `public byte[] toByteArray()`
+ /// The returned object must be released after use, by calling the [release] method.
+ jni$_.JByteArray? toByteArray() {
+ return _toByteArray(
+ reference.pointer,
+ _id_toByteArray as jni$_.JMethodIDPtr,
+ ).object(const jni$_.$JByteArray$NullableType$());
+ }
+
+ static final _id_toString$1 = _class.instanceMethodId(
+ r'toString',
+ r'()Ljava/lang/String;',
+ );
+
+ static final _toString$1 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >
+ >('globalEnv_CallObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >();
+
+ /// from: `public java.lang.String toString()`
+ /// The returned object must be released after use, by calling the [release] method.
+ jni$_.JString? toString$1() {
+ return _toString$1(
+ reference.pointer,
+ _id_toString$1 as jni$_.JMethodIDPtr,
+ ).object(const jni$_.$JString$NullableType$());
+ }
+
+ static final _id_toString$2 = _class.instanceMethodId(
+ r'toString',
+ r'(I)Ljava/lang/String;',
+ );
+
+ static final _toString$2 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Int32,)>,
+ )
+ >
+ >('globalEnv_CallObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ int,
+ )
+ >();
+
+ /// from: `public java.lang.String toString(int i)`
+ /// The returned object must be released after use, by calling the [release] method.
+ jni$_.JString? toString$2(int i) {
+ return _toString$2(
+ reference.pointer,
+ _id_toString$2 as jni$_.JMethodIDPtr,
+ i,
+ ).object(const jni$_.$JString$NullableType$());
+ }
+
+ static final _id_toString$3 = _class.instanceMethodId(
+ r'toString',
+ r'(Ljava/lang/String;)Ljava/lang/String;',
+ );
+
+ static final _toString$3 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `public java.lang.String toString(java.lang.String string)`
+ /// The returned object must be released after use, by calling the [release] method.
+ jni$_.JString? toString$3(jni$_.JString? string) {
+ final _$string = string?.reference ?? jni$_.jNullReference;
+ return _toString$3(
+ reference.pointer,
+ _id_toString$3 as jni$_.JMethodIDPtr,
+ _$string.pointer,
+ ).object(const jni$_.$JString$NullableType$());
+ }
+
+ static final _id_toString$4 = _class.instanceMethodId(
+ r'toString',
+ r'(Ljava/nio/charset/Charset;)Ljava/lang/String;',
+ );
+
+ static final _toString$4 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `public java.lang.String toString(java.nio.charset.Charset charset)`
+ /// The returned object must be released after use, by calling the [release] method.
+ jni$_.JString? toString$4(jni$_.JObject? charset) {
+ final _$charset = charset?.reference ?? jni$_.jNullReference;
+ return _toString$4(
+ reference.pointer,
+ _id_toString$4 as jni$_.JMethodIDPtr,
+ _$charset.pointer,
+ ).object(const jni$_.$JString$NullableType$());
+ }
+
+ static final _id_write = _class.instanceMethodId(r'write', r'([BII)V');
+
+ static final _write =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<
+ (jni$_.Pointer, jni$_.Int32, jni$_.Int32)
+ >,
+ )
+ >
+ >('globalEnv_CallVoidMethod')
+ .asFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ int,
+ int,
+ )
+ >();
+
+ /// from: `public void write(byte[] bs, int i, int i1)`
+ void write(jni$_.JByteArray? bs, int i, int i1) {
+ final _$bs = bs?.reference ?? jni$_.jNullReference;
+ _write(
+ reference.pointer,
+ _id_write as jni$_.JMethodIDPtr,
+ _$bs.pointer,
+ i,
+ i1,
+ ).check();
+ }
+
+ static final _id_write$1 = _class.instanceMethodId(r'write', r'(I)V');
+
+ static final _write$1 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Int32,)>,
+ )
+ >
+ >('globalEnv_CallVoidMethod')
+ .asFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ int,
+ )
+ >();
+
+ /// from: `public void write(int i)`
+ void write$1(int i) {
+ _write$1(reference.pointer, _id_write$1 as jni$_.JMethodIDPtr, i).check();
+ }
+
+ static final _id_writeBytes = _class.instanceMethodId(
+ r'writeBytes',
+ r'([B)V',
+ );
+
+ static final _writeBytes =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallVoidMethod')
+ .asFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `public void writeBytes(byte[] bs)`
+ void writeBytes(jni$_.JByteArray? bs) {
+ final _$bs = bs?.reference ?? jni$_.jNullReference;
+ _writeBytes(
+ reference.pointer,
+ _id_writeBytes as jni$_.JMethodIDPtr,
+ _$bs.pointer,
+ ).check();
+ }
+
+ static final _id_writeTo = _class.instanceMethodId(
+ r'writeTo',
+ r'(Ljava/io/OutputStream;)V',
+ );
+
+ static final _writeTo =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallVoidMethod')
+ .asFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `public void writeTo(java.io.OutputStream outputStream)`
+ void writeTo(jni$_.JObject? outputStream) {
+ final _$outputStream = outputStream?.reference ?? jni$_.jNullReference;
+ _writeTo(
+ reference.pointer,
+ _id_writeTo as jni$_.JMethodIDPtr,
+ _$outputStream.pointer,
+ ).check();
+ }
+}
+
+final class $ByteArrayOutputStream$NullableType$
+ extends jni$_.JType {
+ @jni$_.internal
+ const $ByteArrayOutputStream$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ String get signature => r'Ljava/io/ByteArrayOutputStream;';
+
+ @jni$_.internal
+ @core$_.override
+ ByteArrayOutputStream? fromReference(jni$_.JReference reference) =>
+ reference.isNull ? null : ByteArrayOutputStream.fromReference(reference);
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get superType => const jni$_.$JObject$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get nullableType => this;
+
+ @jni$_.internal
+ @core$_.override
+ final superCount = 1;
+
+ @core$_.override
+ int get hashCode => ($ByteArrayOutputStream$NullableType$).hashCode;
+
+ @core$_.override
+ bool operator ==(Object other) {
+ return other.runtimeType == ($ByteArrayOutputStream$NullableType$) &&
+ other is $ByteArrayOutputStream$NullableType$;
+ }
+}
+
+final class $ByteArrayOutputStream$Type$
+ extends jni$_.JType {
+ @jni$_.internal
+ const $ByteArrayOutputStream$Type$();
+
+ @jni$_.internal
+ @core$_.override
+ String get signature => r'Ljava/io/ByteArrayOutputStream;';
+
+ @jni$_.internal
+ @core$_.override
+ ByteArrayOutputStream fromReference(jni$_.JReference reference) =>
+ ByteArrayOutputStream.fromReference(reference);
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get superType => const jni$_.$JObject$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get nullableType =>
+ const $ByteArrayOutputStream$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ final superCount = 1;
+
+ @core$_.override
+ int get hashCode => ($ByteArrayOutputStream$Type$).hashCode;
+
+ @core$_.override
+ bool operator ==(Object other) {
+ return other.runtimeType == ($ByteArrayOutputStream$Type$) &&
+ other is $ByteArrayOutputStream$Type$;
+ }
+}
+
+/// from: `android.graphics.BitmapFactory$Options`
+class BitmapFactory$Options extends jni$_.JObject {
+ @jni$_.internal
+ @core$_.override
+ final jni$_.JType $type;
+
+ @jni$_.internal
+ BitmapFactory$Options.fromReference(jni$_.JReference reference)
+ : $type = type,
+ super.fromReference(reference);
+
+ static final _class = jni$_.JClass.forName(
+ r'android/graphics/BitmapFactory$Options',
+ );
+
+ /// The type which includes information such as the signature of this class.
+ static const jni$_.JType nullableType =
+ $BitmapFactory$Options$NullableType$();
+
+ /// The type which includes information such as the signature of this class.
+ static const jni$_.JType type =
+ $BitmapFactory$Options$Type$();
+ static final _id_inBitmap = _class.instanceFieldId(
+ r'inBitmap',
+ r'Landroid/graphics/Bitmap;',
+ );
+
+ /// from: `public android.graphics.Bitmap inBitmap`
+ /// The returned object must be released after use, by calling the [release] method.
+ Bitmap? get inBitmap => _id_inBitmap.get(this, const $Bitmap$NullableType$());
+
+ /// from: `public android.graphics.Bitmap inBitmap`
+ /// The returned object must be released after use, by calling the [release] method.
+ set inBitmap(Bitmap? value) =>
+ _id_inBitmap.set(this, const $Bitmap$NullableType$(), value);
+
+ static final _id_inDensity = _class.instanceFieldId(r'inDensity', r'I');
+
+ /// from: `public int inDensity`
+ int get inDensity => _id_inDensity.get(this, const jni$_.jintType());
+
+ /// from: `public int inDensity`
+ set inDensity(int value) =>
+ _id_inDensity.set(this, const jni$_.jintType(), value);
+
+ static final _id_inDither = _class.instanceFieldId(r'inDither', r'Z');
+
+ /// from: `public boolean inDither`
+ bool get inDither => _id_inDither.get(this, const jni$_.jbooleanType());
+
+ /// from: `public boolean inDither`
+ set inDither(bool value) =>
+ _id_inDither.set(this, const jni$_.jbooleanType(), value);
+
+ static final _id_inInputShareable = _class.instanceFieldId(
+ r'inInputShareable',
+ r'Z',
+ );
+
+ /// from: `public boolean inInputShareable`
+ bool get inInputShareable =>
+ _id_inInputShareable.get(this, const jni$_.jbooleanType());
+
+ /// from: `public boolean inInputShareable`
+ set inInputShareable(bool value) =>
+ _id_inInputShareable.set(this, const jni$_.jbooleanType(), value);
+
+ static final _id_inJustDecodeBounds = _class.instanceFieldId(
+ r'inJustDecodeBounds',
+ r'Z',
+ );
+
+ /// from: `public boolean inJustDecodeBounds`
+ bool get inJustDecodeBounds =>
+ _id_inJustDecodeBounds.get(this, const jni$_.jbooleanType());
+
+ /// from: `public boolean inJustDecodeBounds`
+ set inJustDecodeBounds(bool value) =>
+ _id_inJustDecodeBounds.set(this, const jni$_.jbooleanType(), value);
+
+ static final _id_inMutable = _class.instanceFieldId(r'inMutable', r'Z');
+
+ /// from: `public boolean inMutable`
+ bool get inMutable => _id_inMutable.get(this, const jni$_.jbooleanType());
+
+ /// from: `public boolean inMutable`
+ set inMutable(bool value) =>
+ _id_inMutable.set(this, const jni$_.jbooleanType(), value);
+
+ static final _id_inPreferQualityOverSpeed = _class.instanceFieldId(
+ r'inPreferQualityOverSpeed',
+ r'Z',
+ );
+
+ /// from: `public boolean inPreferQualityOverSpeed`
+ bool get inPreferQualityOverSpeed =>
+ _id_inPreferQualityOverSpeed.get(this, const jni$_.jbooleanType());
+
+ /// from: `public boolean inPreferQualityOverSpeed`
+ set inPreferQualityOverSpeed(bool value) =>
+ _id_inPreferQualityOverSpeed.set(this, const jni$_.jbooleanType(), value);
+
+ static final _id_inPreferredColorSpace = _class.instanceFieldId(
+ r'inPreferredColorSpace',
+ r'Landroid/graphics/ColorSpace;',
+ );
+
+ /// from: `public android.graphics.ColorSpace inPreferredColorSpace`
+ /// The returned object must be released after use, by calling the [release] method.
+ jni$_.JObject? get inPreferredColorSpace =>
+ _id_inPreferredColorSpace.get(this, const jni$_.$JObject$NullableType$());
+
+ /// from: `public android.graphics.ColorSpace inPreferredColorSpace`
+ /// The returned object must be released after use, by calling the [release] method.
+ set inPreferredColorSpace(jni$_.JObject? value) => _id_inPreferredColorSpace
+ .set(this, const jni$_.$JObject$NullableType$(), value);
+
+ static final _id_inPreferredConfig = _class.instanceFieldId(
+ r'inPreferredConfig',
+ r'Landroid/graphics/Bitmap$Config;',
+ );
+
+ /// from: `public android.graphics.Bitmap$Config inPreferredConfig`
+ /// The returned object must be released after use, by calling the [release] method.
+ Bitmap$Config? get inPreferredConfig =>
+ _id_inPreferredConfig.get(this, const $Bitmap$Config$NullableType$());
+
+ /// from: `public android.graphics.Bitmap$Config inPreferredConfig`
+ /// The returned object must be released after use, by calling the [release] method.
+ set inPreferredConfig(Bitmap$Config? value) => _id_inPreferredConfig.set(
+ this,
+ const $Bitmap$Config$NullableType$(),
+ value,
+ );
+
+ static final _id_inPremultiplied = _class.instanceFieldId(
+ r'inPremultiplied',
+ r'Z',
+ );
+
+ /// from: `public boolean inPremultiplied`
+ bool get inPremultiplied =>
+ _id_inPremultiplied.get(this, const jni$_.jbooleanType());
+
+ /// from: `public boolean inPremultiplied`
+ set inPremultiplied(bool value) =>
+ _id_inPremultiplied.set(this, const jni$_.jbooleanType(), value);
+
+ static final _id_inPurgeable = _class.instanceFieldId(r'inPurgeable', r'Z');
+
+ /// from: `public boolean inPurgeable`
+ bool get inPurgeable => _id_inPurgeable.get(this, const jni$_.jbooleanType());
+
+ /// from: `public boolean inPurgeable`
+ set inPurgeable(bool value) =>
+ _id_inPurgeable.set(this, const jni$_.jbooleanType(), value);
+
+ static final _id_inSampleSize = _class.instanceFieldId(r'inSampleSize', r'I');
+
+ /// from: `public int inSampleSize`
+ int get inSampleSize => _id_inSampleSize.get(this, const jni$_.jintType());
+
+ /// from: `public int inSampleSize`
+ set inSampleSize(int value) =>
+ _id_inSampleSize.set(this, const jni$_.jintType(), value);
+
+ static final _id_inScaled = _class.instanceFieldId(r'inScaled', r'Z');
+
+ /// from: `public boolean inScaled`
+ bool get inScaled => _id_inScaled.get(this, const jni$_.jbooleanType());
+
+ /// from: `public boolean inScaled`
+ set inScaled(bool value) =>
+ _id_inScaled.set(this, const jni$_.jbooleanType(), value);
+
+ static final _id_inScreenDensity = _class.instanceFieldId(
+ r'inScreenDensity',
+ r'I',
+ );
+
+ /// from: `public int inScreenDensity`
+ int get inScreenDensity =>
+ _id_inScreenDensity.get(this, const jni$_.jintType());
+
+ /// from: `public int inScreenDensity`
+ set inScreenDensity(int value) =>
+ _id_inScreenDensity.set(this, const jni$_.jintType(), value);
+
+ static final _id_inTargetDensity = _class.instanceFieldId(
+ r'inTargetDensity',
+ r'I',
+ );
+
+ /// from: `public int inTargetDensity`
+ int get inTargetDensity =>
+ _id_inTargetDensity.get(this, const jni$_.jintType());
+
+ /// from: `public int inTargetDensity`
+ set inTargetDensity(int value) =>
+ _id_inTargetDensity.set(this, const jni$_.jintType(), value);
+
+ static final _id_inTempStorage = _class.instanceFieldId(
+ r'inTempStorage',
+ r'[B',
+ );
+
+ /// from: `public byte[] inTempStorage`
+ /// The returned object must be released after use, by calling the [release] method.
+ jni$_.JByteArray? get inTempStorage =>
+ _id_inTempStorage.get(this, const jni$_.$JByteArray$NullableType$());
+
+ /// from: `public byte[] inTempStorage`
+ /// The returned object must be released after use, by calling the [release] method.
+ set inTempStorage(jni$_.JByteArray? value) => _id_inTempStorage.set(
+ this,
+ const jni$_.$JByteArray$NullableType$(),
+ value,
+ );
+
+ static final _id_mCancel = _class.instanceFieldId(r'mCancel', r'Z');
+
+ /// from: `public boolean mCancel`
+ bool get mCancel => _id_mCancel.get(this, const jni$_.jbooleanType());
+
+ /// from: `public boolean mCancel`
+ set mCancel(bool value) =>
+ _id_mCancel.set(this, const jni$_.jbooleanType(), value);
+
+ static final _id_outColorSpace = _class.instanceFieldId(
+ r'outColorSpace',
+ r'Landroid/graphics/ColorSpace;',
+ );
+
+ /// from: `public android.graphics.ColorSpace outColorSpace`
+ /// The returned object must be released after use, by calling the [release] method.
+ jni$_.JObject? get outColorSpace =>
+ _id_outColorSpace.get(this, const jni$_.$JObject$NullableType$());
+
+ /// from: `public android.graphics.ColorSpace outColorSpace`
+ /// The returned object must be released after use, by calling the [release] method.
+ set outColorSpace(jni$_.JObject? value) =>
+ _id_outColorSpace.set(this, const jni$_.$JObject$NullableType$(), value);
+
+ static final _id_outConfig = _class.instanceFieldId(
+ r'outConfig',
+ r'Landroid/graphics/Bitmap$Config;',
+ );
+
+ /// from: `public android.graphics.Bitmap$Config outConfig`
+ /// The returned object must be released after use, by calling the [release] method.
+ Bitmap$Config? get outConfig =>
+ _id_outConfig.get(this, const $Bitmap$Config$NullableType$());
+
+ /// from: `public android.graphics.Bitmap$Config outConfig`
+ /// The returned object must be released after use, by calling the [release] method.
+ set outConfig(Bitmap$Config? value) =>
+ _id_outConfig.set(this, const $Bitmap$Config$NullableType$(), value);
+
+ static final _id_outHeight = _class.instanceFieldId(r'outHeight', r'I');
+
+ /// from: `public int outHeight`
+ int get outHeight => _id_outHeight.get(this, const jni$_.jintType());
+
+ /// from: `public int outHeight`
+ set outHeight(int value) =>
+ _id_outHeight.set(this, const jni$_.jintType(), value);
+
+ static final _id_outMimeType = _class.instanceFieldId(
+ r'outMimeType',
+ r'Ljava/lang/String;',
+ );
+
+ /// from: `public java.lang.String outMimeType`
+ /// The returned object must be released after use, by calling the [release] method.
+ jni$_.JString? get outMimeType =>
+ _id_outMimeType.get(this, const jni$_.$JString$NullableType$());
+
+ /// from: `public java.lang.String outMimeType`
+ /// The returned object must be released after use, by calling the [release] method.
+ set outMimeType(jni$_.JString? value) =>
+ _id_outMimeType.set(this, const jni$_.$JString$NullableType$(), value);
+
+ static final _id_outWidth = _class.instanceFieldId(r'outWidth', r'I');
+
+ /// from: `public int outWidth`
+ int get outWidth => _id_outWidth.get(this, const jni$_.jintType());
+
+ /// from: `public int outWidth`
+ set outWidth(int value) =>
+ _id_outWidth.set(this, const jni$_.jintType(), value);
+
+ static final _id_new$ = _class.constructorId(r'()V');
+
+ static final _new$ =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >
+ >('globalEnv_NewObject')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >();
+
+ /// from: `public void ()`
+ /// The returned object must be released after use, by calling the [release] method.
+ factory BitmapFactory$Options() {
+ return BitmapFactory$Options.fromReference(
+ _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr).reference,
+ );
+ }
+
+ static final _id_requestCancelDecode = _class.instanceMethodId(
+ r'requestCancelDecode',
+ r'()V',
+ );
+
+ static final _requestCancelDecode =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >
+ >('globalEnv_CallVoidMethod')
+ .asFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >();
+
+ /// from: `public void requestCancelDecode()`
+ void requestCancelDecode() {
+ _requestCancelDecode(
+ reference.pointer,
+ _id_requestCancelDecode as jni$_.JMethodIDPtr,
+ ).check();
+ }
+}
+
+final class $BitmapFactory$Options$NullableType$
+ extends jni$_.JType {
+ @jni$_.internal
+ const $BitmapFactory$Options$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ String get signature => r'Landroid/graphics/BitmapFactory$Options;';
+
+ @jni$_.internal
+ @core$_.override
+ BitmapFactory$Options? fromReference(jni$_.JReference reference) =>
+ reference.isNull ? null : BitmapFactory$Options.fromReference(reference);
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get superType => const jni$_.$JObject$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get nullableType => this;
+
+ @jni$_.internal
+ @core$_.override
+ final superCount = 1;
+
+ @core$_.override
+ int get hashCode => ($BitmapFactory$Options$NullableType$).hashCode;
+
+ @core$_.override
+ bool operator ==(Object other) {
+ return other.runtimeType == ($BitmapFactory$Options$NullableType$) &&
+ other is $BitmapFactory$Options$NullableType$;
+ }
+}
+
+final class $BitmapFactory$Options$Type$
+ extends jni$_.JType {
+ @jni$_.internal
+ const $BitmapFactory$Options$Type$();
+
+ @jni$_.internal
+ @core$_.override
+ String get signature => r'Landroid/graphics/BitmapFactory$Options;';
+
+ @jni$_.internal
+ @core$_.override
+ BitmapFactory$Options fromReference(jni$_.JReference reference) =>
+ BitmapFactory$Options.fromReference(reference);
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get superType => const jni$_.$JObject$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get nullableType =>
+ const $BitmapFactory$Options$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ final superCount = 1;
+
+ @core$_.override
+ int get hashCode => ($BitmapFactory$Options$Type$).hashCode;
+
+ @core$_.override
+ bool operator ==(Object other) {
+ return other.runtimeType == ($BitmapFactory$Options$Type$) &&
+ other is $BitmapFactory$Options$Type$;
+ }
+}
+
+/// from: `android.graphics.BitmapFactory`
+class BitmapFactory extends jni$_.JObject {
+ @jni$_.internal
+ @core$_.override
+ final jni$_.JType $type;
+
+ @jni$_.internal
+ BitmapFactory.fromReference(jni$_.JReference reference)
+ : $type = type,
+ super.fromReference(reference);
+
+ static final _class = jni$_.JClass.forName(r'android/graphics/BitmapFactory');
+
+ /// The type which includes information such as the signature of this class.
+ static const jni$_.JType nullableType =
+ $BitmapFactory$NullableType$();
+
+ /// The type which includes information such as the signature of this class.
+ static const jni$_.JType type = $BitmapFactory$Type$();
+ static final _id_new$ = _class.constructorId(r'()V');
+
+ static final _new$ =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >
+ >('globalEnv_NewObject')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >();
+
+ /// from: `public void ()`
+ /// The returned object must be released after use, by calling the [release] method.
+ factory BitmapFactory() {
+ return BitmapFactory.fromReference(
+ _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr).reference,
+ );
+ }
+
+ static final _id_decodeByteArray = _class.staticMethodId(
+ r'decodeByteArray',
+ r'([BII)Landroid/graphics/Bitmap;',
+ );
+
+ static final _decodeByteArray =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<
+ (jni$_.Pointer, jni$_.Int32, jni$_.Int32)
+ >,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ int,
+ int,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap decodeByteArray(byte[] bs, int i, int i1)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? decodeByteArray(jni$_.JByteArray? bs, int i, int i1) {
+ final _$bs = bs?.reference ?? jni$_.jNullReference;
+ return _decodeByteArray(
+ _class.reference.pointer,
+ _id_decodeByteArray as jni$_.JMethodIDPtr,
+ _$bs.pointer,
+ i,
+ i1,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_decodeByteArray$1 = _class.staticMethodId(
+ r'decodeByteArray',
+ r'([BIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;',
+ );
+
+ static final _decodeByteArray$1 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<
+ (
+ jni$_.Pointer,
+ jni$_.Int32,
+ jni$_.Int32,
+ jni$_.Pointer,
+ )
+ >,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ int,
+ int,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap decodeByteArray(byte[] bs, int i, int i1, android.graphics.BitmapFactory$Options options)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? decodeByteArray$1(
+ jni$_.JByteArray? bs,
+ int i,
+ int i1,
+ BitmapFactory$Options? options,
+ ) {
+ final _$bs = bs?.reference ?? jni$_.jNullReference;
+ final _$options = options?.reference ?? jni$_.jNullReference;
+ return _decodeByteArray$1(
+ _class.reference.pointer,
+ _id_decodeByteArray$1 as jni$_.JMethodIDPtr,
+ _$bs.pointer,
+ i,
+ i1,
+ _$options.pointer,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_decodeFile = _class.staticMethodId(
+ r'decodeFile',
+ r'(Ljava/lang/String;)Landroid/graphics/Bitmap;',
+ );
+
+ static final _decodeFile =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap decodeFile(java.lang.String string)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? decodeFile(jni$_.JString? string) {
+ final _$string = string?.reference ?? jni$_.jNullReference;
+ return _decodeFile(
+ _class.reference.pointer,
+ _id_decodeFile as jni$_.JMethodIDPtr,
+ _$string.pointer,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_decodeFile$1 = _class.staticMethodId(
+ r'decodeFile',
+ r'(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;',
+ );
+
+ static final _decodeFile$1 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<
+ (jni$_.Pointer, jni$_.Pointer)
+ >,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap decodeFile(java.lang.String string, android.graphics.BitmapFactory$Options options)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? decodeFile$1(
+ jni$_.JString? string,
+ BitmapFactory$Options? options,
+ ) {
+ final _$string = string?.reference ?? jni$_.jNullReference;
+ final _$options = options?.reference ?? jni$_.jNullReference;
+ return _decodeFile$1(
+ _class.reference.pointer,
+ _id_decodeFile$1 as jni$_.JMethodIDPtr,
+ _$string.pointer,
+ _$options.pointer,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_decodeFileDescriptor = _class.staticMethodId(
+ r'decodeFileDescriptor',
+ r'(Ljava/io/FileDescriptor;)Landroid/graphics/Bitmap;',
+ );
+
+ static final _decodeFileDescriptor =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap decodeFileDescriptor(java.io.FileDescriptor fileDescriptor)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? decodeFileDescriptor(jni$_.JObject? fileDescriptor) {
+ final _$fileDescriptor = fileDescriptor?.reference ?? jni$_.jNullReference;
+ return _decodeFileDescriptor(
+ _class.reference.pointer,
+ _id_decodeFileDescriptor as jni$_.JMethodIDPtr,
+ _$fileDescriptor.pointer,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_decodeFileDescriptor$1 = _class.staticMethodId(
+ r'decodeFileDescriptor',
+ r'(Ljava/io/FileDescriptor;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;',
+ );
+
+ static final _decodeFileDescriptor$1 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<
+ (
+ jni$_.Pointer,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ )
+ >,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap decodeFileDescriptor(java.io.FileDescriptor fileDescriptor, android.graphics.Rect rect, android.graphics.BitmapFactory$Options options)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? decodeFileDescriptor$1(
+ jni$_.JObject? fileDescriptor,
+ jni$_.JObject? rect,
+ BitmapFactory$Options? options,
+ ) {
+ final _$fileDescriptor = fileDescriptor?.reference ?? jni$_.jNullReference;
+ final _$rect = rect?.reference ?? jni$_.jNullReference;
+ final _$options = options?.reference ?? jni$_.jNullReference;
+ return _decodeFileDescriptor$1(
+ _class.reference.pointer,
+ _id_decodeFileDescriptor$1 as jni$_.JMethodIDPtr,
+ _$fileDescriptor.pointer,
+ _$rect.pointer,
+ _$options.pointer,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_decodeResource = _class.staticMethodId(
+ r'decodeResource',
+ r'(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;',
+ );
+
+ static final _decodeResource =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer, jni$_.Int32)>,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ int,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap decodeResource(android.content.res.Resources resources, int i)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? decodeResource(jni$_.JObject? resources, int i) {
+ final _$resources = resources?.reference ?? jni$_.jNullReference;
+ return _decodeResource(
+ _class.reference.pointer,
+ _id_decodeResource as jni$_.JMethodIDPtr,
+ _$resources.pointer,
+ i,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_decodeResource$1 = _class.staticMethodId(
+ r'decodeResource',
+ r'(Landroid/content/res/Resources;ILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;',
+ );
+
+ static final _decodeResource$1 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<
+ (
+ jni$_.Pointer,
+ jni$_.Int32,
+ jni$_.Pointer,
+ )
+ >,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ int,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap decodeResource(android.content.res.Resources resources, int i, android.graphics.BitmapFactory$Options options)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? decodeResource$1(
+ jni$_.JObject? resources,
+ int i,
+ BitmapFactory$Options? options,
+ ) {
+ final _$resources = resources?.reference ?? jni$_.jNullReference;
+ final _$options = options?.reference ?? jni$_.jNullReference;
+ return _decodeResource$1(
+ _class.reference.pointer,
+ _id_decodeResource$1 as jni$_.JMethodIDPtr,
+ _$resources.pointer,
+ i,
+ _$options.pointer,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_decodeResourceStream = _class.staticMethodId(
+ r'decodeResourceStream',
+ r'(Landroid/content/res/Resources;Landroid/util/TypedValue;Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;',
+ );
+
+ static final _decodeResourceStream =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<
+ (
+ jni$_.Pointer,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ )
+ >,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap decodeResourceStream(android.content.res.Resources resources, android.util.TypedValue typedValue, java.io.InputStream inputStream, android.graphics.Rect rect, android.graphics.BitmapFactory$Options options)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? decodeResourceStream(
+ jni$_.JObject? resources,
+ jni$_.JObject? typedValue,
+ jni$_.JObject? inputStream,
+ jni$_.JObject? rect,
+ BitmapFactory$Options? options,
+ ) {
+ final _$resources = resources?.reference ?? jni$_.jNullReference;
+ final _$typedValue = typedValue?.reference ?? jni$_.jNullReference;
+ final _$inputStream = inputStream?.reference ?? jni$_.jNullReference;
+ final _$rect = rect?.reference ?? jni$_.jNullReference;
+ final _$options = options?.reference ?? jni$_.jNullReference;
+ return _decodeResourceStream(
+ _class.reference.pointer,
+ _id_decodeResourceStream as jni$_.JMethodIDPtr,
+ _$resources.pointer,
+ _$typedValue.pointer,
+ _$inputStream.pointer,
+ _$rect.pointer,
+ _$options.pointer,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_decodeStream = _class.staticMethodId(
+ r'decodeStream',
+ r'(Ljava/io/InputStream;)Landroid/graphics/Bitmap;',
+ );
+
+ static final _decodeStream =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap decodeStream(java.io.InputStream inputStream)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? decodeStream(jni$_.JObject? inputStream) {
+ final _$inputStream = inputStream?.reference ?? jni$_.jNullReference;
+ return _decodeStream(
+ _class.reference.pointer,
+ _id_decodeStream as jni$_.JMethodIDPtr,
+ _$inputStream.pointer,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_decodeStream$1 = _class.staticMethodId(
+ r'decodeStream',
+ r'(Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;',
+ );
+
+ static final _decodeStream$1 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<
+ (
+ jni$_.Pointer,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ )
+ >,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap decodeStream(java.io.InputStream inputStream, android.graphics.Rect rect, android.graphics.BitmapFactory$Options options)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? decodeStream$1(
+ jni$_.JObject? inputStream,
+ jni$_.JObject? rect,
+ BitmapFactory$Options? options,
+ ) {
+ final _$inputStream = inputStream?.reference ?? jni$_.jNullReference;
+ final _$rect = rect?.reference ?? jni$_.jNullReference;
+ final _$options = options?.reference ?? jni$_.jNullReference;
+ return _decodeStream$1(
+ _class.reference.pointer,
+ _id_decodeStream$1 as jni$_.JMethodIDPtr,
+ _$inputStream.pointer,
+ _$rect.pointer,
+ _$options.pointer,
+ ).object(const $Bitmap$NullableType$());
+ }
+}
+
+final class $BitmapFactory$NullableType$ extends jni$_.JType {
+ @jni$_.internal
+ const $BitmapFactory$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ String get signature => r'Landroid/graphics/BitmapFactory;';
+
+ @jni$_.internal
+ @core$_.override
+ BitmapFactory? fromReference(jni$_.JReference reference) =>
+ reference.isNull ? null : BitmapFactory.fromReference(reference);
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get superType => const jni$_.$JObject$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get nullableType => this;
+
+ @jni$_.internal
+ @core$_.override
+ final superCount = 1;
+
+ @core$_.override
+ int get hashCode => ($BitmapFactory$NullableType$).hashCode;
+
+ @core$_.override
+ bool operator ==(Object other) {
+ return other.runtimeType == ($BitmapFactory$NullableType$) &&
+ other is $BitmapFactory$NullableType$;
+ }
+}
+
+final class $BitmapFactory$Type$ extends jni$_.JType {
+ @jni$_.internal
+ const $BitmapFactory$Type$();
+
+ @jni$_.internal
+ @core$_.override
+ String get signature => r'Landroid/graphics/BitmapFactory;';
+
+ @jni$_.internal
+ @core$_.override
+ BitmapFactory fromReference(jni$_.JReference reference) =>
+ BitmapFactory.fromReference(reference);
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get superType => const jni$_.$JObject$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get nullableType =>
+ const $BitmapFactory$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ final superCount = 1;
+
+ @core$_.override
+ int get hashCode => ($BitmapFactory$Type$).hashCode;
+
+ @core$_.override
+ bool operator ==(Object other) {
+ return other.runtimeType == ($BitmapFactory$Type$) &&
+ other is $BitmapFactory$Type$;
+ }
+}
+
+/// from: `android.graphics.Bitmap$CompressFormat`
+class Bitmap$CompressFormat extends jni$_.JObject {
+ @jni$_.internal
+ @core$_.override
+ final jni$_.JType $type;
+
+ @jni$_.internal
+ Bitmap$CompressFormat.fromReference(jni$_.JReference reference)
+ : $type = type,
+ super.fromReference(reference);
+
+ static final _class = jni$_.JClass.forName(
+ r'android/graphics/Bitmap$CompressFormat',
+ );
+
+ /// The type which includes information such as the signature of this class.
+ static const jni$_.JType nullableType =
+ $Bitmap$CompressFormat$NullableType$();
+
+ /// The type which includes information such as the signature of this class.
+ static const jni$_.JType type =
+ $Bitmap$CompressFormat$Type$();
+ static final _id_JPEG = _class.staticFieldId(
+ r'JPEG',
+ r'Landroid/graphics/Bitmap$CompressFormat;',
+ );
+
+ /// from: `static public final android.graphics.Bitmap$CompressFormat JPEG`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$CompressFormat get JPEG =>
+ _id_JPEG.get(_class, const $Bitmap$CompressFormat$Type$());
+
+ static final _id_PNG = _class.staticFieldId(
+ r'PNG',
+ r'Landroid/graphics/Bitmap$CompressFormat;',
+ );
+
+ /// from: `static public final android.graphics.Bitmap$CompressFormat PNG`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$CompressFormat get PNG =>
+ _id_PNG.get(_class, const $Bitmap$CompressFormat$Type$());
+
+ static final _id_WEBP = _class.staticFieldId(
+ r'WEBP',
+ r'Landroid/graphics/Bitmap$CompressFormat;',
+ );
+
+ /// from: `static public final android.graphics.Bitmap$CompressFormat WEBP`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$CompressFormat get WEBP =>
+ _id_WEBP.get(_class, const $Bitmap$CompressFormat$Type$());
+
+ static final _id_WEBP_LOSSLESS = _class.staticFieldId(
+ r'WEBP_LOSSLESS',
+ r'Landroid/graphics/Bitmap$CompressFormat;',
+ );
+
+ /// from: `static public final android.graphics.Bitmap$CompressFormat WEBP_LOSSLESS`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$CompressFormat get WEBP_LOSSLESS =>
+ _id_WEBP_LOSSLESS.get(_class, const $Bitmap$CompressFormat$Type$());
+
+ static final _id_WEBP_LOSSY = _class.staticFieldId(
+ r'WEBP_LOSSY',
+ r'Landroid/graphics/Bitmap$CompressFormat;',
+ );
+
+ /// from: `static public final android.graphics.Bitmap$CompressFormat WEBP_LOSSY`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$CompressFormat get WEBP_LOSSY =>
+ _id_WEBP_LOSSY.get(_class, const $Bitmap$CompressFormat$Type$());
+
+ static final _id_values = _class.staticMethodId(
+ r'values',
+ r'()[Landroid/graphics/Bitmap$CompressFormat;',
+ );
+
+ static final _values =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap$CompressFormat[] values()`
+ /// The returned object must be released after use, by calling the [release] method.
+ static jni$_.JArray? values() {
+ return _values(
+ _class.reference.pointer,
+ _id_values as jni$_.JMethodIDPtr,
+ ).object?>(
+ const jni$_.$JArray$NullableType$(
+ $Bitmap$CompressFormat$NullableType$(),
+ ),
+ );
+ }
+
+ static final _id_valueOf = _class.staticMethodId(
+ r'valueOf',
+ r'(Ljava/lang/String;)Landroid/graphics/Bitmap$CompressFormat;',
+ );
+
+ static final _valueOf =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap$CompressFormat valueOf(java.lang.String synthetic)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$CompressFormat? valueOf(jni$_.JString? synthetic) {
+ final _$synthetic = synthetic?.reference ?? jni$_.jNullReference;
+ return _valueOf(
+ _class.reference.pointer,
+ _id_valueOf as jni$_.JMethodIDPtr,
+ _$synthetic.pointer,
+ ).object(
+ const $Bitmap$CompressFormat$NullableType$(),
+ );
+ }
+}
+
+final class $Bitmap$CompressFormat$NullableType$
+ extends jni$_.JType {
+ @jni$_.internal
+ const $Bitmap$CompressFormat$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ String get signature => r'Landroid/graphics/Bitmap$CompressFormat;';
+
+ @jni$_.internal
+ @core$_.override
+ Bitmap$CompressFormat? fromReference(jni$_.JReference reference) =>
+ reference.isNull ? null : Bitmap$CompressFormat.fromReference(reference);
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get superType => const jni$_.$JObject$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get nullableType => this;
+
+ @jni$_.internal
+ @core$_.override
+ final superCount = 1;
+
+ @core$_.override
+ int get hashCode => ($Bitmap$CompressFormat$NullableType$).hashCode;
+
+ @core$_.override
+ bool operator ==(Object other) {
+ return other.runtimeType == ($Bitmap$CompressFormat$NullableType$) &&
+ other is $Bitmap$CompressFormat$NullableType$;
+ }
+}
+
+final class $Bitmap$CompressFormat$Type$
+ extends jni$_.JType {
+ @jni$_.internal
+ const $Bitmap$CompressFormat$Type$();
+
+ @jni$_.internal
+ @core$_.override
+ String get signature => r'Landroid/graphics/Bitmap$CompressFormat;';
+
+ @jni$_.internal
+ @core$_.override
+ Bitmap$CompressFormat fromReference(jni$_.JReference reference) =>
+ Bitmap$CompressFormat.fromReference(reference);
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get superType => const jni$_.$JObject$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get nullableType =>
+ const $Bitmap$CompressFormat$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ final superCount = 1;
+
+ @core$_.override
+ int get hashCode => ($Bitmap$CompressFormat$Type$).hashCode;
+
+ @core$_.override
+ bool operator ==(Object other) {
+ return other.runtimeType == ($Bitmap$CompressFormat$Type$) &&
+ other is $Bitmap$CompressFormat$Type$;
+ }
+}
+
+/// from: `android.graphics.Bitmap$Config`
+class Bitmap$Config extends jni$_.JObject {
+ @jni$_.internal
+ @core$_.override
+ final jni$_.JType $type;
+
+ @jni$_.internal
+ Bitmap$Config.fromReference(jni$_.JReference reference)
+ : $type = type,
+ super.fromReference(reference);
+
+ static final _class = jni$_.JClass.forName(r'android/graphics/Bitmap$Config');
+
+ /// The type which includes information such as the signature of this class.
+ static const jni$_.JType nullableType =
+ $Bitmap$Config$NullableType$();
+
+ /// The type which includes information such as the signature of this class.
+ static const jni$_.JType type = $Bitmap$Config$Type$();
+ static final _id_ALPHA_8 = _class.staticFieldId(
+ r'ALPHA_8',
+ r'Landroid/graphics/Bitmap$Config;',
+ );
+
+ /// from: `static public final android.graphics.Bitmap$Config ALPHA_8`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$Config get ALPHA_8 =>
+ _id_ALPHA_8.get(_class, const $Bitmap$Config$Type$());
+
+ static final _id_ARGB_4444 = _class.staticFieldId(
+ r'ARGB_4444',
+ r'Landroid/graphics/Bitmap$Config;',
+ );
+
+ /// from: `static public final android.graphics.Bitmap$Config ARGB_4444`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$Config get ARGB_4444 =>
+ _id_ARGB_4444.get(_class, const $Bitmap$Config$Type$());
+
+ static final _id_ARGB_8888 = _class.staticFieldId(
+ r'ARGB_8888',
+ r'Landroid/graphics/Bitmap$Config;',
+ );
+
+ /// from: `static public final android.graphics.Bitmap$Config ARGB_8888`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$Config get ARGB_8888 =>
+ _id_ARGB_8888.get(_class, const $Bitmap$Config$Type$());
+
+ static final _id_HARDWARE = _class.staticFieldId(
+ r'HARDWARE',
+ r'Landroid/graphics/Bitmap$Config;',
+ );
+
+ /// from: `static public final android.graphics.Bitmap$Config HARDWARE`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$Config get HARDWARE =>
+ _id_HARDWARE.get(_class, const $Bitmap$Config$Type$());
+
+ static final _id_RGBA_1010102 = _class.staticFieldId(
+ r'RGBA_1010102',
+ r'Landroid/graphics/Bitmap$Config;',
+ );
+
+ /// from: `static public final android.graphics.Bitmap$Config RGBA_1010102`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$Config get RGBA_1010102 =>
+ _id_RGBA_1010102.get(_class, const $Bitmap$Config$Type$());
+
+ static final _id_RGBA_F16 = _class.staticFieldId(
+ r'RGBA_F16',
+ r'Landroid/graphics/Bitmap$Config;',
+ );
+
+ /// from: `static public final android.graphics.Bitmap$Config RGBA_F16`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$Config get RGBA_F16 =>
+ _id_RGBA_F16.get(_class, const $Bitmap$Config$Type$());
+
+ static final _id_RGB_565 = _class.staticFieldId(
+ r'RGB_565',
+ r'Landroid/graphics/Bitmap$Config;',
+ );
+
+ /// from: `static public final android.graphics.Bitmap$Config RGB_565`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$Config get RGB_565 =>
+ _id_RGB_565.get(_class, const $Bitmap$Config$Type$());
+
+ static final _id_values = _class.staticMethodId(
+ r'values',
+ r'()[Landroid/graphics/Bitmap$Config;',
+ );
+
+ static final _values =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap$Config[] values()`
+ /// The returned object must be released after use, by calling the [release] method.
+ static jni$_.JArray? values() {
+ return _values(
+ _class.reference.pointer,
+ _id_values as jni$_.JMethodIDPtr,
+ ).object?>(
+ const jni$_.$JArray$NullableType$(
+ $Bitmap$Config$NullableType$(),
+ ),
+ );
+ }
+
+ static final _id_valueOf = _class.staticMethodId(
+ r'valueOf',
+ r'(Ljava/lang/String;)Landroid/graphics/Bitmap$Config;',
+ );
+
+ static final _valueOf =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap$Config valueOf(java.lang.String synthetic)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap$Config? valueOf(jni$_.JString? synthetic) {
+ final _$synthetic = synthetic?.reference ?? jni$_.jNullReference;
+ return _valueOf(
+ _class.reference.pointer,
+ _id_valueOf as jni$_.JMethodIDPtr,
+ _$synthetic.pointer,
+ ).object(const $Bitmap$Config$NullableType$());
+ }
+}
+
+final class $Bitmap$Config$NullableType$ extends jni$_.JType {
+ @jni$_.internal
+ const $Bitmap$Config$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ String get signature => r'Landroid/graphics/Bitmap$Config;';
+
+ @jni$_.internal
+ @core$_.override
+ Bitmap$Config? fromReference(jni$_.JReference reference) =>
+ reference.isNull ? null : Bitmap$Config.fromReference(reference);
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get superType => const jni$_.$JObject$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get nullableType => this;
+
+ @jni$_.internal
+ @core$_.override
+ final superCount = 1;
+
+ @core$_.override
+ int get hashCode => ($Bitmap$Config$NullableType$).hashCode;
+
+ @core$_.override
+ bool operator ==(Object other) {
+ return other.runtimeType == ($Bitmap$Config$NullableType$) &&
+ other is $Bitmap$Config$NullableType$;
+ }
+}
+
+final class $Bitmap$Config$Type$ extends jni$_.JType {
+ @jni$_.internal
+ const $Bitmap$Config$Type$();
+
+ @jni$_.internal
+ @core$_.override
+ String get signature => r'Landroid/graphics/Bitmap$Config;';
+
+ @jni$_.internal
+ @core$_.override
+ Bitmap$Config fromReference(jni$_.JReference reference) =>
+ Bitmap$Config.fromReference(reference);
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get superType => const jni$_.$JObject$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ jni$_.JType get nullableType =>
+ const $Bitmap$Config$NullableType$();
+
+ @jni$_.internal
+ @core$_.override
+ final superCount = 1;
+
+ @core$_.override
+ int get hashCode => ($Bitmap$Config$Type$).hashCode;
+
+ @core$_.override
+ bool operator ==(Object other) {
+ return other.runtimeType == ($Bitmap$Config$Type$) &&
+ other is $Bitmap$Config$Type$;
+ }
+}
+
+/// from: `android.graphics.Bitmap`
+class Bitmap extends jni$_.JObject {
+ @jni$_.internal
+ @core$_.override
+ final jni$_.JType $type;
+
+ @jni$_.internal
+ Bitmap.fromReference(jni$_.JReference reference)
+ : $type = type,
+ super.fromReference(reference);
+
+ static final _class = jni$_.JClass.forName(r'android/graphics/Bitmap');
+
+ /// The type which includes information such as the signature of this class.
+ static const jni$_.JType nullableType = $Bitmap$NullableType$();
+
+ /// The type which includes information such as the signature of this class.
+ static const jni$_.JType type = $Bitmap$Type$();
+ static final _id_CREATOR = _class.staticFieldId(
+ r'CREATOR',
+ r'Landroid/os/Parcelable$Creator;',
+ );
+
+ /// from: `static public final android.os.Parcelable$Creator CREATOR`
+ /// The returned object must be released after use, by calling the [release] method.
+ static jni$_.JObject? get CREATOR =>
+ _id_CREATOR.get(_class, const jni$_.$JObject$NullableType$());
+
+ /// from: `static public final int DENSITY_NONE`
+ static const DENSITY_NONE = 0;
+ static final _id_asShared = _class.instanceMethodId(
+ r'asShared',
+ r'()Landroid/graphics/Bitmap;',
+ );
+
+ static final _asShared =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >
+ >('globalEnv_CallObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ )
+ >();
+
+ /// from: `public android.graphics.Bitmap asShared()`
+ /// The returned object must be released after use, by calling the [release] method.
+ Bitmap? asShared() {
+ return _asShared(
+ reference.pointer,
+ _id_asShared as jni$_.JMethodIDPtr,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_compress = _class.instanceMethodId(
+ r'compress',
+ r'(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z',
+ );
+
+ static final _compress =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<
+ (
+ jni$_.Pointer,
+ jni$_.Int32,
+ jni$_.Pointer,
+ )
+ >,
+ )
+ >
+ >('globalEnv_CallBooleanMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ int,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `public boolean compress(android.graphics.Bitmap$CompressFormat compressFormat, int i, java.io.OutputStream outputStream)`
+ bool compress(
+ Bitmap$CompressFormat? compressFormat,
+ int i,
+ jni$_.JObject? outputStream,
+ ) {
+ final _$compressFormat = compressFormat?.reference ?? jni$_.jNullReference;
+ final _$outputStream = outputStream?.reference ?? jni$_.jNullReference;
+ return _compress(
+ reference.pointer,
+ _id_compress as jni$_.JMethodIDPtr,
+ _$compressFormat.pointer,
+ i,
+ _$outputStream.pointer,
+ ).boolean;
+ }
+
+ static final _id_copy = _class.instanceMethodId(
+ r'copy',
+ r'(Landroid/graphics/Bitmap$Config;Z)Landroid/graphics/Bitmap;',
+ );
+
+ static final _copy =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer, jni$_.Int32)>,
+ )
+ >
+ >('globalEnv_CallObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ int,
+ )
+ >();
+
+ /// from: `public android.graphics.Bitmap copy(android.graphics.Bitmap$Config config, boolean z)`
+ /// The returned object must be released after use, by calling the [release] method.
+ Bitmap? copy(Bitmap$Config? config, bool z) {
+ final _$config = config?.reference ?? jni$_.jNullReference;
+ return _copy(
+ reference.pointer,
+ _id_copy as jni$_.JMethodIDPtr,
+ _$config.pointer,
+ z ? 1 : 0,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_copyPixelsFromBuffer = _class.instanceMethodId(
+ r'copyPixelsFromBuffer',
+ r'(Ljava/nio/Buffer;)V',
+ );
+
+ static final _copyPixelsFromBuffer =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallVoidMethod')
+ .asFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `public void copyPixelsFromBuffer(java.nio.Buffer buffer)`
+ void copyPixelsFromBuffer(jni$_.JBuffer? buffer) {
+ final _$buffer = buffer?.reference ?? jni$_.jNullReference;
+ _copyPixelsFromBuffer(
+ reference.pointer,
+ _id_copyPixelsFromBuffer as jni$_.JMethodIDPtr,
+ _$buffer.pointer,
+ ).check();
+ }
+
+ static final _id_copyPixelsToBuffer = _class.instanceMethodId(
+ r'copyPixelsToBuffer',
+ r'(Ljava/nio/Buffer;)V',
+ );
+
+ static final _copyPixelsToBuffer =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallVoidMethod')
+ .asFunction<
+ jni$_.JThrowablePtr Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `public void copyPixelsToBuffer(java.nio.Buffer buffer)`
+ void copyPixelsToBuffer(jni$_.JBuffer? buffer) {
+ final _$buffer = buffer?.reference ?? jni$_.jNullReference;
+ _copyPixelsToBuffer(
+ reference.pointer,
+ _id_copyPixelsToBuffer as jni$_.JMethodIDPtr,
+ _$buffer.pointer,
+ ).check();
+ }
+
+ static final _id_createBitmap = _class.staticMethodId(
+ r'createBitmap',
+ r'(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;',
+ );
+
+ static final _createBitmap =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap createBitmap(android.graphics.Bitmap bitmap)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? createBitmap(Bitmap? bitmap) {
+ final _$bitmap = bitmap?.reference ?? jni$_.jNullReference;
+ return _createBitmap(
+ _class.reference.pointer,
+ _id_createBitmap as jni$_.JMethodIDPtr,
+ _$bitmap.pointer,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_createBitmap$1 = _class.staticMethodId(
+ r'createBitmap',
+ r'(Landroid/graphics/Bitmap;IIII)Landroid/graphics/Bitmap;',
+ );
+
+ static final _createBitmap$1 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<
+ (
+ jni$_.Pointer,
+ jni$_.Int32,
+ jni$_.Int32,
+ jni$_.Int32,
+ jni$_.Int32,
+ )
+ >,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ int,
+ int,
+ int,
+ int,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap createBitmap(android.graphics.Bitmap bitmap, int i, int i1, int i2, int i3)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? createBitmap$1(Bitmap? bitmap, int i, int i1, int i2, int i3) {
+ final _$bitmap = bitmap?.reference ?? jni$_.jNullReference;
+ return _createBitmap$1(
+ _class.reference.pointer,
+ _id_createBitmap$1 as jni$_.JMethodIDPtr,
+ _$bitmap.pointer,
+ i,
+ i1,
+ i2,
+ i3,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_createBitmap$2 = _class.staticMethodId(
+ r'createBitmap',
+ r'(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;',
+ );
+
+ static final _createBitmap$2 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<
+ (
+ jni$_.Pointer,
+ jni$_.Int32,
+ jni$_.Int32,
+ jni$_.Int32,
+ jni$_.Int32,
+ jni$_.Pointer,
+ jni$_.Int32,
+ )
+ >,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ int,
+ int,
+ int,
+ int,
+ jni$_.Pointer,
+ int,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap createBitmap(android.graphics.Bitmap bitmap, int i, int i1, int i2, int i3, android.graphics.Matrix matrix, boolean z)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? createBitmap$2(
+ Bitmap? bitmap,
+ int i,
+ int i1,
+ int i2,
+ int i3,
+ jni$_.JObject? matrix,
+ bool z,
+ ) {
+ final _$bitmap = bitmap?.reference ?? jni$_.jNullReference;
+ final _$matrix = matrix?.reference ?? jni$_.jNullReference;
+ return _createBitmap$2(
+ _class.reference.pointer,
+ _id_createBitmap$2 as jni$_.JMethodIDPtr,
+ _$bitmap.pointer,
+ i,
+ i1,
+ i2,
+ i3,
+ _$matrix.pointer,
+ z ? 1 : 0,
+ ).object(const $Bitmap$NullableType$());
+ }
+
+ static final _id_createBitmap$3 = _class.staticMethodId(
+ r'createBitmap',
+ r'(Landroid/graphics/Picture;)Landroid/graphics/Bitmap;',
+ );
+
+ static final _createBitmap$3 =
+ jni$_.ProtectedJniExtensions.lookup<
+ jni$_.NativeFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.VarArgs<(jni$_.Pointer,)>,
+ )
+ >
+ >('globalEnv_CallStaticObjectMethod')
+ .asFunction<
+ jni$_.JniResult Function(
+ jni$_.Pointer,
+ jni$_.JMethodIDPtr,
+ jni$_.Pointer,
+ )
+ >();
+
+ /// from: `static public android.graphics.Bitmap createBitmap(android.graphics.Picture picture)`
+ /// The returned object must be released after use, by calling the [release] method.
+ static Bitmap? createBitmap$3(jni$_.JObject? picture) {
+ final _$picture = picture?.reference ?? jni$_.jNullReference;
+ return _createBitmap$3(
+ _class.reference.pointer,
+ _id_createBitmap$3 as jni$_.JMethodIDPtr,
+ _$picture.pointer,
+ ).object